Expand description
2026-09-26: Lock-free instruments: counters, gauges and power-of-two
histograms. All are const-constructible, so a whole instrument set can
live in a static without a lazy initialiser.
Every instrument is a set of independent relaxed atomics, so a reader may
see a histogram’s count and buckets disagree by the observations in
flight. Values that must be read together (a device sample) go through
crate::seqcell::SeqCell instead. Recording is not level-gated here;
crate::hub::Telemetry does that.
Owner: telemetry. Invariants: recording never allocates.
Structs§
- Counter
- 2026-09-26: Monotonic count.
- Gauge
- 2026-09-26: Last-value integer gauge.
- Gauge
F64 - 2026-09-26: Last-value float gauge: the f64’s bits in one atomic word.
Noneis stored as NaN, so an unmeasured ratio reads asNone, not 0. - Histogram
- 2026-09-26: A histogram with
Nfinite power-of-two buckets plus+Inf. - Histogram
Snapshot - 2026-09-26: A copy of a histogram’s state, cumulative:
cumulative[i]counts values<= upper_bounds[i].
Type Aliases§
- Count
Histogram - 2026-09-26: Small counts (batch rows, prefilling sequences), bounds 1 to 1024.
- Millijoule
Histogram - 2026-09-26: Millijoules, bounds 1 mJ to ~16.8 kJ.
- Nanos
Histogram - 2026-09-26: Nanosecond durations, bounds 1.024 µs to ~68.7 s.