#[non_exhaustive]pub struct StatsSnapshot { /* private fields */ }Expand description
A point-in-time, host-level rollup of this node’s stats counters, returned
by Stats::snapshot.
Every counter is summed across all broadcasts the node is tracking and split
by tier and role, plus per-tier connected-session presence. Intended for a
scrape / /metrics-style endpoint where per-broadcast cardinality is
unwanted; the per-broadcast breakdown lives on the published .stats
broadcast instead. A no-op aggregator (stats disabled) yields all zeros.
Implementations§
Source§impl StatsSnapshot
impl StatsSnapshot
Sourcepub fn traffic(&self) -> [(Tier, Role, CounterTotals); 4]
pub fn traffic(&self) -> [(Tier, Role, CounterTotals); 4]
The four (tier, role, totals) traffic rows, in a stable order
(external before internal, publisher before subscriber).
Sourcepub fn sessions(&self) -> [(Tier, SessionTotals); 2]
pub fn sessions(&self) -> [(Tier, SessionTotals); 2]
The two (tier, sessions) presence rows, external before internal.
Trait Implementations§
Source§impl Clone for StatsSnapshot
impl Clone for StatsSnapshot
Source§fn clone(&self) -> StatsSnapshot
fn clone(&self) -> StatsSnapshot
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for StatsSnapshot
Source§impl Debug for StatsSnapshot
impl Debug for StatsSnapshot
Source§impl Default for StatsSnapshot
impl Default for StatsSnapshot
Source§fn default() -> StatsSnapshot
fn default() -> StatsSnapshot
Returns the “default value” for a type. Read more
impl Eq for StatsSnapshot
Source§impl PartialEq for StatsSnapshot
impl PartialEq for StatsSnapshot
impl StructuralPartialEq for StatsSnapshot
Auto Trait Implementations§
impl Freeze for StatsSnapshot
impl RefUnwindSafe for StatsSnapshot
impl Send for StatsSnapshot
impl Sync for StatsSnapshot
impl Unpin for StatsSnapshot
impl UnsafeUnpin for StatsSnapshot
impl UnwindSafe for StatsSnapshot
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
Mutably borrows from an owned value. Read more