pub struct StreamMetrics {Show 17 fields
pub name: Option<String>,
pub items_processed: u64,
pub bytes_processed: u64,
pub processing_time: Duration,
pub errors: u64,
pub start_time: Option<Instant>,
pub retries: u64,
pub items_per_second: f64,
pub bytes_per_second: f64,
pub average_item_size: f64,
pub peak_processing_time: Duration,
pub last_activity: Option<Instant>,
pub consecutive_errors: u64,
pub error_rate: f64,
pub backpressure_events: u64,
pub queue_depth: u64,
pub health_thresholds: HealthThresholds,
}Expand description
Metrics collected for rs2_stream operations
Fields§
§name: Option<String>§items_processed: u64§bytes_processed: u64§processing_time: Duration§errors: u64§start_time: Option<Instant>§retries: u64§items_per_second: f64§bytes_per_second: f64§average_item_size: f64§peak_processing_time: Duration§last_activity: Option<Instant>§consecutive_errors: u64§error_rate: f64§backpressure_events: u64§queue_depth: u64§health_thresholds: HealthThresholdsImplementations§
Source§impl StreamMetrics
impl StreamMetrics
pub fn new() -> Self
pub fn with_name(self, name: String) -> Self
pub fn set_name(&mut self, name: String)
pub fn with_health_thresholds(self, thresholds: HealthThresholds) -> Self
pub fn set_health_thresholds(&mut self, thresholds: HealthThresholds)
pub fn record_item(&mut self, size_bytes: u64)
pub fn record_error(&mut self)
pub fn record_retry(&mut self)
pub fn record_processing_time(&mut self, duration: Duration)
pub fn record_backpressure(&mut self)
pub fn update_queue_depth(&mut self, depth: u64)
pub fn finalize(&mut self)
pub fn throughput_items_per_sec(&self) -> f64
pub fn throughput_bytes_per_sec(&self) -> f64
pub fn update_derived_metrics(&mut self)
pub fn is_healthy(&self) -> bool
pub fn throughput_summary(&self) -> String
pub fn throughput_summary_processing_time(&self) -> String
Trait Implementations§
Source§impl Clone for StreamMetrics
impl Clone for StreamMetrics
Source§fn clone(&self) -> StreamMetrics
fn clone(&self) -> StreamMetrics
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StreamMetrics
impl Debug for StreamMetrics
Source§impl Default for StreamMetrics
impl Default for StreamMetrics
Source§fn default() -> StreamMetrics
fn default() -> StreamMetrics
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for StreamMetrics
impl RefUnwindSafe for StreamMetrics
impl Send for StreamMetrics
impl Sync for StreamMetrics
impl Unpin for StreamMetrics
impl UnwindSafe for StreamMetrics
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