liveBook · Manning

Mean

As explained in Latency

Execution latency is the elapsed time required for a computation or instruction sequence to complete.

Mean latency is the average elapsed time between a defined cause and its observed effect. That effect might be an HTTP response received by a client or a request completed by a server. The measurement boundary matters: a server-side average does not necessarily describe the delay a user experiences. section 1.1 section 2.5

A mean is useful as a compact summary, but latency varies with workload and system state. Reporting only the mean can hide slow requests. Minimum and maximum values do not fix that problem: they describe extremes rather than the shape of the distribution. section 2.2

For a useful latency report:

  • Define the operation and measure from the perspective that matters, such as the user or an API caller. section 2.5
  • Report the mean alongside latency percentiles, such as the 95th, 99th, and 99.9th, to expose the tail. section 2.2
  • Separate queue waiting, processing, and time spent waiting for external resources when investigating an asynchronous operation. section 10.7.2
  • Control the measurement environment: instrumentation and a colocated load generator can themselves affect results. section 2.5

A single number is not the whole result

A reported 50 ms HTTP response time may be an average. It does not say how often requests take substantially longer. Check the latency distribution before treating 50 ms as the experience of every caller. section 2.2

How Latency covers it

How deep it goes
Explains the mean’s limits through latency variability and percentiles; does not develop a statistical calculation procedure.
Examples
Uses a 50 ms HTTP response-time claim and 95th, 99th, and 99.9th percentiles to distinguish a summary from a distribution.
What it assumes
Defines latency as a measured time delay and builds from familiar response-time examples.
What you can do after
Diagnose/debug with it by checking percentile latency and measurement boundaries before relying on an average.
How it connects
Connects average latency to throughput, latency distributions, tail latency, and percentile measurements.

Also explained in

Compare how 29 books explain mean →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Latency. The section links point to the parts of the book it draws on.