Skip to main content

SessionStats

Struct SessionStats 

Source
pub struct SessionStats {
    pub objects_seen: u64,
    pub objects_dropped: u64,
    pub objects_expired: u64,
    pub streams_reset: u64,
    pub bytes_shaped: u64,
}
Expand description

What every session this proxy has run did, added up — the flat form of ProxyStats.

Every field is derived at snapshot time, from ProxyStats::per_leg or from the class rows, so it cannot drift from the figures beside it. The two arrival cells are what the totals below are summed from — the two points a byte enters this proxy, where each byte is counted exactly once. Summing all four cells would count every byte twice, once where it was read and once where it was written.

§Every field here has a producer, and the three that did not are gone

Every figure is derived at snapshot time from the per-leg cells and the class rows, and those are written only by the shaping path. So a figure counting something a hook does — which needs no ShapeProfile, while everything here is gated on one — could not have been a complete count in this type however it was wired, and two of the three were exactly that. Self::objects_dropped below already said where that kind of figure lives: an object a hook elided is counted on Counters, and a unit a hook delayed and an object it truncated are counted beside it there now. The third was a Duration total; see ClassStats for why no statistic on this page is one.

Fields§

§objects_seen: u64

Hook-visible units the classifier saw, over every session. Objects only, for the reason ShapeStats::objects_seen gives.

§objects_dropped: u64

Objects discarded by a policy, summed over every class row.

Today that means Overflow::DropTail and nothing else: an object a hook elided is the hook’s decision rather than the shaper’s and is counted by Counters::objects_elided on the session that ran the hook.

§objects_expired: u64

Objects whose max_hold elapsed under Expiry::ResetStream. Zero under the default Expiry::Deliver, which has no producer — correctly, because that arm delivers the object instead.

§streams_reset: u64

Destination streams abandoned by an overflow or expiry policy.

Shaping only. A stream reset by a hook, by a peer, or by a mirrored teardown is not counted here — those are not decisions this profile took, and folding them in would make a configured Overflow::ResetStream impossible to distinguish from a client that went away.

§bytes_shaped: u64

Bytes the shaper accounted for — every byte it saw, whether a bucket granted it, a policy dropped it, or it was unshapeable.

Trait Implementations§

Source§

impl Clone for SessionStats

Source§

fn clone(&self) -> SessionStats

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for SessionStats

Source§

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

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

impl Default for SessionStats

Source§

fn default() -> SessionStats

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

impl Eq for SessionStats

Source§

impl PartialEq for SessionStats

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for SessionStats

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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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 = !

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more