pub struct CacheStats {
pub total_size_bytes: u64,
pub model_count: usize,
pub max_size_bytes: u64,
pub usage_percent: f64,
pub pinned_count: usize,
pub pinned_size_bytes: u64,
pub oldest_age_secs: u64,
pub most_accessed: Option<String>,
pub hit_rate: Option<f64>,
}Expand description
Cache statistics
Fields§
§total_size_bytes: u64Total cache size in bytes
model_count: usizeNumber of cached models
max_size_bytes: u64Maximum configured size
usage_percent: f64Usage percentage
pinned_count: usizeNumber of pinned models
pinned_size_bytes: u64Total pinned size
oldest_age_secs: u64Oldest entry age (seconds)
most_accessed: Option<String>Most accessed model
hit_rate: Option<f64>Hit rate (if tracking enabled)
Implementations§
Source§impl CacheStats
impl CacheStats
Sourcepub fn total_size_gb(&self) -> f64
pub fn total_size_gb(&self) -> f64
Get total size in GB
Sourcepub fn max_size_gb(&self) -> f64
pub fn max_size_gb(&self) -> f64
Get max size in GB
Sourcepub fn available_bytes(&self) -> u64
pub fn available_bytes(&self) -> u64
Get available space in bytes
Sourcepub fn available_gb(&self) -> f64
pub fn available_gb(&self) -> f64
Get available space in GB
Trait Implementations§
Source§impl Clone for CacheStats
impl Clone for CacheStats
Source§fn clone(&self) -> CacheStats
fn clone(&self) -> CacheStats
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CacheStats
impl Debug for CacheStats
Source§impl<'de> Deserialize<'de> for CacheStats
impl<'de> Deserialize<'de> for CacheStats
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CacheStats
impl RefUnwindSafe for CacheStats
impl Send for CacheStats
impl Sync for CacheStats
impl Unpin for CacheStats
impl UnsafeUnpin for CacheStats
impl UnwindSafe for CacheStats
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