Repository navigation
Description
The gap
The repository has 82 benchmarks. No workflow runs any of them:
$ grep -rn '\-bench\|benchstat\|\-benchmem' .github/workflows/ .github/scripts/
$ echo $?
1
The benchmark build tag is in ci.yml's build-tags matrix, which runs go vet -tags=benchmark ./... — so the benchmarks are type-checked and never executed. Performance is this project's
stated second priority, behind integrity, and nothing measures it.
What that costs
A benchmark nobody runs decays in two directions at once. It stops being a measurement, obviously.
Less obviously, it stops being correct: a benchmark whose setup has quietly become wrong — timing
included in the measured loop, a cache warmed by a previous iteration, b.N ignored — reports a
number that looks fine and means nothing, and there is no signal that would tell anyone. Eighty-two
of them have been compiled but not run for long enough that the ones still measuring what they claim
to should be identified rather than assumed.
There is also prior art here that argues for doing this properly: a control benchmark once rejected
a design in this repository — #184's first fast-path gate cost +53% on the case it missed, which was
only visible because someone measured the case the fast path did not take. That is the value a
benchmark gate has, and it is unavailable right now.
What not to build
Do not make a benchmark a pass/fail gate on a PR. Shared CI runners have neighbour noise well
above the effect size of most real regressions, so a threshold tight enough to catch a 10% regression
will fire on nothing, repeatedly, and the response to a flaky red gate is to widen it until it gates
nothing. That is worse than no gate, because it also costs everyone's attention.
What to build instead
- A scheduled job, not a PR job.
workflow_dispatchplus a cron, runninggo test -bench=. -benchmem
with a fixed-counton a fixed runner label. Its output is an artifact. - Report, do not block. Commit the results, or post them as a comment on a tracking issue, so a
trend exists.benchstatcomparing the run against the previous stored result is the readable form. - A floor on the number of benchmarks that actually ran, because "zero benchmarks executed
successfully" must not look the same as "no regressions". This is the non-vacuity discipline the
rest of the repository's gates use. - Only then, consider failing on a regression, and only for a small named set of benchmarks on
the read path with a threshold derived from the measured run-to-run spread on the actual runner —
not from a guess.
Step 1 alone is most of the value. Sequence it that way rather than trying to land a regression gate
in one change.
Acceptance criteria
- A scheduled workflow executes the benchmark suite and uploads results
- The job fails if fewer than a floor number of benchmarks ran
- Results are comparable run-to-run (
benchstatagainst a stored previous result) - The benchmarks that no longer measure what they claim are identified and either fixed or deleted
- No benchmark is a blocking PR check as part of this issue
Activity
ci: run the hermetic e2e and distributed suites on every PR, and gate…
ci: run the integration and aws_s3 suites against real AWS, daily, vi…