MCPcopy Create free account
hub / github.com/erans/pgsqlite / stats

Method stats

src/cache/query.rs:129–135  ·  view source on GitHub ↗

Get cache statistics

(&self)

Source from the content-addressed store, hash-verified

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 {

Callers 3

memory_usage_bytesMethod · 0.45
stats_summaryMethod · 0.45
get_cache_statusFunction · 0.45

Calls 2

readMethod · 0.80
lenMethod · 0.45

Tested by

no test coverage detected