Skip to content

Add dispatch-fairness benchmark scenario + bump default corpus scale - #489

Merged
clrudolphi merged 1 commit into
masterfrom
perf/benchmark-contention-gap
Aug 26, 2026
Merged

Add dispatch-fairness benchmark scenario + bump default corpus scale#489
clrudolphi merged 1 commit into
masterfrom
perf/benchmark-contention-gap

Conversation

@clrudolphi

Copy link
Copy Markdown
Collaborator

Summary

Closes #488.

Test plan

🤖 Generated with Claude Code

…488)

The performance benchmark suite never caught the #471/#477 dispatch-stall
regression because every scenario measures one operation in isolation
(BenchmarkRunner/SessionScenario never race a slow op against a cheap one),
and the default --files 10 undershoots the ~50-file/~1,350-step scale the
#471 investigation needed to reproduce it. The fix that would have caught it
(ConcurrencyProbeTests) landed as a one-off xUnit probe outside the benchmark
suite instead, invisible to BenchmarkReport/JSON trend tracking.

Adds WorkspaceReloadContentionScenario: models many editor tabs restoring (or
a workspace-wide reload/config-change event) as a concurrent didChange storm
across most open files, racing a cheap textDocument/foldingRange read on an
untouched probe file. Wired into BenchmarkRunner so it's tracked in the
report/JSON like every other scenario, gated via the existing --assert /
reference-machine mechanism.

Gates on a ratio-to-same-run-baseline ceiling (ContentionCheck), not an
absolute-ms target: the #477 investigation found this class of measurement's
absolute magnitude swings wildly with machine/CPU contention (~15x-20x
locally, ~1.3x-40x+ under noise), so an absolute threshold would either never
fire or fire constantly depending on the machine.

Also bumps BenchmarkRunner/SessionRunner's default --files from 10 to 50 (the
full committed corpus) so routine runs reach realistic scale instead of
undershooting it.

Issue: #488

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@clrudolphi
clrudolphi merged commit 60da485 into master Aug 26, 2026
17 checks passed
@clrudolphi
clrudolphi deleted the perf/benchmark-contention-gap branch August 26, 2026 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Performance benchmark suite never exercises concurrent request contention, so it missed the #471/#477 dispatch-stall regression

1 participant