Manoj Perla.ENGINEERING NOTES & OPEN SOURCE
All writing

Why P90 Tells You More Than Average API Response Time

Mean API latency often hides slow-user experiences. Percentiles such as P90 provide a clearer view of performance distribution and regression.

Key takeaway

Use percentiles alongside sample counts and workload context. P90 is useful, but it is not a universal performance target.

An average compresses an entire response-time distribution into one number. A percentile answers a different question: how much of the observed traffic completed within a given latency? P50 describes the middle of the distribution; higher percentiles help reveal slower requests.

A small example makes the distinction clear

The following numbers are illustrative, not measurements from a production service.

Samples (ms)MeanP50P90
100, 110, 120, 130, 2000492 ms120 ms1,252 ms

Here P90 uses linear interpolation at index (n − 1) × 0.90. With only five observations, the result is sensitive to both the outlier and the percentile method. The example explains the calculation; it is not enough evidence for a service-level conclusion. Use the same percentile calculation method when comparing runs, and state that method alongside the sample count.

Choose the metric for the decision

P50 helps describe typical latency. P90, P95, or P99 can reveal different parts of the tail. The right threshold depends on the user journey and service objective. The mean remains useful for aggregate comparisons, while the maximum helps identify extremes but is sensitive to sample size.

Compare like with like

Keep endpoint, method, region, measurement definition, and workload comparable. A shift in traffic mix can change an aggregate percentile without any individual endpoint slowing down. Include failed requests and timeouts in the broader performance review rather than allowing missing timings to imply healthy behavior.

The comparator groups raw samples by endpoint, method, and region. It reports descriptive changes, flags small groups, and does not claim statistical significance. A zero baseline cannot produce a meaningful percentage delta; a new endpoint needs its own baseline.

Do not average percentiles

Averaging daily P90 values does not produce the P90 for the combined period. Recompute it from pooled raw samples, or use compatible mergeable distribution data with a documented method. Keep sample counts visible so a low-volume day does not carry the same apparent weight as a busy one.

Next step: Compare baseline and current samples

Revised : Labelled the sample data as illustrative and clarified how percentile methods affect comparisons.

From Test Automation to Quality Engineering Platforms

Mature test automation should evolve from scripts and frameworks into shared engineering platforms that provide quality, performance, observability and delivery intelligence.

Read essay · 2 min

What We Learned Migrating Large UI Automation Suites to Playwright

Lessons from using an AI-assisted, architecture-first approach to migrate thousands of tests toward Playwright without treating migration as simple code translation.

Read essay · 2 min
Back to all writing