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

Function test_cache_stats

src/cache/memory_aware_manager.rs:522–532  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

520
521 #[test]
522 fn test_cache_stats() {
523 let manager = MemoryAwareCacheManager::new();
524 let cache: Arc<TtlCache<String, String>> = manager.create_and_register_cache("stats_test".to_string());
525
526 cache.insert("test_key".to_string(), "test_value".to_string());
527
528 let info = manager.get_cache_info();
529 assert_eq!(info.len(), 1);
530 assert_eq!(info[0].0, "stats_test");
531 assert!(info[0].1.contains("entries: 1"));
532 }
533
534 #[test]
535 fn test_config_from_env() {

Callers

nothing calls this directly

Calls 3

insertMethod · 0.45
get_cache_infoMethod · 0.45

Tested by

no test coverage detected