diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-05 00:22:08 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-05 00:32:56 -0300 |
| commit | 294ad7818adc55d85767ff7a52106deedaa4618a (patch) | |
| tree | b534196bb1e8ffffc610f4030a7758837ac6e939 /src/Places.zig | |
| parent | 2367ed34beccf3f2f1b8bbf6b8a171f50933d7a1 (diff) | |
| download | pardes-294ad7818adc55d85767ff7a52106deedaa4618a.tar.gz pardes-294ad7818adc55d85767ff7a52106deedaa4618a.zip | |
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=<path>)", "zz stream timings on the stress file with a worker (QUERY_TIMES=<path>)" and "zz grep rows timings: a Grep of about 2000 rows on the stress file, a worker (GREP_TIMES=<path>)" 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 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/Places.zig')
| -rw-r--r-- | src/Places.zig | 9 |
1 files changed, 0 insertions, 9 deletions
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" { |
