Full name: Host-side end-to-end latency empirical cumulative distribution function (ECDF).
Definition
A host-side end-to-end latency is a duration that the host, the computer that starts an operation on a device, times with its own clock: from the host’s first action, such as its first write of an update, to its receipt of the final acknowledgment, the device’s message confirming completion. It includes host scheduling, radio transport, device work and the acknowledgment’s return. An ECDF §11.17 (empirical cumulative distribution function) of such latencies is a curve whose height above each time is the fraction of trials whose latency is at most .
Where it fits
Main entry: Estimand and estimator (§11.2).
The estimand and estimator entry separates the quantity a study sets out to learn from the calculation that approximates it. For a latency, the estimand is fixed by the timing endpoints §18.1.6, the events that start and stop the timer, and by which trials are counted. A host-side latency measures how long the host waits. It is not the device’s execution time §9.32, the time the device’s processor spends on the work. All numbers in this entry are invented.
Pairing is the Bluetooth procedure in which two devices that share no secret create keys to encrypt their link. Bonding §7.18 stores those keys, so that later connections are encrypted without pairing again. When the device accepts writes only over an encrypted link, a host meeting the device for the first time must pair before its writes are accepted, and pairing may wait for a person, for example one who confirms that two six-digit numbers match. Whether pairing appears in the measurement depends on the endpoints. Let pairing take 2 s and the update, from first write to final acknowledgment, take 0.1 s. If pairing ends before the first write, the latency is 0.1 s whether or not the devices were bonded before. If the timer starts when a person asks for the update, before pairing, the latency is s.
Mixing first-time and bonded trials in one curve hides the difference. Take 30 trials: 25 already bonded at 0.1 s and 5 with pairing inside the window at 2.1 s. The ECDF jumps from 0 to at 0.1 s, stays flat until 2.1 s and then jumps to 1. The median §11.13 is 0.1 s. The 90th percentile §11.16 is the smallest latency with at least trials at or below it; the 27th of the sorted latencies is one of the five slow trials, so the 90th percentile is 2.1 s. The mean is s, a latency that no trial had.
Limits and common mistakes
A timer that starts at the first write leaves out setup that a user experiences as part of installing the update, such as connecting and pairing. Name every phase left out next to the figure.
Time spent waiting for a person measures the person, not the system. Its distribution is wide and has a long tail, so a curve that mixes it with automated transport must say so.
With 30 trials, the sample 99th percentile is simply the largest latency, because it needs at least trials at or below it, which means all 30. One trial decides it.
Latencies of another system, measured between other endpoints over another link, do not form a matched comparison just because both axes are in seconds. A matched comparison holds everything fixed except the system being compared.
Questions answered
What changes if the peer must pair for the first time?
What changes depends on whether pairing falls inside the measured window: if it does, every first-time trial gains the pairing time; if pairing ends before the timer starts, the measured latency does not change, but the measurement no longer covers everything a first-time user waits through. Pairing is the Bluetooth procedure in which two devices with no shared secret create keys to encrypt their link; a peer that is already bonded has stored such keys and skips pairing. With pairing at 2 s and an update window of 0.1 s, a window that starts before pairing measures s, and a window that starts at the host’s first write measures 0.1 s.
Pairing can also change the state that later work depends on, for example whether the device accepts writes that require an encrypted link. Report first-time and bonded trials as separate groups, with separate curves. Pairing that waits for a person has a different and far more variable distribution than automated transport, and one pooled curve hides that difference: with 25 bonded trials at 0.1 s and 5 first-time trials at 2.1 s, the median is 0.1 s and the 90th percentile is 2.1 s.
Related entries: Empirical cumulative distribution function (ECDF) (§11.17), Quantile and percentile (§11.16), External validity (§11.44), Pairing (§7.17), Bonding (§7.18), ECDF and reading a cumulative latency curve (§18.1.9), Timing endpoints and inclusive versus exclusive windows (§18.1.6).