Skip to main content

queue_telemetry

Function queue_telemetry 

Source
pub fn queue_telemetry() -> QueueTelemetry
Expand description

Snapshot the current queue telemetry counters.

This is a lock-free, best-effort snapshot: the three counters are loaded independently, so under concurrent enqueue/process/drop the derived in_flight may transiently disagree with any single instantaneous state. The skew is bounded and one-directional — enqueued is loaded first (the oldest value) and processed/dropped last (the newest), so in_flight can only underestimate the true backlog (floored at 0 by the saturating subtraction), never overestimate it. That is the safe bias for the consumers (load-governor pressure classification, backpressure), which read it per-frame and recover on the next interval; do not treat it as an exact, linearizable count.