MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / utilization

Function utilization

nodedb/src/bridge/slab.rs:253–259  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

251
252 #[test]
253 fn utilization() {
254 let mut pool = SlabPool::new(0, 64, 4);
255 assert_eq!(pool.utilization(), 0.0);
256 pool.alloc(b"a").unwrap();
257 pool.alloc(b"b").unwrap();
258 assert!((pool.utilization() - 0.5).abs() < 0.01);
259 }
260
261 #[test]
262 fn return_queue_push_drain() {

Callers

nothing calls this directly

Calls 1

allocMethod · 0.45

Tested by

no test coverage detected