Continuous load testing for GistPin using k6 or Locust.
| Scenario | Tool | File |
|---|---|---|
| API load test | k6 | load-tests/api-load-test.js |
| API load test | Locust | load-tests/locustfile.py |
| Stage | Duration | VUs |
|---|---|---|
| Ramp up | 30s | 10 |
| Sustained | 1m | 50 |
| Peak | 30s | 100 |
| Ramp down | 30s | 0 |
- p95 response time: < 500ms
- Error rate: < 1%
# k6 (default)
BASE_URL=https://api.gistpin.io bash infrastructure/scripts/run-load-test.sh k6
# Locust
BASE_URL=https://api.gistpin.io bash infrastructure/scripts/run-load-test.sh locustLoad tests run automatically via the CI workflow on a nightly schedule and on every deployment to staging. See infrastructure/ci/performance-benchmark.yml.
Compare results against infrastructure/ci/benchmark-baselines.json. A p95 regression > 20% or error rate > 1% triggers a workflow failure.