Performance & SLOs
Run soak benchmarks, export JSON reports, and enforce p95/p99 latency budgets.
Performance & SLOs
1) Soak benchmark
DATABASE_URL=... \
BENCH_TOTAL=1000 \
BENCH_CONCURRENCY=50 \
BENCH_OUTPUT_JSON=./soak.json \
pnpm bench:soakOptional:
BENCH_WARMUP
2) Gate by latency budget
SLO_REPORT_PATH=./soak.json \
SLO_P95_MS=50 \
SLO_P99_MS=150 \
pnpm bench:slo-gateIf the budget fails, command exits non-zero.
3) Point-in-time perf audit
DATABASE_URL=... \
PERF_ITERS=50 \
PERF_OUTPUT_JSON=./perf.json \
pnpm perf:auditThis outputs summary for:
db-selectcached-select
Why this matters
- You can verify p95/p99 before rollout.
- You can enforce performance in CI/CD gates.
- You can compare changes with machine-readable reports.