pub struct StreamStats {
pub pushed: u64,
pub accepted: u64,
pub yielded: u64,
pub dropped_newest: u64,
pub dropped_oldest: u64,
pub overflow_errors: u64,
pub rejected: u64,
pub timeouts: u64,
pub timed_out: u64,
pub blocked: u64,
pub closed: bool,
pub cancelled: bool,
}Expand description
Lifetime counters observed on a stream spine.
Every field accumulates over the life of the stream and is snapshotted by
StreamValue::stats; the two boolean flags record terminal state. The
counters are advanced by the queue as packets are pushed, yielded, dropped,
or rejected, giving a behavioral record of how backpressure played out.
Fields§
§pushed: u64Total packets handed to the spine via push, regardless of outcome.
accepted: u64Packets admitted to the queue (excludes drops, rejects, and closed pushes).
yielded: u64Packets pulled out of the spine and handed to a consumer.
dropped_newest: u64Packets dropped on overflow under the drop-newest policy.
dropped_oldest: u64Packets evicted from the front on overflow under the drop-oldest policy.
overflow_errors: u64Overflows that occurred while the error policy was in force.
rejected: u64Pushes refused (returned as PushResult::Rejected).
timeouts: u64Timed waits that elapsed without a packet becoming available.
timed_out: u64Timed pulls that returned empty because the wait timed out.
blocked: u64Pulls that had to block waiting for a packet.
closed: boolWhether the stream has been closed to further input.
cancelled: boolWhether the stream was cancelled (closed and drained of buffered items).
Trait Implementations§
Source§impl Clone for StreamStats
impl Clone for StreamStats
Source§fn clone(&self) -> StreamStats
fn clone(&self) -> StreamStats
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StreamStats
impl Debug for StreamStats
Source§impl Default for StreamStats
impl Default for StreamStats
Source§fn default() -> StreamStats
fn default() -> StreamStats
impl Eq for StreamStats
Source§impl PartialEq for StreamStats
impl PartialEq for StreamStats
Source§fn eq(&self, other: &StreamStats) -> bool
fn eq(&self, other: &StreamStats) -> bool
self and other values to be equal, and is used by ==.