()
| 445 | |
| 446 | #[test] |
| 447 | fn test_memory_allocation_tracking() { |
| 448 | let monitor = MemoryMonitor::new(); |
| 449 | |
| 450 | monitor.record_buffer_allocation(1024); |
| 451 | monitor.record_message_allocation(2048); |
| 452 | monitor.record_query_allocation(512); |
| 453 | |
| 454 | let stats = monitor.get_stats(); |
| 455 | assert_eq!(stats.total_bytes(), 3584); |
| 456 | assert_eq!(stats.buffer_pool_bytes, 1024); |
| 457 | assert_eq!(stats.message_bytes, 2048); |
| 458 | assert_eq!(stats.query_bytes, 512); |
| 459 | } |
| 460 | |
| 461 | #[test] |
| 462 | fn test_memory_deallocation() { |
nothing calls this directly
no test coverage detected