MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / test_memory_stats_format

Function test_memory_stats_format

graphlite/src/exec/memory_budget.rs:385–395  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

383
384 #[test]
385 fn test_memory_stats_format() {
386 let budget = MemoryBudget::new(100 * 1024 * 1024); // 100MB
387 budget.allocate(50 * 1024 * 1024).unwrap(); // 50MB
388
389 let stats = budget.stats();
390 let formatted = stats.format_human_readable();
391
392 assert!(formatted.contains("50.00MB"));
393 assert!(formatted.contains("100.00MB"));
394 assert!(formatted.contains("50.0%"));
395 }
396
397 #[test]
398 fn test_try_allocate() {

Callers

nothing calls this directly

Calls 4

unwrapMethod · 0.80
allocateMethod · 0.80
format_human_readableMethod · 0.80
statsMethod · 0.45

Tested by

no test coverage detected