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

Returns a cloned snapshot of the inner histogram.

Trait Implementations

Requests to clear self.

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Called after the execution that the throughput metric is measuring.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.