Lesson 8 of 18
What does the clock measure?
Step 8 in the guided paper walkthrough.
By the end of this lesson
Distinguish one response from a scored loop and an entire session.
Choose a timing boundary
The primary clock starts at HTTP transfer start and stops when the complete response body is received. HTTP is the request-and-response protocol used to contact a service. The interval includes transport, service waiting and required generation. Payload preparation, parsing, validation, saving and startup sit outside it.
Read a group of times
For sorted times 100, 200 and 300 milliseconds, the median is 200: the middle observation. A p95 is the 95th percentile, a value near the slower end. With the paper’s linear interpolation convention, this toy p95 is 290 milliseconds. A millisecond is one thousandth of a second.
The headline median and p95 use fully compliant responses. Summing response intervals gives a different quantity from the elapsed scored loop, which includes other work between requests. The whole session includes still more work such as practice or startup. Never substitute one scope for another.
Use the schematic to move the boundary. Its segments represent kinds of work rather than measured durations.
Go deeper: interpolated percentiles
For n sorted observations, position h = (n−1)q. Interpolate between the values at floor(h) and ceil(h). For q = 0.95 and three toy times, h = 1.9, so 200 + 0.9(300−200) = 290. The study used a monotonic clock, which measures elapsed intervals without wall-clock corrections.
Worked activity · teaching example
Read a timing timeline
Select a timing boundary. The highlighted span shows which work is included. This schematic has no measured scale.
- Startup / practice
- Prepare request
- Send / wait / receive
- Validate / score / save
Check your understanding · optional
Does a primary HTTP interval include saving the scored result to disk?
Take this forward
Next, examine the probabilities that accompany a decision.
Paper and reference material
Original paper: §III.C; companion mathematics D.11 · page 2 (new tab)
Source pages: 2
The teaching explanation and interactive examples are companion additions. Recorded study values and frozen references remain unchanged.