You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c8b2e38
Browse filesBrowse the repository at this point in the historyBrowse files
test(search): the memory repro names many as not measured when ripgrep exited between samples
The repro judges its many scenario by ripgrep's peak memory, sampled while
ripgrep runs. A ripgrep that started and exited between two samples was
never seen: its peak read 0, sampling had not failed, and the run said NOT
REPRODUCED with many counted as bounded, without having measured ripgrep.
At REPRO_MB=1 that happened 3 runs of 3 on Windows ("ripgrep peak 0 MB"),
and on macOS at the default sizes, where ripgrep stops the file at 200
matches within milliseconds.
As a skipped check is, many is now named as not measured ("ripgrep exited
between samples"), is never counted as bounded, and doesn't fail the run by
itself: "NOT REPRODUCED: ... (line); not measured: many (ripgrep exited
between samples)", exit 0, or "SKIPPED: not measured: many (...)" when
nothing else ran. The report line says "ripgrep peak not measured: ripgrep
exited between samples". A real sampling failure is still NOT MEASURED, exit
2. REPRO_SAMPLE_MS sets the sampling interval (default 100).
test-search-memory-unsampled.js runs the repro's many scenario with a
one-minute interval, so the server is sampled before the search and its
ripgrep is always missed. With the earlier repro its many line says "ripgrep
peak 0 MB" and the run "NOT REPRODUCED: ... (many)"; here many is named as
not measured and the run exits 0, Windows.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
console.log(` ripgrep peak ${formatMB(o.ripgrepPeak)}; server peak ${formatMB(o.serverPeak)} (${formatMB(o.serverBefore)} before the search, + ${formatMB(growth)})`);
console.log(` ripgrep peak ${ripgrepMemory}; server peak ${formatMB(o.serverPeak)} (${formatMB(o.serverBefore)} before the search, + ${formatMB(growth)})`);
225
233
if(o.samplingFailure)console.log(` memory not measured: ${o.samplingFailure}`);
226
234
if(o.error)console.log(` error: ${o.error}`);
227
235
if(o.serverExited)console.log(` the server exited${o.serverLog ? `: ${o.serverLog}` : ''}`);
elseif(unmeasured.length===0)console.log(`NOT REPRODUCED: a ${MAX_RESULTS}-result search stayed bounded in ripgrep and the server (${names.join(', ')})`);
264
+
// A scenario whose ripgrep exited between samples is named, as a skipped check
assert.strictEqual(result.status,0,`a many search whose ripgrep exited between samples should not fail the run by itself, got exit ${result.status}: ${report}`);
29
+
assert(lines.some((line)=>line.includes('ripgrep peak not measured: ripgrep exited between samples')),
30
+
`the many line should say ripgrep was not measured: ${report}`);
31
+
assert(verdicts.length===1&&verdicts[0].includes('not measured: many (ripgrep exited between samples)'),
32
+
`the verdict line should name many as not measured: ${report}`);
0 commit comments