pub struct ProgramCacheStats {
pub hits: AtomicU64,
pub misses: AtomicU64,
pub reloads: AtomicU64,
pub insertions: AtomicU64,
pub lost_insertions: AtomicU64,
pub replacements: AtomicU64,
pub one_hit_wonders: AtomicU64,
pub empty_entries: AtomicU64,
pub water_level: AtomicU64,
/* private fields */
}Expand description
Global cache statistics for ProgramCache.
Fields§
§hits: AtomicU64a program was already in the cache
misses: AtomicU64a program was not found and loaded instead
reloads: AtomicU64an unloaded program was loaded again (opposite of eviction)
insertions: AtomicU64a program was loaded or un/re/deployed
lost_insertions: AtomicU64a program was loaded but can not be extracted on its own fork anymore
replacements: AtomicU64a program which was already in the cache was reloaded by mistake
one_hit_wonders: AtomicU64a program was only used once before being unloaded
empty_entries: AtomicU64a program had no entries because all slot versions got pruned
water_level: AtomicU64water level of loaded entries currently cached
Implementations§
Source§impl ProgramCacheStats
impl ProgramCacheStats
pub fn reset(&mut self)
Sourcepub fn total_evictions(&self) -> u64
pub fn total_evictions(&self) -> u64
Total evictions across every program id.
This is the only read of evictions available outside this module.
Returning the sum rather than the map keeps the map’s hash-seeded,
per-process iteration order from reaching any consumer.
pub fn log(&self)
Trait Implementations§
Source§impl Debug for ProgramCacheStats
impl Debug for ProgramCacheStats
Auto Trait Implementations§
impl !Freeze for ProgramCacheStats
impl RefUnwindSafe for ProgramCacheStats
impl Send for ProgramCacheStats
impl Sync for ProgramCacheStats
impl Unpin for ProgramCacheStats
impl UnsafeUnpin for ProgramCacheStats
impl UnwindSafe for ProgramCacheStats
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> 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