Struct metered::common::AtomicTxPerSec
source · [−]pub struct AtomicTxPerSec<T: Instant = StdInstant> {
pub inner: Mutex<TxPerSec<T>>,
}
Expand description
Thread-safe implementation of super::RecordThroughput
. It uses a Mutex
to wrap TxPerSec
.
Fields
inner: Mutex<TxPerSec<T>>
The inner mutex protecting the TxPerSec
value holding the histogram
Implementations
sourceimpl<T: Instant> AtomicTxPerSec<T>
impl<T: Instant> AtomicTxPerSec<T>
sourcepub fn histogram(&self) -> HdrHistogram
pub fn histogram(&self) -> HdrHistogram
Returns a cloned snapshot of the inner histogram.
Trait Implementations
sourceimpl<T: Instant> Debug for AtomicTxPerSec<T>
impl<T: Instant> Debug for AtomicTxPerSec<T>
sourceimpl<T: Instant> Default for AtomicTxPerSec<T>
impl<T: Instant> Default for AtomicTxPerSec<T>
sourceimpl<T: Instant> RecordThroughput for AtomicTxPerSec<T>
impl<T: Instant> RecordThroughput for AtomicTxPerSec<T>
Auto Trait Implementations
impl<T = StdInstant> !RefUnwindSafe for AtomicTxPerSec<T>
impl<T> Send for AtomicTxPerSec<T> where
T: Send,
impl<T> Sync for AtomicTxPerSec<T> where
T: Send,
impl<T> Unpin for AtomicTxPerSec<T> where
T: Unpin,
impl<T> UnwindSafe for AtomicTxPerSec<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more