RouterCounters

Struct RouterCounters 

Source
pub struct RouterCounters {
Show 15 fields pub routed: u64, pub delivered: u64, pub dropped: u64, pub dropped_queue_full: u64, pub dropped_all_full: u64, pub dropped_no_credit: u64, pub credit_waits: u64, pub detaches: u64, pub pressure_waits: u64, pub idle_waits: u64, pub batches: u64, pub batch_sum: u64, pub batch_max: u32, pub wake_waits: u64, pub wake_timeouts: u64,
}
Expand description

Counters returned by routing loops.

These counters are best-effort observability signals. In particular, some drop attribution is only approximate for work-queue routing because the router may fail to find any eligible destination.

Fields§

§routed: u64

Number of messages routed (i.e. consumed from the producer queue).

§delivered: u64

Total number of consumer enqueues performed.

§dropped: u64

Total number of consumer enqueue failures.

§dropped_queue_full: u64

Drops attributable to destination queue being full (best-effort, v1 fanout).

§dropped_all_full: u64

Drops attributable to no eligible consumer having space (work-queue: all full).

§dropped_no_credit: u64

Drops attributable to no eligible consumer having credit (best-effort).

§credit_waits: u64

Number of times routing was throttled due to credit exhaustion.

§detaches: u64

Number of consumer detach events.

§pressure_waits: u64

Number of times routing was throttled because consumer queues had no capacity.

§idle_waits: u64

Number of times the loop observed “no work” and invoked the wait strategy.

§batches: u64

Number of batches routed.

§batch_sum: u64

Sum of batch sizes (messages per batch).

§batch_max: u32

Maximum batch size observed.

§wake_waits: u64

Number of OS-backed wake waits performed (when BackpressurePolicy::Block is active).

§wake_timeouts: u64

Number of OS-backed wake waits that timed out.

Trait Implementations§

Source§

impl Clone for RouterCounters

Source§

fn clone(&self) -> RouterCounters

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RouterCounters

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RouterCounters

Source§

fn default() -> RouterCounters

Returns the “default value” for a type. Read more
Source§

impl PartialEq for RouterCounters

Source§

fn eq(&self, other: &RouterCounters) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for RouterCounters

Source§

impl Eq for RouterCounters

Source§

impl StructuralPartialEq for RouterCounters

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

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.