Read a performance requirement
Easy30 pts~12 min
- Performance requirements
- SLOs
Practice app · Checkout Service
A load-testable checkout service with realistic latency that degrades under concurrency, plus a live metrics view.
Your starter code already declares BASE_URL — call the API relative to it.
Objective
Translate “checkout must serve 5 concurrent users with p95 under 500 ms and under 1% errors” into an executable script.
Your task
- 1Set options { vus: 5, duration: '10s' }.
- 2Declare thresholds 'http_req_duration': ['p(95)<500'] and 'http_req_failed': ['rate<0.01'].
- 3GET BASE_URL + "/perf/checkout", check status 200, sleep(0.5).
Acceptance criteria
- GET /perf/checkout returns 200
- Thresholds encode the requirement
- ≥ 40 requests, p95 < 500 ms, error rate < 1%
k6 load testing · Performance Testing · Foundations