pub struct ModelCacheStats {
pub cached_models: usize,
pub total_hits: u64,
pub total_misses: u64,
pub hit_rate: f32,
pub total_memory_bytes: usize,
pub oldest_entry_age_secs: Option<u64>,
}Expand description
Snapshot of cache utilisation metrics, suitable for serialisation to JSON.
Fields§
§cached_models: usizeNumber of entries currently held in the cache.
total_hits: u64Cumulative cache hits since the cache was created.
total_misses: u64Cumulative cache misses since the cache was created.
hit_rate: f32Hit rate as a fraction in [0.0, 1.0].
total_memory_bytes: usizeSum of memory_bytes across all cached entries.
oldest_entry_age_secs: Option<u64>Age in seconds of the oldest entry, or None if the cache is empty.
Trait Implementations§
Source§impl Debug for ModelCacheStats
impl Debug for ModelCacheStats
Auto Trait Implementations§
impl Freeze for ModelCacheStats
impl RefUnwindSafe for ModelCacheStats
impl Send for ModelCacheStats
impl Sync for ModelCacheStats
impl Unpin for ModelCacheStats
impl UnsafeUnpin for ModelCacheStats
impl UnwindSafe for ModelCacheStats
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