From 6e1da675ec9d18672fea7748f389e59a73c692a6 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 18 Nov 2026 18:08:43 -0300 Subject: 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//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 (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 --- test/perf.zig | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test/perf.zig') 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); -- cgit v1.3