summaryrefslogtreecommitdiff
path: root/test/perf.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-18 18:08:43 -0300
committerGabriel Schneider <[email protected]>2026-11-18 18:45:50 -0300
commit6e1da675ec9d18672fea7748f389e59a73c692a6 (patch)
tree05b8f191eb4134cec82e32459738f89f4b39a6a6 /test/perf.zig
parent41f665c986886790e474bef78928f4b0d3b05c21 (diff)
downloadpardes-6e1da675ec9d18672fea7748f389e59a73c692a6.tar.gz
pardes-6e1da675ec9d18672fea7748f389e59a73c692a6.zip
perf, build: pardes-perf refuses to start when the image addon is not where its build put it: the path is relative to the build root (.zig-cache/o/<hash>/libimage.so, where `zig build perf` runs it), and from anywhere else, or after the cache was wiped, the run used to end at its last cell as ImageNotShown with a count about 9.5M instructions short that two agents read as +0.43%; now the gesture run (or --op image-frame) checks the file before any measurement and exits with "pardes-perf: no image addon at <path> (FileNotFound), relative to the working directory: run it from the build root" and ImageAddonMissing; the path stays relative so a kept binary can be pointed at a kept copy of its addon by its working directory (the coordinator's perf gate does that); perf_options' pdf_addon and has_pdf_addon, baked in and read by nothing, are gone (the perf step no longer builds the PDF addon); the three perf baselines' harness id follows perf.zig (d6c5e18a4acc4fe3: the measurement is unchanged, the numbers are kept, not re-recorded); on Zig 0.17.1: tui core-test 822/963 (141 skipped), shell-test 998/1001, behaviour-test 274/274, pane-test 180/181; `zig build perf -Dplatform=tui -Doptimize=ReleaseFast -- --only small --reps 2` passes from the build root, and the same binary from another directory exits 1 with the message before any number; gui frame corpus 77/77 Debug and ReleaseFast against mbase171; gui unit-test 1588/1596 under load, the four failures host_io's tty-job tests (60/60 alone with -Dtest-filter=host_io), perf-gate within 3x in the full run
Diffstat (limited to 'test/perf.zig')
-rw-r--r--test/perf.zig12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/perf.zig b/test/perf.zig
index 85cc2ca3..c52c1715 100644
--- a/test/perf.zig
+++ b/test/perf.zig
@@ -467,6 +467,18 @@ pub fn main(init: std.process.Init) !void {
if (opts.mini) return measureMini(init.io, init.gpa, reps, opts.json);
if (opts.live) |exe| return measureLive(init.io, exe, false, reps, opts.json);
if (opts.live_gui) |exe| return measureLive(init.io, exe, true, reps, opts.json);
+ // The image-frame cells load the image addon by the path the build baked
+ // in, relative to the build root (`zig build perf` runs there). Gone (the
+ // cache wiped, another directory), the run would end at its last cell as
+ // ImageNotShown, a count short that a script could take for a number:
+ // refused before any measurement.
+ if (opts.op == null or opts.op.? == .image_frame) {
+ const addon = @import("perf_options").image_addon;
+ std.Io.Dir.cwd().access(init.io, addon, .{}) catch |err| {
+ std.debug.print("pardes-perf: no image addon at {s} ({t}), relative to the working directory: run it from the build root (zig build perf)\n", .{ addon, err });
+ return error.ImageAddonMissing;
+ };
+ }
var random: [12]u8 = undefined;
init.io.random(&random);