pub struct PerformanceMonitor { /* private fields */ }Expand description
Performance metrics collector
Implementations§
Source§impl PerformanceMonitor
impl PerformanceMonitor
Sourcepub fn record_metric(&mut self, metric: OperationMetrics)
pub fn record_metric(&mut self, metric: OperationMetrics)
Record operation metric
Sourcepub fn metrics_for_operation(&self, operation: &str) -> Vec<&OperationMetrics>
pub fn metrics_for_operation(&self, operation: &str) -> Vec<&OperationMetrics>
Get metrics for operation
Sourcepub fn successful_metrics(&self) -> Vec<&OperationMetrics>
pub fn successful_metrics(&self) -> Vec<&OperationMetrics>
Get successful metrics
Sourcepub fn failed_metrics(&self) -> Vec<&OperationMetrics>
pub fn failed_metrics(&self) -> Vec<&OperationMetrics>
Get failed metrics
Sourcepub fn average_latency_us(&self) -> u64
pub fn average_latency_us(&self) -> u64
Get average latency
Sourcepub fn average_latency_for_operation_us(&self, operation: &str) -> u64
pub fn average_latency_for_operation_us(&self, operation: &str) -> u64
Get average latency for operation
Sourcepub fn p50_latency_us(&self) -> u64
pub fn p50_latency_us(&self) -> u64
Get p50 latency (median)
Sourcepub fn p99_latency_us(&self) -> u64
pub fn p99_latency_us(&self) -> u64
Get p99 latency
Sourcepub fn max_latency_us(&self) -> u64
pub fn max_latency_us(&self) -> u64
Get max latency
Sourcepub fn min_latency_us(&self) -> u64
pub fn min_latency_us(&self) -> u64
Get min latency
Sourcepub fn success_rate(&self) -> f64
pub fn success_rate(&self) -> f64
Get success rate
Sourcepub fn error_rate(&self) -> f64
pub fn error_rate(&self) -> f64
Get error rate
Sourcepub fn total_fields_processed(&self) -> usize
pub fn total_fields_processed(&self) -> usize
Get total fields processed
Sourcepub fn operations_per_second(&self) -> f64
pub fn operations_per_second(&self) -> f64
Get operations per second
Sourcepub fn check_all_slos(&self) -> Vec<(String, bool)>
pub fn check_all_slos(&self) -> Vec<(String, bool)>
Get all SLO violations
Sourcepub fn metric_count(&self) -> usize
pub fn metric_count(&self) -> usize
Get metric count
Sourcepub fn operation_count(&self, operation: &str) -> usize
pub fn operation_count(&self, operation: &str) -> usize
Get count by operation
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PerformanceMonitor
impl RefUnwindSafe for PerformanceMonitor
impl Send for PerformanceMonitor
impl Sync for PerformanceMonitor
impl Unpin for PerformanceMonitor
impl UnwindSafe for PerformanceMonitor
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().