Skip Navigation

Every test can pass and your service still gets slower. Tests check correctness; they don't check...

Every test can pass and your service still gets slower. Tests check correctness; they don't check pace. A pattern for catching performance regressions before merge:

  1. Make benchmark output machine-readable: pytest-benchmark JSON (Python), go test -bench -benchmem -json (Go), cargo criterion --message-format=json (Rust), Google Benchmark JSON (C++).
  2. Compare each run to a baseline branch, not a number from months ago.
  3. Pick an allowed regression percentage — and make anything beyond it exit non-zero, so the CI job fails instead of merging.
  4. Keep trends visible somewhere, so "it feels slower" can be checked against data.

Regressions slip in quietly unless the build stops them.

Comments