diff options
| author | Gabriel Schneider <[email protected]> | 2026-10-23 17:10:58 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-23 17:10:58 -0300 |
| commit | 0073d05329335dbb0eb85f5c3044e42805d144e5 (patch) | |
| tree | 744edfc317719b2018b1c3a8657c223aec058d47 /test/perf.zig | |
| parent | a8b457a306a4442975210bcac3f04b56513c61c3 (diff) | |
| download | pardes-0073d05329335dbb0eb85f5c3044e42805d144e5.tar.gz pardes-0073d05329335dbb0eb85f5c3044e42805d144e5.zip | |
Callstack lists every caller and pages a tree too big for one query; memory bounds and resident-size fixes
Callstack walks while the server answers, counts on the message row past a
second, puts test callers last at each level, and ends a tree past one
query's memory (memory.limits.arena.lsp_query, a 256 MiB region taken and
given back per query) in a row whose Callstack shows the next page. Grep
reads whole files. New hard limits: undo text per file, image decode
pixels, the LSP snapshot of other open files, one paste. Safe builds no
longer fill worst-case buffers with 0xAA (memory.unfilled), big regions are
kept off transparent huge pages, and malloc_trim runs after big results.
Also: Look's git show pages into a +Diff, and dropped marks in File.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'test/perf.zig')
| -rw-r--r-- | test/perf.zig | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/test/perf.zig b/test/perf.zig index 7662d028..ab284739 100644 --- a/test/perf.zig +++ b/test/perf.zig @@ -665,8 +665,6 @@ fn measureTerm(op: TermOp, fx: TermFixture, reps: usize) !Cell { .row = pane.body.cur_row, .col = pane.body.cur_col, .edit_len = if (pane.ovl) |overlay| overlay.text.len else 0, - .replay_head = state.replay.head, - .replay_len = state.replay.len, .cols = pane.cols, .rows = pane.rows, }; @@ -689,22 +687,11 @@ fn measureTerm(op: TermOp, fx: TermFixture, reps: usize) !Cell { _ = try frame(core); const dt = nowNs() -| t0; switch (op) { - .render => if (pane.body.cur_row != before.row or pane.body.cur_col != before.col or - state.replay.head != before.replay_head or state.replay.len != before.replay_len) + .render => if (pane.body.cur_row != before.row or pane.body.cur_col != before.col) return error.RenderChangedTerminal, - .output => { - const capacity = state.replay.bytes.len; - if (term_chunk.len == 0 or term_chunk.len >= capacity) return error.InvalidOutputFixture; - const overflow = term_chunk.len -| (capacity - before.replay_len); - if (state.replay.len != @min(capacity, before.replay_len + term_chunk.len) or - state.replay.head != (before.replay_head + overflow) % capacity) - return error.OutputWasNotRecorded; - const start = (state.replay.head + state.replay.len - term_chunk.len) % capacity; - const first = @min(term_chunk.len, capacity - start); - if (!std.mem.eql(u8, term_chunk[0..first], state.replay.bytes[start..][0..first]) or - !std.mem.eql(u8, term_chunk[first..], state.replay.bytes[0 .. term_chunk.len - first])) - return error.WrongTerminalOutput; - }, + // What the output did to the screen is the snapshot suite's to + // check; here it is timed. + .output => if (term_chunk.len == 0) return error.InvalidOutputFixture, .resize_rows => if (pane.rows == before.rows or pane.cols != before.cols or state.vt.screens.active.pages.rows != pane.rows) return error.TerminalDidNotResize, .resize_cols => if (pane.cols == before.cols or pane.rows != before.rows or |
