CLI
Basic Usage
openpost perf api-tests/tasks.api.yaml -c 20 -n 1000 -t "p95<250"
20 virtual users run the file's flow 1,000 times; fails if p95 latency is 250 ms or more
openpost perf api-tests/ --grep "List tasks" -c 50 -d 30s --ramp-up 5s --rps 200 -r html
One endpoint for 30 seconds, ramping up over 5 seconds, paced at 200 iterations per second
once: true (login, setup) run once before the load and share their capturesOptions
| Flag | Description |
|---|---|
| -c, --concurrency | Virtual users running in parallel |
| -n, --iterations | Total iterations across all users |
| -d, --duration | Run for a time instead, e.g. 30s or 2m |
| --ramp-up | Start users gradually over this time |
| --rps | Pace iterations to this rate |
| --warmup | Iterations to run before measuring |
| -t, --threshold | Pass/fail rule (repeatable) |
All test flags also apply: --env, --env-file, --grep, --tag, -r, --report-dir and --json. Defaults can live in the file under perf:.
Thresholds
perf:
concurrency: 10
iterations: 200
thresholds: { p95: "< 300", errorRate: "< 1%" }
requests:
- name: List tasks
url: /tasks
perf:
thresholds: { p95: "< 200" } # per endpoint
| Metric | Example |
|---|---|
| p50 p90 p95 p99 max avg | p95<300 |
| ttfb_p95 | ttfb_p95<100 |
| errorRate | errorRate<1% |
| errors / count | errors==0 |
| rps | rps>=500 |
errorRate < 1% threshold applies by default unless you set your own error threshold-t rule on the command line replaces a file threshold on the same metricLoad Test Report
The HTML report from openpost perf -r html: thresholds, latency distribution, status codes, then throughput and p95 over time and per-endpoint metrics
Safety
Load-test only local, staging or explicitly approved targets. Never point a load test at production or a third-party API without permission from its owner.