pub struct RiPerformanceCollector { /* private fields */ }Expand description
Performance metrics collector with sliding window and quantile calculation.
This struct collects performance metrics using sliding windows and provides quantile-based performance analysis.
Implementations§
Source§impl RiPerformanceCollector
impl RiPerformanceCollector
Sourcepub fn record_request(&mut self, latency_ms: f64, is_error: bool)
pub fn record_request(&mut self, latency_ms: f64, is_error: bool)
Records a request with latency and error status.
§Parameters
latency_ms: The request latency in millisecondsis_error: Whether the request resulted in an error
Sourcepub fn get_metrics(&mut self) -> RiPerformanceMetrics
pub fn get_metrics(&mut self) -> RiPerformanceMetrics
Gets the current performance metrics.
§Returns
A RiPerformanceMetrics instance containing the current performance metrics
Auto Trait Implementations§
impl Freeze for RiPerformanceCollector
impl RefUnwindSafe for RiPerformanceCollector
impl Send for RiPerformanceCollector
impl Sync for RiPerformanceCollector
impl Unpin for RiPerformanceCollector
impl UnsafeUnpin for RiPerformanceCollector
impl UnwindSafe for RiPerformanceCollector
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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> 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::Request