Skip to main content

QueueStats

Struct QueueStats 

Source
pub struct QueueStats {
Show 13 fields pub queue: String, pub weight: u32, pub unfinished_jobs: u64, pub max_unfinished_jobs: Option<u64>, pub by_state: Vec<(String, i64)>, pub counts_approximate: bool, pub arrival_rate: f64, pub drain_rate: f64, pub time_to_drain_ms: Option<i64>, pub oldest_available_ms: Option<i64>, pub quiet_groups: QuietGroupMetrics, pub paused: bool, pub memory_bytes: Option<u64>,
}

Fields§

§queue: String§weight: u32

Fleet policy used by the atomic gate to choose BETWEEN queues. This is unrelated to an envelope’s rate-budget weight, which prices one job after a queue wins.

§unfinished_jobs: u64

Exact O(1) backlog count used by enqueue backpressure. Unlike by_state, this is never approximate and excludes every terminal state.

§max_unfinished_jobs: Option<u64>

None disables producer backpressure for this queue. Zero is a useful intake kill switch and is deliberately distinct from queue pause (which stops drain).

§by_state: Vec<(String, i64)>§counts_approximate: bool§arrival_rate: f64

backlog metrics jobs/sec over the last minute — a READ, not a Prometheus recording rule.

§drain_rate: f64§time_to_drain_ms: Option<i64>

None when arrival >= drain: THIS is the alert condition, not depth.

§oldest_available_ms: Option<i64>

backlog metrics store-clock age of the oldest job that is currently available. None means the queue has no available job. This is an age rather than the underlying timestamp so callers can compare it directly with a latency SLO.

§quiet_groups: QuietGroupMetrics

backlog metrics the same four backlog signals after partitions with disproportionate in-flight work are excluded. One tenant’s flood must not page an operator about every other tenant’s latency.

§paused: bool§memory_bytes: Option<u64>

Last bounded, explicitly sampled storage estimate. Never computed synchronously by this read; None means this backend or queue has no sample yet.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.