summaryrefslogtreecommitdiff
path: root/test/perf.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-29 17:36:58 -0300
committerGabriel Schneider <[email protected]>2026-10-29 18:17:34 -0300
commitefcb4c35e76ef33bbd62123a5c5574f88bc8bcc7 (patch)
treec79215d2c77dd6373851d3537d9d014ea23deaee /test/perf.zig
parentcb747d385019564e2141f7d9b01d03b394b469b8 (diff)
downloadpardes-efcb4c35e76ef33bbd62123a5c5574f88bc8bcc7.tar.gz
pardes-efcb4c35e76ef33bbd62123a5c5574f88bc8bcc7.zip
perf --live: the flood through the real pty is `yes | head -c 32M`, not 1 GiB
The gigabyte took three minutes a run (seven runs to an interleaved A/B), most of a measurement's time, and 32 MiB floods the pty as well: the reader is starved or not in its first megabyte. The case is named for its size (`live-tty-yes-32m`). perf.zig is the harness's identity, so the gate's baselines are recorded again, from the base the line started from, as before. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'test/perf.zig')
-rw-r--r--test/perf.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/perf.zig b/test/perf.zig
index cc43abcf..4793da78 100644
--- a/test/perf.zig
+++ b/test/perf.zig
@@ -1080,7 +1080,7 @@ fn measureTerminalSession(io: std.Io, mib: usize, reps: usize, json: bool) !void
// Keystroke-to-present is FrameStats' own latency: from the shell taking an
// input off its queue to the end of the frame's present. Both frontends run
// FrameStats.keys (the tty through the pty, the gui as its timedemo) and the
-// frames' dump (PARDES_FRAMES) is split by its phases. `yes | head -c 1G` is
+// frames' dump (PARDES_FRAMES) is split by its phases. `yes | head -c 32M` is
// typed into a shell and timed to the mark after it; the big file is opened
// on the command line and timed to its first line on screen.
@@ -1088,7 +1088,7 @@ const eh = @import("e2e_harness.zig");
extern "c" fn setenv(name: [*:0]const u8, value: [*:0]const u8, overwrite: c_int) c_int;
const live_phases = [_][]const u8{ "key-down", "key-right", "edit-char", "page-down", "wheel" };
-const yes_bytes = 1 << 30;
+const yes_bytes = 32 << 20;
const big_lines = 1_000_000;
const Live = struct {
@@ -1353,9 +1353,9 @@ fn measureLive(io: std.Io, exe: []const u8, gui: bool, reps: usize, json: bool)
if (gui) return;
for (l.yes_ns.items, l.yes_frames.items) |ns, frames| {
const line = if (json)
- try std.fmt.bufPrint(&buf, "{{\"case\":\"live-tty-yes-1g\",\"wall_ns\":{d},\"frames\":{d}}}\n", .{ ns, frames })
+ try std.fmt.bufPrint(&buf, "{{\"case\":\"live-tty-yes-32m\",\"wall_ns\":{d},\"frames\":{d}}}\n", .{ ns, frames })
else
- try std.fmt.bufPrint(&buf, "live tty yes|head -c 1G: {d} ms wall, {d} frames\n", .{ ns / std.time.ns_per_ms, frames });
+ try std.fmt.bufPrint(&buf, "live tty yes|head -c 32M: {d} ms wall, {d} frames\n", .{ ns / std.time.ns_per_ms, frames });
try out.writeStreamingAll(io, line);
}
for (l.open_ns.items) |ns| {