#[non_exhaustive]pub struct Stats {Show 13 fields
pub sent: u64,
pub received: u64,
pub undecodable: u64,
pub refused: u64,
pub accepted_with_warnings: u64,
pub sent_with_warnings: u64,
pub duplicates: u64,
pub acked: u64,
pub nacked: u64,
pub ack_timeouts: u64,
pub unmatched_acks: u64,
pub ack_latency_total_ms: u64,
pub ack_latency_max_ms: u64,
}Expand description
What a session has done, for an operator rather than an application.
An application reacts to events; an operator asks a fleet which gateway is being
refused, and how slow is the slowest peer? — and the engine that saw it is the only
place the answer exists. Counters rather than a Metrics trait: a hook every consumer
must implement to learn a number the session already has is a hook.
Read them with stats() and push them wherever the host’s metrics go.
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.sent: u64Messages put on the wire, ReceptionStatus included.
received: u64Frames fed in, whether or not they decoded.
undecodable: u64Frames that did not decode at all.
refused: u64Inbound messages answered with something other than OK.
accepted_with_warnings: u64Inbound messages accepted with warnings — the ones worth looking at before they become refusals.
sent_with_warnings: u64Outbound messages this side sent that its own validator had something to say about.
Counted separately from the inbound ones because they mean the opposite thing: an inbound warning is a peer to talk to, an outbound one is a bug on this side that has not been refused yet.
duplicates: u64Duplicate deliveries answered again rather than processed twice.
acked: u64Outbound messages the peer accepted.
nacked: u64Outbound messages the peer refused.
ack_timeouts: u64Outbound messages nothing came back for in time.
unmatched_acks: u64Acknowledgements for something never sent, or already given up on.
ack_latency_total_ms: u64The sum of every acknowledgement round trip, in milliseconds.
A sum rather than a mean, because a sum can be added up across sessions;
mean_ack_latency_ms divides it.
ack_latency_max_ms: u64The slowest acknowledgement, in milliseconds — the number a mean hides.
Implementations§
Trait Implementations§
impl Copy for Stats
impl Eq for Stats
impl StructuralPartialEq for Stats
Auto Trait Implementations§
impl Forget for Stats
impl Freeze for Stats
impl Move for Stats
impl RefUnwindSafe for Stats
impl Send for Stats
impl Sync for Stats
impl Unpin for Stats
impl UnsafeUnpin for Stats
impl UnwindSafe for Stats
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.