How would you define a frontend performance budget that is useful in CI?
Answer
Choose user-centered journey metrics plus controllable contributors such as JavaScript, image and font size, request count and main-thread work. Establish a stable baseline, set thresholds per representative device and page, and fail on meaningful regression rather than noisy absolute variation. Allow an explicit reviewed exception with expiry, and confirm CI budgets correlate with field experience after release.
Strong answer includes
- combines user outcomes with actionable resource limits
- controls environment and statistical noise
- uses reviewed exceptions and field correlation
Practical example
A CI budget that fails a build on any bundle-size increase at all forces developers to bypass it constantly with unreviewed overrides; switching to a budget that fails only on a regression exceeding a statistically meaningful threshold, with an explicit expiring exception process for legitimate increases, actually gets respected instead of routinely ignored.