Definition
A boot timeline is a figure that places the milestones of a device’s start-up, such as the moment its radio is ready, along a time axis. A boot timeline with two clocks has two such axes: one for milestones that the device times with its own clock, and one for milestones that an outside computer observes and times with a different clock. Min–max whiskers are lines drawn through a marker from the smallest to the largest value seen over repeated boots. The marker is usually the median §11.13, the middle value.
Where it fits
Main entry: Clock domain (§13.29).
The clock domain entry explains that two timestamps, meaning recorded clock readings, can be subtracted only if they come from one clock, or from clocks whose relation has been measured. Each axis of this figure is its own clock domain, the set of timestamps that share one clock. The device’s clock typically counts from the device’s start, and the outside computer’s clock from an unrelated moment. So the distance between two markers on one axis is a duration, and the distance between markers on different axes is not.
Suppose that on the device’s clock setup ends at 5 milliseconds (ms) and the first radio packet is sent at 12 ms. The wait between them is ms. The outside computer stamps the reception of that packet at 105 ms on its own clock. The subtraction ms mixes two clocks and measures nothing. If the computer also saw the device start, at 90 ms on its own clock, then the packet was received ms after the start, and that value can be set beside the device’s 12 ms. All data in this entry’s examples are invented.
Limits and common mistakes
Min–max whiskers are not a confidence interval §11.18, which is a range computed so that, in a stated share of repeated experiments, it contains the true value of a quantity. If three boots reach a milestone at 8, 10 and 15 ms, the marker sits at the median, 10 ms, and the whiskers run from 8 to 15 ms. They show the range of those boots, from the smallest value to the largest, not how well the median is known. Adding boots can never narrow the whiskers, whereas a confidence interval usually narrows as boots are added.
Lining up the two clocks at a shared event leaves two errors: the delay in observing that event, and the difference between the rates of the two clocks.
The distance between two median markers is a difference of medians §18.1.14. In general it is not the median of the per-boot interval between the two milestones, because the middle boot can be a different boot at each milestone.
Different kinds of boot, such as the first start after the storage was erased and a restart with stored data, can do different amounts of work, so they must be drawn separately.
A boot that never reached a milestone adds nothing to that milestone’s marker, so each marker describes only the boots that got that far. The caption should give the number of boots that did not.
Questions answered
Why is advertising API completion not first advertisement received?
Advertising API completion and first advertisement received are two different events on two different devices, with several steps in between. Advertising is how a Bluetooth Low Energy (BLE) §7.1 device announces itself: it repeatedly broadcasts short packets. In the form that the Bluetooth specification calls legacy advertising, these packets go out on one, two or all three of the radio channels that the specification sets aside as primary advertising channels. “Advertising API completion” is the moment when the function that starts advertising returns on the device. A successful return says that the device’s software has accepted the request. It does not say that a packet has been sent. “First advertisement received” is the moment when a second device, the scanner, has received one of those packets and its software has recorded the time.
Four steps lie between the request to advertise and the second moment.
The device’s controller, the part that operates the radio, sends the first packet. The Bluetooth specification makes the controller responsible for the timing of advertisements, so the return of the function does not fix that instant.
The scanner must be listening on the same channel at that instant. It listens on one channel at a time and need not listen continuously, so it can miss the first packet and catch a later one.
The scanner’s controller reports the packet to the scanner’s software, and the controller may queue such reports before it delivers them.
That software reads its own clock, not the device’s.
The time from the first moment to the second therefore varies from one start-up of the device to the next, and the two moments are timed by different clocks.
Related entries: Median (§11.13), Confidence interval (§11.18), Peak versus retained memory (§11.37), Advertising and scanning (§7.3), Confidence intervals, whiskers, and uncertainty semantics (§18.1.11), Clock conversion, resolution, and accuracy (§18.1.2). Further reading: [75, 93].