From 97f83717cf8be3e4eedd3f7b932766c1cf72fd37 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 29 Oct 2026 10:46:16 -0300 Subject: 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 ` 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 ` 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 --- build.zig | 2 ++ 1 file changed, 2 insertions(+) (limited to 'build.zig') 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; -- cgit v1.3