From 294ad7818adc55d85767ff7a52106deedaa4618a Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 5 Nov 2026 00:22:08 -0300 Subject: Query, Stream, Places: the benchmarks inside unit tests are deleted, as no bench step takes them without a rewrite (they reach into Query's and Stream's own helpers, busy, queryPane and TestShell, read a stress file named in the environment, and perf's gate would need baselines for a new op): "zz query timings on the 1.2 MB stress file (QUERY_TIMES=)", "zz stream timings on the stress file with a worker (QUERY_TIMES=)" and "zz grep rows timings: a Grep of about 2000 rows on the stress file, a worker (GREP_TIMES=)" go, and the big-file places test keeps its asserts without its clocks and PLACES_TIMES print; the docs' numbers stay as they are Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/Places.zig | 9 --------- 1 file changed, 9 deletions(-) (limited to 'src/Places.zig') diff --git a/src/Places.zig b/src/Places.zig index e6858537..6df0ed74 100644 --- a/src/Places.zig +++ b/src/Places.zig @@ -823,9 +823,7 @@ test "places: a big file costs a keystroke its view, the ticks find the rest, an const set = &pane.places; // The line index is the file's, made once whatever asks for it first. _ = try File.lineIndex(p.gpa, &pane.file.?); - const t0 = pardes.FrameStats.nowNs(); set.search(p, pane, .typed, 0, "needle 3", false, 0, true); - const first_ns = pardes.FrameStats.nowNs() - t0; try std.testing.expect(set.hits.items.len > 0); var ticks: usize = 0; while (set.busy(pane) and ticks < 10_000) : (ticks += 1) set.settle(p, pane, true); @@ -839,17 +837,10 @@ test "places: a big file costs a keystroke its view, the ticks find the rest, an @memcpy(new[0..at], f.content[0..at]); new[at] = 'x'; @memcpy(new[at + 1 ..], f.content[at..]); - const t1 = pardes.FrameStats.nowNs(); File.setContentSpan(p, f, new, null); - const t2 = pardes.FrameStats.nowNs(); set.settle(p, pane, false); - const edit_ns = pardes.FrameStats.nowNs() - t2; - const text_ns = t2 - t1; try std.testing.expect(set.complete() and set.shows(pane)); try std.testing.expectEqual(all, set.hits.items.len); - // PLACES_TIMES=1 says the numbers (on stderr, which fails the run). - if (std.c.getenv("PLACES_TIMES") != null) - std.debug.print("places: first key {d} us, {d} ticks, an edit {d} us (the text's own splice {d} us)\n", .{ first_ns / 1000, ticks, edit_ns / 1000, text_ns / 1000 }); } test "a lowered copy's pieces not searched yet are the same in every process: a digest and a dump take them" { -- cgit v1.3