Skip to main content
PreScale is designed to work with no configuration — run prescale run http://localhost:8000 and you get a useful result immediately. Every default is calibrated to be safe and sensible for most apps. But every default can be overridden with a flag on any invocation. There are no config files. PreScale doesn’t read a .prescalerc, prescale.yml, or any project-level config. All settings are passed as CLI flags, which means your exact configuration is always visible in shell history, CI logs, and the config object of the saved result JSON.

Thresholds

Thresholds define what “passing” and “failing” mean during a load ramp. A stage is considered failed when either threshold is crossed — whichever comes first determines verdict.onset_reason.
float
default:"2.0"
p95 response latency in seconds. Any stage where p95 exceeds this value is counted as a failure. The default of 2.0 s is a practical web-app threshold — most users perceive responses slower than this as broken.
Raising --latency-wall moves the failure onset to a higher user count — you’ll see a higher survives_users verdict, but you’re accepting slower responses as acceptable. Lowering it makes the verdict stricter.
float
default:"0.02"
Error rate (expressed as a fraction from 0 to 1) above which a stage is considered failed. The default of 0.02 means any stage where more than 2% of requests return an error is counted as a failure.
Errors counted here include 5xx HTTP responses, connection timeouts, connection refusals, and network errors. 4xx responses (except 429) are not counted as errors.

Load shaping

These flags control the shape of the load ramp — how many users to test, how long to hold each level, and how to simulate realistic user behaviour.
integer
default:"200"
Peak concurrent virtual users to ramp to. PreScale ramps from 1 user up to this value in steps, holding each level for --stage-seconds. If the app fails well before this value, the ramp stops early.
If verdict.marginal is true, the failure onset is close to max_tested — re-run with a larger -u to find the true ceiling.
float
default:"5.0"
How long (in seconds) to hold each load level before stepping up. Shorter stages make the ramp faster but noisier. Longer stages give more signal at each level and are useful when you’re diagnosing intermittent issues.
float
Safety ceiling on aggregate requests per second. When set, PreScale throttles traffic so the total RPS across all routes never exceeds this value, regardless of how many virtual users are active.
When --max-rps is active, the config.max_rps field in the result is set and verdict.saturated accounts for the cap when interpreting throughput plateaus.
integer
default:"1"
Run the full ramp N times and pool the results. Multiple ramps tighten the confidence band (verdict.confidence) by averaging out transient spikes. Use --repeat 3 whenever verdict.confidence.stable is false or the bottleneck class came back "unknown".
float
default:"0.0"
Seconds each virtual user pauses between requests. A value of 0 (the default) sends requests as fast as possible — which models an API client under pressure. A non-zero value simulates realistic user pacing — a browser user who reads a page before clicking.
--profile scenarios set this automatically — for example, the product-hunt profile applies a realistic think time for a consumer web app.
boolean
By default, PreScale sends a brief warmup burst before starting measurement. This lets JIT compilers warm up, connection pools fill, and caches prime — so your stage-1 latency reflects steady-state performance rather than cold-start overhead. Pass --no-warmup to skip this phase and start measuring from the first request.
Use --no-warmup only if you deliberately want to measure cold-start behaviour.

Saved runs

By default, every run is saved to ./.prescale/runs/<id>.json. You can change or disable this behaviour.
path
default:"./.prescale"
Directory where runs are saved. PreScale creates <store>/runs/ automatically.
boolean
Skip saving the result to disk entirely. Useful when you only want the terminal output or the --json stream.
Add .prescale/ to your .gitignore to keep transient run artifacts out of source control. If you use prescale compare for CI regression gating, deliberately commit only the baseline file (e.g. prescale-baseline.json) rather than the whole .prescale/ directory.

MCP environment variable

When you run PreScale as an MCP server for AI coding agents, you can control which non-local hosts the agent is allowed to load-test.
string
Comma-separated list of non-local hostnames the MCP server may load-test. By default, the MCP server only allows localhost and loopback addresses. You must explicitly allowlist staging or preview hosts before an agent can test them.
Alternatively, pass the allowlist directly to the mcp command:
The environment variable and the --allow flag are equivalent — use whichever fits your deployment. For Claude Code, set the variable in your shell before running claude mcp add:

Host permission

string
Set to 1 to confirm you have the host’s permission to load-test a target on Vercel, Netlify or Cloudflare, where nobody can be asked (scripts, CI, the MCP server). The same as --host-permission. Only set it if you really have that permission. See Host rules.

Safety defaults

PreScale ships with conservative safety defaults so you don’t accidentally load-test something you don’t own.
boolean
Skip the interactive confirmation prompt before sending traffic to a non-local host. Without this flag, PreScale prints a warning and asks you to confirm before it ramps any non-localhost target.
Use --i-own-this in all CI and automated contexts — interactive prompts block pipeline execution.
boolean
Skip the robots.txt courtesy check. By default, PreScale checks the target’s robots.txt and warns (but does not stop) if any tested routes are disallowed. Pass --ignore-robots to silence the warning.
Load testing sends real traffic and can cause real outages or unexpected cloud bills. Always point PreScale at a staging or preview environment — not production — unless you have explicitly planned for the load and have the capacity to absorb it.

MCP safety model

The MCP server defaults to local-only. An AI coding agent using the load_test or investigate MCP tools cannot reach any non-local host unless you have explicitly added it to PRESCALE_MCP_ALLOW or passed --allow when starting the server. Requests to unlisted non-local hosts are rejected before any traffic is sent.
In CI pipelines, always pair non-local URLs with --i-own-this. Without it, prescale run in non-interactive (e.g. --json) mode will exit with an error rather than prompt. A complete CI invocation looks like: