prescale run is PreScale’s core command. Point it at any URL and it ramps virtual users from one up to your configured peak, measures throughput, latency percentiles, and error rates at every step, and tells you — in plain English — what breaks first and exactly how many concurrent users your app can handle. No scripts, no YAML, no account required.
Basic usage
Example output
While the ramp is running you’ll see a live table that updates at each load level:░ to a solid █ at that stage’s p95, toward the latency wall ┆ (set with --latency-wall). Once the ramp finishes, PreScale prints how many requests it sent (on serverless hosts each one is a billed invocation) and a verdict:
Numbers are illustrative — your results depend on your app and infrastructure.
Options
The URL to load test (e.g.
http://localhost:8000 or https://staging.myapp.com). Must include a scheme and host.Peak virtual users to ramp to. PreScale steps through load levels from 1 up to this number, holding each level for
--stage-seconds before moving to the next.How many seconds to hold each load level before stepping up. Increase this for a slower, more thorough ramp; decrease it for a faster smoke test.
An extra route to test, relative to the base URL (e.g.
--path /api/search). Repeatable — pass it multiple times to test several routes in parallel. If you omit --path, PreScale tests the root path.Discover additional GET routes by fetching the target’s
sitemap.xml and adding every listed URL to the test. Discovery is best-effort and never blocks the run if the sitemap is missing or malformed.Frame the run as a named launch scenario. PreScale sets a realistic peak concurrency and think-time for the scenario and frames the verdict against it (e.g. “a Product Hunt #1 launch: unlikely”). Run
prescale profiles to list available profiles: steady-10k-dau, product-hunt, reddit, hn-frontpage, black-friday.The p95 latency threshold in seconds. If any load level pushes p95 above this value, PreScale marks that level as the break point. Raise it if your app has inherently slower endpoints; lower it for stricter SLOs.
The error-rate threshold as a fraction between 0 and 1 (e.g.
0.02 = 2%). If any load level produces an error rate above this value, PreScale marks it as the break point.Cap aggregate requests per second across all virtual users. Useful as a safety ceiling when testing staging environments shared with other teams. By default there is no cap.
Run a brief warmup phase before measurement begins (default: on). The warmup lets connection pools, JIT compilers, and caches reach a steady state so early ramp measurements aren’t artificially slow. Pass
--no-warmup to skip it.Run the full ramp N times and pool the results. Multiple repeats tighten the confidence band on the verdict — useful when you want higher certainty before a launch.
Seconds each virtual user pauses between consecutive requests. A non-zero think time models real user behaviour more accurately and reduces the raw requests-per-second for a given concurrency level.
Skip the
robots.txt courtesy check. By default, PreScale warns you if any of the routes you are testing are disallowed by robots.txt. Pass this flag to silence the warning.Skip the interactive confirmation prompt for non-local targets. Required when running in non-interactive environments (CI,
--json mode). See Safety below.Replica mode: start your app with COMMAND (for example
"npm run build && npm start"), test it on the local URL, then stop it and everything it started. No host is involved. The URL must be local, and the command is never saved or uploaded. See Replica mode.Seconds to wait for the app started by
--app to answer. Production builds can take minutes.Confirm you have the host’s permission to load-test the target. Vercel, Netlify and Cloudflare restrict load testing; without this, PreScale asks first, or stops in
--json mode. Also set by PRESCALE_HOST_PERMISSION=1. See Host rules.Emit the full versioned Result document as JSON instead of the human-readable terminal output. See Output formats below.
Write a self-contained HTML report to the given path. The file can be shared directly — it has no external dependencies. See Output formats below.
Directory where PreScale saves run JSON files. Defaults to
./.prescale. See Saved runs below.Do not save this run to disk. Useful for quick throwaway tests. See Saved runs below.
Exit with a non-zero status code if the app survives fewer than N concurrent users. Use this as a CI gate — pair it with
--i-own-this and --json to keep pipeline output clean.Output formats
prescale run supports three output modes:
- Terminal (default)
- --json
- --html PATH
The default mode renders a live ramp table as the test runs, then prints a plain-English verdict with the break point, likely cause, and confidence band. This is the most human-friendly output.
Safety
Sending load to a URL you do not own can cause outages or unexpected cloud bills. PreScale defaults to safe:- Local hosts (
localhost,127.0.0.1,0.0.0.0,::1) are tested without any prompt. - All other hosts trigger an interactive confirmation panel that tells you the target host and the peak concurrency before asking you to confirm.
- Hosts that restrict load testing (Vercel, Netlify, Cloudflare) are recognised from the first response. PreScale explains the host’s rule and sends no load until you confirm you have its permission. See Host rules.
--i-own-this to skip this prompt — required in CI and whenever you run with --json (which has no interactive mode). For a restricted host, also pass --host-permission if you have that permission.
Saved runs
Every successful run is automatically saved to.prescale/runs/<id>.json in the current working directory. The saved file is the same versioned Result document that --json emits.
You can change this behaviour with the following flags:
--no-save— skip saving entirely (e.g. for quick throwaway tests).--store DIR— write to a different directory (e.g.--store /tmp/prescale-ci).
.prescale/ to your .gitignore to keep run files out of version control, or commit them if you want a persistent history.