Understanding metrics: average vs median vs percentiles

Such metrics widely used in analytic and monitoring tools like Graphana or Newrelic. Usually in context of response time. 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.  

Get the latest posts delivered right to your inbox.