pub struct PoolStats {
pub allocations: AtomicU64,
pub deallocations: AtomicU64,
pub cache_hits: AtomicU64,
pub cache_misses: AtomicU64,
pub pool_misses: AtomicU64,
pub bytes_allocated: AtomicUsize,
pub peak_bytes: AtomicUsize,
}Expand description
Buffer pool statistics
Fields§
§allocations: AtomicU64Total allocations
deallocations: AtomicU64Total deallocations (returns to pool)
cache_hits: AtomicU64Cache hits (from thread-local)
cache_misses: AtomicU64Cache misses (went to global pool)
pool_misses: AtomicU64Pool misses (new allocation)
bytes_allocated: AtomicUsizeCurrent bytes allocated
peak_bytes: AtomicUsizePeak bytes allocated
Implementations§
Source§impl PoolStats
impl PoolStats
Sourcepub fn cache_hit_rate(&self) -> f64
pub fn cache_hit_rate(&self) -> f64
Get cache hit rate (0.0 - 1.0)
Sourcepub fn pool_hit_rate(&self) -> f64
pub fn pool_hit_rate(&self) -> f64
Get pool hit rate (0.0 - 1.0)
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for PoolStats
impl RefUnwindSafe for PoolStats
impl Send for PoolStats
impl Sync for PoolStats
impl Unpin for PoolStats
impl UnwindSafe for PoolStats
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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