pub struct PrefixCacheStats {
pub hit_rate: f32,
pub cached_blocks: usize,
pub capacity_blocks: usize,
pub memory_bytes: usize,
pub total_hits: u64,
pub total_misses: u64,
pub total_evictions: u64,
}Expand description
A snapshot of prefix-cache statistics for observability.
Fields§
§hit_rate: f32Fraction of lookups that found a cached block, in [0, 1].
cached_blocks: usizeNumber of blocks currently in the cache.
capacity_blocks: usizeMaximum number of blocks the cache can hold.
memory_bytes: usizeTotal memory consumed by KV data in bytes.
total_hits: u64Cumulative cache hits.
total_misses: u64Cumulative cache misses.
total_evictions: u64Cumulative evictions.
Trait Implementations§
Source§impl Debug for PrefixCacheStats
impl Debug for PrefixCacheStats
Auto Trait Implementations§
impl Freeze for PrefixCacheStats
impl RefUnwindSafe for PrefixCacheStats
impl Send for PrefixCacheStats
impl Sync for PrefixCacheStats
impl Unpin for PrefixCacheStats
impl UnsafeUnpin for PrefixCacheStats
impl UnwindSafe for PrefixCacheStats
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