summaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-29 10:46:16 -0300
committerGabriel Schneider <[email protected]>2026-10-29 14:30:01 -0300
commit97f83717cf8be3e4eedd3f7b932766c1cf72fd37 (patch)
tree5013e0352b48bbd5d1a9154e7686c1a87a0a0da3 /build.zig
parent791d0447aa2bdd4fe4ae0c76052e09acca4c61f2 (diff)
downloadpardes-97f83717cf8be3e4eedd3f7b932766c1cf72fd37.tar.gz
pardes-97f83717cf8be3e4eedd3f7b932766c1cf72fd37.zip
perf --live: keystroke-to-present through the real tty and GUI, `yes | head -c 1G` through a real pty, and a big file's open
The baseline the daemon work is measured against (docs/next-daemon.md). `pardes-perf --live <pardes>` runs the real tty binary in a pty (test/e2e_harness.zig, as the snapshot harness does): FrameStats.keys's gestures (key-down, key-right, edit-char, page-down, wheel) on the 50k-line fixture, a phase each, each frame's latency from the shell taking the input off its queue to the end of its present, read back from the session's PARDES_FRAMES dump; `yes | head -c 1G` typed into a bash pane in tty mode, wall time to the mark after it and the frames drawn; and a 1,000,000-line file opened on the command line, wall time to its first line on screen. `--live-gui <pardes-gui>` runs the same gestures as the GUI's own timedemo (PARDES_FRAMES_DEMO=keys) in a hidden test window. p50 and p99 per phase, pooled over --reps runs; text or --json. Each run has a private home (bash with a `$ ` prompt), XDG_RUNTIME_DIR and fixtures under $TMPDIR, all removed after. The frames dump now says the monotonic time of its first frame (`# t0_ns`), so a driver lines its own phase times up with the frames'. The perf gate's baselines (test/perf-baseline-{tty-debug,tty-fast,gui-debug}.json) are recorded again: the harness id is perf.zig's hash, and the medium cells came out within about 10% of the old ones (edit-char and edit-twin faster). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig2
1 files changed, 2 insertions, 0 deletions
diff --git a/build.zig b/build.zig
index b365d265..9515e536 100644
--- a/build.zig
+++ b/build.zig
@@ -1519,6 +1519,8 @@ pub fn build(b: *std.Build) void {
}),
});
perf.root_module.addImport("pardes", core_module);
+ // --live drives the real binary through a pty (test/e2e_harness.zig).
+ if (ghostty_vt_for_snap) |vt| perf.root_module.addImport("ghostty-vt", vt);
perf.root_module.addOptions("perf_options", perf_options);
const run_perf = b.addRunArtifact(perf);
run_perf.has_side_effects = true;