Section 18.2.21

Figure 12a: peer-visible interval contrasts

Definition

A peer-visible interval is the time between two events observed from the peer side of a connection. An interval contrast compares durations under two conditions. For each run order separately, subtract the disabled median §11.13 from the enabled median. A positive value means the enabled group had the longer observed median in that order. Work that begins after the interval ends cannot lengthen it.

Where it fits

Main entry: Causal inference (§11.11).

The causal inference entry explains when a difference between conditions supports a claim about a cause. Two of its requirements matter here: the compared conditions must differ only in the treatment, the change under study, and a cause must come before its effect. Time order alone settles whether a later piece of work can be the cause. Put both on one timeline. Let the interval run from 0 to 10 ms, and let a hook, a function that the system calls at a fixed point §3.22 of its processing, run from 12 to 15 ms. The interval lasts 10−0=1010 - 0 = 10 ms and is over before the hook starts, so nothing the hook does can lengthen it. Adding the hook’s 15−12=315 - 12 = 3 ms to the 10 ms would count work outside the measured window as if it were inside it.

Establish the order from the protocol when possible. Suppose a peer first finishes pairing, then requests an application channel. A timer stopped at pairing completion measures setup before the channel request. The later callback §14.22 that handles the new channel lies outside that interval, as does any subsequent closure. If the order must instead be inferred from timestamps on different devices, relate their clocks first. Each clock has its own zero point and rate. A converted callback start 2 ms after the interval ended establishes the order only when the total timing uncertainty is less than 2 ms. Check where the code took each timestamp so that its label names the event it actually observed.

In a series of trials, later is relative to one interval. The hook that follows interval kk comes before interval k+1k + 1. If its work keeps the processor busy, or delays the device’s next radio exchange, interval k+1k + 1 can be longer. This is a carryover effect: one trial’s work changes the next trial’s measurement. Enabling a feature can also change work before the interval: setup when the connection opens, memory reserved in advance, extra timing code, or a different placement of code in memory. Each of these precedes or overlaps the interval and can explain a contrast that the later hook cannot. All numbers in this example are invented.

Limits and common mistakes

A peer-visible interval contains radio waiting. In Bluetooth Low Energy (BLE) §7.1, two connected devices exchange packets only during connection events, short bursts of exchange that recur once per connection interval §7.7, for example every 7.5 ms. A reply that becomes ready 0.1 ms after a connection event has ended waits for the next one. A small change in the device’s work can therefore appear at the peer as a whole connection interval, or as no change at all.

A difference of medians §18.1.14 describes the two sets of defined intervals. It is not the time that the hook’s instructions take.

Time order only rules causes out. A candidate cause that comes before the interval becomes an established cause only when an intervention that changes that one candidate, and nothing else, changes the interval.

Questions answered

Can a later event cause an earlier interval to take longer?

No: within one run, an event that starts after an interval has ended cannot make that interval longer, because a cause must come before its effect and the interval’s length is fixed when the interval ends. An interval from 0 to 10 ms lasts 10 ms whatever a function that runs from 12 to 15 ms does. Three cautions keep this answer correct.

Related entries: Estimand and estimator (§11.2), Clock domain (§13.29), Median (§11.13), Connection interval (§7.7), Confounding (§11.10).