"Apply before you trust, report, or act on a number you measured: a speedup, a regression, a throughput, a latency, or an eval result. Find what limits it, and rule out that it measured something other than the work you think."
Install
npx skillscat add noahdgrant/nightshift/ns-principle-explain-the-number Install via the SkillsCat registry.
Explain the Number
A measured number is a claim about a system. Before you trust it, report it, or act on it, find what limits it and rule out that it measured something else.
Why: A run that went wrong still prints a plausible number. Requests that failed, a cache that skipped the work, code that never ran, a side left on default settings, and run-to-run noise all produce results that look fine. If you cannot say why the number is not twice as good, you do not know what you measured.
Pattern:
- Ask "why not double?" Name the resource or code path that bounds the result, such as a core, a lock, the disk, the network, the bus, or the load generator itself. Get it from a profile (
py-spy,cProfile) or from system counters taken during a run, then map it to source. A guess from reading the code is not a limiter. - List what else the number could be measuring, and rule out each one with evidence. The usual suspects are errors, skipped or cached work, an untuned side, noise, and a piece too small to matter end to end.
- Keep the evidence with the number. Put the run count, the spread, and the limiter in the notes or a linked artifact, so a reader can check the claim.
For a performance number, compare like with like: same build flags, same input, warm-up runs discarded, several runs each side, and the spread reported next to the median. For an eval result, ask the same of the trials: did every run do the task, does the gap hold across trials and models, and does the scenario matter.
Firmware: measure on the target, not on the host or in a simulator. Take cycle counts, ISR latency, and current draw from the board (cycle counter, a GPIO toggled around the code on a scope, a power analyzer), with the same clock and optimization settings as the release build.
You skipped this when the evidence behind a number has no run count, no spread, or no named limiter, or when the time saved is larger than the time the changed piece took.
Distinct from Prove It Works, which checks that an output is real. This checks that a measured number means what you say it means.