pub struct AtomicPerformanceCounters {
pub clone_count: AtomicU64,
pub lock_acquisitions: AtomicU64,
pub lock_contentions: AtomicU64,
pub lock_wait_time_ns: AtomicU64,
pub cache_hits: AtomicU64,
pub cache_misses: AtomicU64,
}
Expand description
Atomic performance counters for various operations
Fields§
§clone_count: AtomicU64
Number of clone operations
lock_acquisitions: AtomicU64
Number of lock acquisitions
lock_contentions: AtomicU64
Number of lock contentions
lock_wait_time_ns: AtomicU64
Total time spent waiting for locks (nanoseconds)
cache_hits: AtomicU64
Number of cache hits
cache_misses: AtomicU64
Number of cache misses
Implementations§
Source§impl AtomicPerformanceCounters
impl AtomicPerformanceCounters
Sourcepub fn record_clone(&self)
pub fn record_clone(&self)
Record a clone operation
Sourcepub fn record_lock_acquisition(&self, wait_time: Duration)
pub fn record_lock_acquisition(&self, wait_time: Duration)
Record a lock acquisition
Sourcepub fn record_lock_contention(&self)
pub fn record_lock_contention(&self)
Record lock contention
Sourcepub fn record_cache_hit(&self)
pub fn record_cache_hit(&self)
Record cache hit
Sourcepub fn record_cache_miss(&self)
pub fn record_cache_miss(&self)
Record cache miss
Sourcepub fn snapshot(&self) -> PerformanceSnapshot
pub fn snapshot(&self) -> PerformanceSnapshot
Get performance snapshot
Trait Implementations§
Source§impl Debug for AtomicPerformanceCounters
impl Debug for AtomicPerformanceCounters
Auto Trait Implementations§
impl !Freeze for AtomicPerformanceCounters
impl RefUnwindSafe for AtomicPerformanceCounters
impl Send for AtomicPerformanceCounters
impl Sync for AtomicPerformanceCounters
impl Unpin for AtomicPerformanceCounters
impl UnwindSafe for AtomicPerformanceCounters
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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 more