k6 load testing

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.

BASE_URL
/api/practice
Console app
/lab/performance-testing-understand-percentiles-p95-p99

Your starter code already declares BASE_URL — call the API relative to it.

Objective

Express latency goals as percentiles instead of averages.

Your task

  1. 1Set options { vus: 5, iterations: 60 }.
  2. 2GET BASE_URL + "/perf/checkout" and check status 200.
  3. 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