Skip to main content

Counters

Struct Counters 

Source
#[non_exhaustive]
pub struct Counters {
Show 16 fields pub framers_created: u64, pub framer_header_polls: u64, pub framer_object_polls: u64, pub control_parsers_created: u64, pub datagram_headers_decoded: u64, pub egress_items_queued: u64, pub objects_elided: u64, pub object_ids_rewritten: u64, pub units_delayed: u64, pub objects_truncated: u64, pub actions_refused: u64, pub streams_not_shapeable: u64, pub objects_not_addressable: u64, pub control_frames_not_decodable: u64, pub release_error_ns: u64, pub release_errors: ReleaseErrors,
}
Expand description

A snapshot of one session’s slow-path counters.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§framers_created: u64

ObjectFramer instances created.

§framer_header_polls: u64

ObjectFramer::poll_header calls.

§framer_object_polls: u64

ObjectFramer::poll_object calls.

§control_parsers_created: u64

ControlStreamParser constructions.

§datagram_headers_decoded: u64

AnyDatagramHeader::decode call sites entered.

§egress_items_queued: u64

Units pushed onto a per-stream pending queue.

§objects_elided: u64

Objects removed by DropMode::Elide.

§object_ids_rewritten: u64

Elide fix-ups written: one leading Object ID varint on a subgroup stream, one re-encoded framing on a fetch stream. Counted only where the bytes actually moved — a survivor that already said the right thing is forwarded untouched and counted nowhere.

§units_delayed: u64

Units deferred by Action::Delay, counted once each at the decision.

Units, not objects, and the name is the whole statement of the difference: a delay is honoured at the control site as well as the object site, so a deferred SUBSCRIBE is one of these. The field below is named for objects because a truncation is refused on a control stream and can only ever land on one.

Counted where the decision was taken rather than where the unit came back out, so one still sitting in a queue when the session ends is already here. Self::release_errors is the other half — what was released, and how late.

Not Self::egress_items_queued, which counts every push, stream headers and elided ordering slots included; that figure is larger than this one on any session that forwards at all.

§objects_truncated: u64

Objects cut short by Action::Truncate, counted once each.

Applied truncations only. An attempt refused for an out-of-range error code, or made at a site that carries no truncation, moves Self::actions_refused and never this.

§actions_refused: u64

Actions refused, counted per attempt.

§streams_not_shapeable: u64

Streams the framer stopped parsing.

§objects_not_addressable: u64

Objects streamed through without being addressable. The running total behind ImpairmentKind::ObjectNotAddressable, which is emitted only once per stream.

§control_frames_not_decodable: u64

Control frames the decoder refused, which the proxy forwarded without being able to read. The running total behind ImpairmentKind::ControlFrameNotDecodable, which is emitted only once per control stream direction.

Zero on a session with no observer and no control interest, which builds no parser and reads no frame — the same byte-pump case control_parsers_created reports.

§release_error_ns: u64

Accumulated actual_release - release_at, in nanoseconds. The raw sum, kept for callers that want it; Self::release_errors is the useful form.

§release_errors: ReleaseErrors

Distribution of the above: p50, p95 and max lateness.

Trait Implementations§

Source§

impl Clone for Counters

Source§

fn clone(&self) -> Counters

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 Copy for Counters

Source§

impl Debug for Counters

Source§

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

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

impl Default for Counters

Source§

fn default() -> Counters

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

impl Eq for Counters

Source§

impl PartialEq for Counters

Source§

fn eq(&self, other: &Counters) -> 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 Counters

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