#[non_exhaustive]pub struct LatencyMetrics {
pub interval: Duration,
pub last: Duration,
pub histogram: Histogram,
pub last_sample: Option<Instant>,
pub stalls: u64,
pub stall_duration: Duration,
pub stalled: bool,
}Expand description
Snapshot of an arbiter’s scheduling latency.
The arbiter runs a task that sleeps for interval on the runtime timer
wheel and records how late it wakes up. Lateness is measured from the
deadline of the wheel, which rounds interval up to the wheel granularity.
It includes the time the runtime spent running other tasks and handling
driver events, and the timer’s own wake-up latency.
Fields are sampled independently and may be slightly inconsistent during
concurrent updates.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.interval: DurationSampling interval.
last: DurationLateness of the most recent sample, or zero before the first sample.
histogram: HistogramLateness of all samples.
last_sample: Option<Instant>Time of the most recent sample, None if no sample has been recorded.
A time much older than interval means the arbiter is blocked.
stalls: u64Number of stalls detected by the watchdog.
An arbiter is stalled when its pending sample is late by more than
the ping_threshold.
stall_duration: DurationTotal lateness accumulated by recovered stalls.
Each recovery contributes the lateness of the sample that ended the stall. A stall still in progress is not included.
stalled: boolWhether the arbiter is currently stalled.