TrustCyber / machine
/research/allow-hold-deny/lessons/08-response-time/index.mdtext/markdown3.3 KB ~834 tokens
Open raw

What does the clock measure?

Distinguish one response from a scored loop and an entire session.

Canonical HTML page

Learning objective

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.

Interactive activities

Use the canonical HTML page for controls, live results and reset buttons.

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.

Reference material

Lesson navigation

Companion navigation