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

Method get_stats

src/cache/memory_aware_manager.rs:361–371  ·  view source on GitHub ↗

Get current statistics

(&self)

Source from the content-addressed store, hash-verified

359
360 /// Get current statistics
361 pub fn get_stats(&self) -> MemoryAwareCacheStats {
362 let caches = self.managed_caches.read();
363 let mut stats = self.stats.write();
364
365 // Update current statistics
366 stats.total_managed_caches = caches.len();
367 stats.total_entries = caches.iter().map(|(_, cache)| cache.len()).sum();
368 stats.total_memory_bytes = caches.iter().map(|(_, cache)| cache.memory_usage_bytes()).sum();
369
370 stats.clone()
371 }
372
373 /// Get detailed cache information
374 pub fn get_cache_info(&self) -> Vec<(String, String)> {

Callers 3

check_memory_pressureMethod · 0.45

Calls 4

readMethod · 0.80
memory_usage_bytesMethod · 0.80
lenMethod · 0.45
cloneMethod · 0.45

Tested by 2