Understand percentiles (p95, p99)
Medium70 pts~25 min
- Percentiles
- Tail latency
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
Express latency goals as percentiles instead of averages.
Your task
- 1Set options { vus: 5, iterations: 60 }.
- 2GET BASE_URL + "/perf/checkout" and check status 200.
- 3Add thresholds 'http_req_duration': ['p(95)<800', 'p(99)<1200'].
Acceptance criteria
- GET /perf/checkout returns 200
- p95 and p99 thresholds are declared
- ≥ 60 requests with p95 < 1000 ms
- At least 60 check() calls pass
k6 load testing · Performance Testing · Foundations