The bars are PreScale’s mark in text: sparse🔴 Capacity regressed: 100 → 50 users (−50%)
Breaks first:/api/search?q=shoe· p95 crossed the latency wall at ~75 users Why:concurrency_ceiling(high confidence) · Fix: raise the worker count, or scale out.
░ → ▒ → a solid █ end at the capacity
measured. When more than one route is tested, the comment also shows each route’s p95 as a
bar toward the latency wall (┆).
There are two ways to run it:
- Replica mode (recommended): the Action builds the pull request in the job and tests it on localhost. No deploy, no host, nothing to arrange.
- A deployed staging URL: the Action tests a deploy once it finishes. Only for staging you’re allowed to load-test.
Replica mode (recommended)
The Action starts your app in the job with your build-and-start command, waits for it to answer, tests it, and stops it. No host is involved, so no host’s load-testing rules apply and no CDN shapes the result. See Replica mode for how it works.1
Add a token as a secret
Create a token on the dashboard’s Connect page and save it as the
PRESCALE_TOKEN
repository secret.2
Add your target
Add a target for the app in the dashboard (for example
myapp.com). Runs from every pull
request attach to it, and its timeline shows how capacity changes over time.3
Commit the workflow
.github/workflows/capacity.yml
main record the baseline; each pull request is compared with it. The app’s
command is never saved or uploaded, and results say they were measured on a build of the
commit in CI, so serverless behaviour such as cold starts isn’t included.
Testing a deployed staging URL
On deploys hosted by Vercel, Netlify or Cloudflare, the Action skips the test, says why on the pull request and in the job summary, and passes. Sethost-permission: true only if you
have that host’s permission. Use this mode for staging you’re allowed to load: your own
servers, or a host that permits load testing.
.github/workflows/capacity.yml
main against your
staging URL (set url and comment: false). Until there is one, each push compares with
the previous push on the same pull request.
Safety and cost
- Production deploys are skipped unless you set
allow-production: true. - Restricted hosts are skipped unless you set
host-permission: true. - Gentle by default: 100 virtual users per check. On a serverless deploy every request is a billed invocation; the job log says how many requests each check sent.
- Headers and the app command stay private: headers go to your site only, and neither is saved or uploaded.
fail-on-regressionfails the check only on a confirmed drop (more than 20%, with confidence bands that don’t overlap). Uncertain drops show as a warning.
Inputs
Not on GitHub?
prescale ci --target myapp.com --app "npm run build && npm start" does the
same from any CI.