pub struct EventPerformanceMetrics { /* private fields */ }Expand description
Performance metrics collector for event processing
Implementations§
Source§impl EventPerformanceMetrics
impl EventPerformanceMetrics
Sourcepub async fn record_processing_time(&self, duration: Duration)
pub async fn record_processing_time(&self, duration: Duration)
Record an event processing time
Sourcepub fn record_error(&self)
pub fn record_error(&self)
Record an error
Sourcepub fn total_events(&self) -> u64
pub fn total_events(&self) -> u64
Get total events processed
Sourcepub fn total_errors(&self) -> u64
pub fn total_errors(&self) -> u64
Get total errors
Sourcepub fn error_rate(&self) -> f64
pub fn error_rate(&self) -> f64
Get error rate as percentage
Sourcepub async fn avg_processing_time(&self) -> Duration
pub async fn avg_processing_time(&self) -> Duration
Get average processing time
Sourcepub async fn processing_time_percentiles(
&self,
percentiles: &[f64],
) -> Vec<Duration>
pub async fn processing_time_percentiles( &self, percentiles: &[f64], ) -> Vec<Duration>
Get processing time percentiles
Sourcepub async fn summary(&self) -> MetricsSummary
pub async fn summary(&self) -> MetricsSummary
Get metrics summary
Trait Implementations§
Source§impl Clone for EventPerformanceMetrics
impl Clone for EventPerformanceMetrics
Source§impl Debug for EventPerformanceMetrics
impl Debug for EventPerformanceMetrics
Auto Trait Implementations§
impl !RefUnwindSafe for EventPerformanceMetrics
impl !UnwindSafe for EventPerformanceMetrics
impl Freeze for EventPerformanceMetrics
impl Send for EventPerformanceMetrics
impl Sync for EventPerformanceMetrics
impl Unpin for EventPerformanceMetrics
impl UnsafeUnpin for EventPerformanceMetrics
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