prescale compare loads two saved results and diffs their capacity — how many concurrent users each survived — and flags whether the change is a real regression or just noise. Use it to prevent a deploy from going out if load-carrying capacity has quietly dropped, or to track improvements over time.
Usage
Example output
Options
The result ID or
.json path for the newer run to compare. Defaults to the most recently saved run.The result ID or
.json path for the older run to compare. Defaults to the second-most-recently saved run. Mutually exclusive with --baseline.Path to a
.json file or a result ID to use as the “old” baseline. Convenient for committing a known-good result and comparing every PR against it.Fractional drop in
survives_users that counts as a regression. The default of 0.2 means a 20% drop in capacity is required to trigger the flag. Decrease this to make the gate stricter.Exit with a non-zero status code if a regression is detected. Use this to fail a CI job or block a deploy.
Emit a PR-comment-ready markdown block. Combine with
--fail-on-regression and a gh pr comment step to post capacity diffs directly to pull requests.Directory holding saved runs. Defaults to
./.prescale in the current working directory. Override this when your runs are saved elsewhere.CI usage
The most common pattern is to save a baseline on the default branch and compare every pull request against it. Here is a complete GitHub Actions example:main, add a separate job:
The regression check uses confidence bands from the ramp results — it won’t fail the build on noise when the bands from the two runs overlap. You only see a confident failure when the capacity drop is real and statistically clear. This means a flaky test environment won’t produce false positives.