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

Function test_stats_reset

src/protocol/memory_monitor.rs:535–548  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

533
534 #[test]
535 fn test_stats_reset() {
536 let monitor = MemoryMonitor::new();
537
538 monitor.record_buffer_allocation(1024);
539 monitor.record_message_allocation(2048);
540
541 let stats_before = monitor.get_stats();
542 assert!(stats_before.total_bytes() > 0);
543
544 monitor.reset_stats();
545
546 let stats_after = monitor.get_stats();
547 assert_eq!(stats_after.total_bytes(), 0);
548 }
549
550 #[test]
551 fn test_global_memory_monitor() {

Callers

nothing calls this directly

Calls 4

get_statsMethod · 0.45
reset_statsMethod · 0.45

Tested by

no test coverage detected