pub struct StreamingStats {
pub chunks_processed: usize,
pub chunks_dropped: usize,
pub backpressure_events: usize,
pub late_events_dropped: usize,
pub total_processing_time_ms: u64,
pub total_elements_processed: usize,
}Expand description
Runtime statistics for a stream processing session.
Fields§
§chunks_processed: usizeNumber of chunks that were successfully processed.
chunks_dropped: usizeNumber of chunks that were dropped (e.g. due to backpressure or late arrival).
backpressure_events: usizeNumber of times backpressure was triggered.
late_events_dropped: usizeNumber of events dropped because they were late (beyond the watermark).
total_processing_time_ms: u64Total wall-clock processing time in milliseconds.
total_elements_processed: usizeTotal number of individual data elements processed across all chunks.
Implementations§
Source§impl StreamingStats
impl StreamingStats
Sourcepub fn average_latency_ms(&self) -> f64
pub fn average_latency_ms(&self) -> f64
Average latency per processed chunk in milliseconds.
Returns 0.0 when no chunks have been processed.
Sourcepub fn drop_rate(&self) -> f64
pub fn drop_rate(&self) -> f64
Fraction of chunks that were dropped: dropped / (processed + dropped).
Returns 0.0 when no chunks have been seen at all.
Sourcepub fn throughput_chunks_per_sec(&self) -> f64
pub fn throughput_chunks_per_sec(&self) -> f64
Throughput in chunks per second.
Returns 0.0 when no processing time has been recorded.
Sourcepub fn merge(&mut self, other: &StreamingStats)
pub fn merge(&mut self, other: &StreamingStats)
Merge another StreamingStats into this one by summing all fields.
Trait Implementations§
Source§impl Clone for StreamingStats
impl Clone for StreamingStats
Source§fn clone(&self) -> StreamingStats
fn clone(&self) -> StreamingStats
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StreamingStats
impl Debug for StreamingStats
Source§impl Default for StreamingStats
impl Default for StreamingStats
Source§fn default() -> StreamingStats
fn default() -> StreamingStats
Auto Trait Implementations§
impl Freeze for StreamingStats
impl RefUnwindSafe for StreamingStats
impl Send for StreamingStats
impl Sync for StreamingStats
impl Unpin for StreamingStats
impl UnsafeUnpin for StreamingStats
impl UnwindSafe for StreamingStats
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more