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

Function test_memory_deallocation

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

Source from the content-addressed store, hash-verified

460
461 #[test]
462 fn test_memory_deallocation() {
463 let monitor = MemoryMonitor::new();
464 monitor.reset_stats(); // Reset to avoid interference from other tests
465
466 monitor.record_buffer_allocation(2048);
467 monitor.record_buffer_deallocation(1024);
468
469 let stats = monitor.get_stats();
470 assert_eq!(stats.buffer_pool_bytes, 1024);
471 }
472
473 #[test]
474 fn test_pressure_level_calculation() {

Callers

nothing calls this directly

Calls 4

reset_statsMethod · 0.45
get_statsMethod · 0.45

Tested by

no test coverage detected