pub struct ErrorRateTracker { /* private fields */ }
Expand description
Error rate tracking with time windows
Implementations§
Source§impl ErrorRateTracker
impl ErrorRateTracker
pub fn new(window_size: Duration) -> Self
pub fn record_execution(&mut self, is_error: bool)
pub fn error_rate(&mut self) -> f64
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ErrorRateTracker
impl RefUnwindSafe for ErrorRateTracker
impl Send for ErrorRateTracker
impl Sync for ErrorRateTracker
impl Unpin for ErrorRateTracker
impl UnwindSafe for ErrorRateTracker
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