Guides

Fix a performance regression with numbers

Have a coding agent change one performance hypothesis at a time and prove it against a named baseline with samples on both sides, not a single run.

Updated

SHORT ANSWER

How do I prove a performance fix with real measurements?

Name the baseline and its measurement source: a benchmark, profiler, Lighthouse run, trace, or load test. The shift changes one hypothesis per cycle, preserves correctness, reruns the same source in the same stabilized environment, and compares distributions with at least two samples per side.

01

No baseline, no claim

The shift never writes faster or slower without a present baseline, a matching measurement source, and samples on both sides. A surface it cannot measure is recorded as unmeasured instead of guessed.

02

Load stays inside a budget

When load or capacity work is in scope, the target and budget are declared in the receipt first. Production targets and over-budget runs are refused, and correctness is never traded for a better timing.

03

The numbers in the receipt

A perf-compare receipt lists every scoped surface as measured or unmeasured, with the provenance of each number. The performance evidence kind adds the exact command, the machine and its load, before and after figures with units, and the run count behind each.

TRY IT

Start with a bounded prompt

This prompt names the outcome and preserves Nightshift’s review boundary. Paste it into the supported coding host from the project you want to change.

Run the Nightshift performance-regression shift against the benchmark on main: change one hypothesis at a time and compare at least two samples per side.
BOUNDARIES

What this workflow does not claim

  • No claim of faster or slower is made without a present baseline and matching source.
  • Load against production or over budget is refused.
SOURCES

Evidence and sources

These links support the released behavior, public outcomes, or problem language described on this page.

performance-regression contractBaseline, measurement source, distributions, and load budget rules.Open evidence ↗Evidence linesEvidence kinds, owner folders, and what off, report, block, review, and unavailable do.Open evidence ↗
RELATED QUESTIONS

Continue from the question you have

repair flaky testsRead the answer →performance evidence per itemRead the answer →see what each item costRead the answer →