pub struct StreamMetrics {
pub items_processed: u64,
pub bytes_processed: u64,
pub processing_time: Duration,
pub errors: u64,
pub start_time: Option<Instant>,
}Expand description
Metrics collected for rs2_stream operations
Fields§
§items_processed: u64§bytes_processed: u64§processing_time: Duration§errors: u64§start_time: Option<Instant>Implementations§
Source§impl StreamMetrics
impl StreamMetrics
pub fn new() -> Self
pub fn record_item(&mut self, size_bytes: u64)
pub fn record_error(&mut self)
pub fn finalize(&mut self)
pub fn throughput_items_per_sec(&self) -> f64
pub fn throughput_bytes_per_sec(&self) -> f64
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