median
The middle value when all observations are sorted: half are faster and half are slower.
In more detail
The median is the 50th percentile. For latency it describes a typical request well but says nothing about the slow tail, which is why it is rarely the most useful number on a latency chart.
Examples
statistics.median([72, 1040]) # 556.0The median is not pulled around by a few extreme values the way a mean (average) is.Related terms
- change lead time — The time from a commit being made to that commit running in production.
- mean — The sum of all values divided by how many there are; what people usually call the average.
- percentile — The value below which a given percentage of measurements fall; p99 latency is the time 99 in 100 requests beat.
- outlier — A value far from the rest of a set of measurements, such as one incident that took days to contain when most took hours.
- tail latency — The latency of the slowest requests, measured by high percentiles such as p99.
Taught in
- DORA Metrics: Measuring Your Pipeline — Continuous Integration & Continuous Delivery Pipelines
- Throughput: Change Lead Time And Deployment Frequency — DevOps & Site Reliability Engineering
- Restoration: Failed Deployment Recovery Time — DevOps & Site Reliability Engineering
- Percentiles Rather Than Averages — DevOps & Site Reliability Engineering
- Why A Histogram Beats An Average — Full-Stack Observability: Metrics, Tracing & Logging
- Calculating Percentiles With histogram_quantile — Full-Stack Observability: Metrics, Tracing & Logging
- Dashboards That Answer Questions — Full-Stack Observability: Metrics, Tracing & Logging
- Under A Second, On Average: Histograms — Prometheus Certified Associate (PCA) Exam Prep
- One Week, Three Objectives: Final Review — Prometheus Certified Associate (PCA) Exam Prep
- SOC Operating Models, Tiers & Key Performance Metrics — Security Operations & Threat Hunting (SOC)
- Latency Numbers Every Engineer Should Know — Scalable System Design & Distributed Architecture
- Observability As A Design Input — Scalable System Design & Distributed Architecture
References
- Python docs: statistics module
- NIST/SEMATECH e-Handbook: measures of location (mean, median)
- Python statistics module: median
- Prometheus documentation: Histograms and summaries