"Average response time: 180 ms." It sounds healthy, and it can hide a service where one user in ten waits three seconds. This is why load testing reports percentiles, and why you should set your goals with them.
The problem with averages
Imagine 100 requests: 90 take 100 ms and 10 take 900 ms. The average is 180 ms. Nobody actually experienced 180 ms: most people had a fast response and some had a slow one. The average blends the two into a number that describes neither.
Worse, averages move very little when the slow group grows. Double the number of slow requests and the average rises to 260 ms, which still looks fine on a dashboard.
What a percentile tells you
A percentile answers: "how long did the slowest X% of requests take?"
- p50 (median): half of the requests were faster than this. The typical experience.
- p95: 95% were faster; 1 in 20 was slower. Where real users start to notice.
- p99: 1 in 100 was slower. Important at scale: a page that makes 20 API calls hits the p99 of at least one of them on almost every page view.
In the example above, the p50 is 100 ms and the p95 is 900 ms. Those two numbers tell the true story.
Why the tail matters more under load
When a system nears its capacity, the median often stays flat while the tail grows: requests start waiting in queues for a database connection, a worker, or a lock. A rising p95 or p99 is usually the first sign that you are near the limit, well before the average or the error rate changes.
Setting good thresholds
- Use p95 as your main latency goal, for example p95 under 500 ms.
- Add p99 for critical paths like checkout or login.
- Always pair latency with an error-rate goal: a test that "passes" latency because failing requests return quickly is not a pass.
- Set goals per step where they differ: a search can be allowed more time than a page view.
Compare runs, not single numbers
A p95 of 420 ms means little alone. Compared with last week's run of the same test at 310 ms, it is a 35% regression worth investigating before it reaches users. Keep a baseline run for each test and compare every new run against it.
Hoofbeat reports p50, p95 and p99 per step, lets you set them as pass/fail thresholds, and marks regressions against the baseline you choose.