Performance Budget
A performance budget is a limit set before work begins for file size, timing, or user experience. It helps guide design and code choices.
Another example
A pull request fails if JavaScript is over 170 KB or mobile LCP is above the agreed lab limit. The check uses files, images, and CI results. Saying only that a site should be fast is not a budget.
Main parts
- 01measured metric
- 02threshold
- 03enforcement gate
Use it when
Use this term when a measurable limit is agreed before work and checked at a clear gate.
Do not use it when
Do not choose limits without knowing the device, network, route, and business need.
Name used in code
metric ≤ threshold at release gate Before you ship
Check the environment and prepared test data (fixture). Define a result you can observe, failure and edge cases, isolation, stable inputs, useful error details, and cleanup. Set a time budget, owner, and flaky-test rule.
Outcome: Use Performance Budget to gather repeatable evidence about this behavior or quality risk. User context: A pull request fails if JavaScript is over 170 KB or mobile LCP is above the agreed lab limit. The check uses files, images, and CI results. Saying only that a site should be fast is not a budget. Validation approach: Performance Budget. Why it fits: Use this term when a measurable limit is agreed before work and checked at a clear gate. Do not use it when: Do not choose limits without knowing the device, network, route, and business need. Test requirements: Name the system and test environment. Define prepared test data, other inputs, and the result you can observe. Include failure and edge cases, allowed error, isolation, and cleanup. Test operations: Make failures easy to diagnose. Control random or changing inputs. Name an owner. Keep the test fast and simple enough for its release gate. Acceptance criteria: The test fails for the known bug and passes after the fix. It repeats in the target environment, gives useful evidence, and does not expose or change unrelated data. Evidence and limits (evidence boundary): No single official standard controls the whole term. Its meaning may change across teams, platforms, or frameworks. Unknowns to confirm: Release gate, environment, prepared test data, allowed error, time budget, owner, and flaky-test rule.
Check this request
Review the current use of Performance Budget. Definition: A performance budget is a limit set before work begins for file size, timing, or user experience. It helps guide design and code choices. Release checks: Check the environment and prepared test data (fixture). Define a result you can observe, failure and edge cases, isolation, stable inputs, useful error details, and cleanup. Set a time budget, owner, and flaky-test rule. Before changing code, report the evidence you found, gaps, severity, and the smallest safe fix.