pub trait CacheMetrics: Send + Sync { // Required methods fn hits(&self) -> u64; fn misses(&self) -> u64; // Provided method fn hit_rate(&self) -> f64 { ... } }
Cache performance metrics.
Total number of cache hits.
Total number of cache misses.
Hit rate as a percentage (0.0 to 100.0).