Get cache statistics
(&self)
| 127 | |
| 128 | /// Get cache statistics |
| 129 | pub fn stats(&self) -> (usize, u64) { |
| 130 | let cache = self.cache.read().unwrap(); |
| 131 | let total_accesses: u64 = cache.values() |
| 132 | .map(|entry| entry.access_count) |
| 133 | .sum(); |
| 134 | (cache.len(), total_accesses) |
| 135 | } |
| 136 | |
| 137 | /// Get cache metrics |
| 138 | pub fn get_metrics(&self) -> CacheMetrics { |
no test coverage detected