Understanding metrics: average vs median vs percentiles

Understanding metrics: average vs median vs percentiles

Such notations are widely used in analytic and monitoring tools like Graphana or Newrelic, most of the time in the context of measuring response time, latency, throughput, or similar metrics. Lets look in each of them:

Average - arithmetic mean: sum up all values and divide this total number by number of elements.

Median (or p50) - sort all given values by value and pick halfway point. Lets say if we have p50 as 219ms it means that 50% of monitored requests for the given period were completed in 219ms or less.

P90 (or 90th percentile) - same as p50 but in this case it is 90% of requests.  

Practical recommendation

Screenshot-2021-03-05-at-17.27.50
As you can see on that example difference between P50 and Avr is quite big and not that obvious.

If you are going to use captured metrics for performance analysis, is better to ditch off Avg metrics altogether and stick to P* one.