Skip to main content
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:
Each bar runs from sparse ░ 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

string
required
The URL to load test (e.g. http://localhost:8000 or https://staging.myapp.com). Must include a scheme and host.
integer
default:"200"
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.
float
default:"5.0"
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.
string
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.
boolean
default:"false"
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.
string
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.
float
default:"2.0"
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.
float
default:"0.02"
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.
string
default:"GET"
The HTTP method to use for every request in the ramp (e.g. GET, POST, HEAD).
float
default:"10.0"
Per-request timeout in seconds. Requests that exceed this are counted as errors.
float
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.
boolean
default:"true"
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.
integer
default:"1"
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.
float
default:"0.0"
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.
boolean
default:"false"
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.
boolean
default:"false"
Skip the interactive confirmation prompt for non-local targets. Required when running in non-interactive environments (CI, --json mode). See Safety below.
string
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.
float
default:"600"
Seconds to wait for the app started by --app to answer. Production builds can take minutes.
boolean
default:"false"
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.
boolean
default:"false"
Emit the full versioned Result document as JSON instead of the human-readable terminal output. See Output formats below.
string
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.
string
Directory where PreScale saves run JSON files. Defaults to ./.prescale. See Saved runs below.
boolean
default:"false"
Do not save this run to disk. Useful for quick throwaway tests. See Saved runs below.
integer
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:
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.
Pass --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.
To skip all of this, test your app’s own build locally with Replica mode: prescale run http://localhost:3000 --app "npm run build && npm start".
Always point prescale run at a staging or preview URL, not production, unless you have load-tested it before and know it can handle the traffic.

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).
To revisit saved runs later:
Add .prescale/ to your .gitignore to keep run files out of version control, or commit them if you want a persistent history.
After prescale run identifies what breaks, run prescale investigate on the same URL to find out why it breaks and get a concrete fix recommendation. investigate runs its own ramp plus a targeted second-pass probe of the culprit route.