Skip to content

82 benchmarks exist and no CI job has ever run one, so there is no performance signal at all #568

Open

Description

@scttfrdmn

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

  1. A scheduled job, not a PR job. workflow_dispatch plus a cron, running go test -bench=. -benchmem
    with a fixed -count on a fixed runner label. Its output is an artifact.
  2. Report, do not block. Commit the results, or post them as a comment on a tracking issue, so a
    trend exists. benchstat comparing the run against the previous stored result is the readable form.
  3. 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.
  4. 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 (benchstat against 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

  1. added
    type: performance
    priority: medium
    area: tests
    effort: medium
    area: ci-cd
    on Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: ci-cdarea: testseffort: mediumpriority: mediumtype: performance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions