pub struct ErrorRateCounter { /* private fields */ }Expand description
错误率计数器,基于滑动时间窗口统计错误率。
窗口外的样本会在下一次 record 调用时被驱逐,
保证 rate() 始终基于窗口内的最新样本计算。
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ErrorRateCounter
impl RefUnwindSafe for ErrorRateCounter
impl Send for ErrorRateCounter
impl Sync for ErrorRateCounter
impl Unpin for ErrorRateCounter
impl UnsafeUnpin for ErrorRateCounter
impl UnwindSafe for ErrorRateCounter
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