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

Function compact_all_yields_empty

nodedb-vector/src/sieve/workload.rs:197–205  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

195 /// After compacting everything, log is empty.
196 #[test]
197 fn compact_all_yields_empty() {
198 let mut analyzer = WorkloadAnalyzer::new(0.05);
199 for i in 0u64..10 {
200 analyzer.record("X".to_string(), i);
201 }
202 // cutoff = 1000 - 0 = 1000; all ts < 1000 dropped.
203 analyzer.compact(1000, 0);
204 assert!(analyzer.stable_predicates().is_empty());
205 }
206
207 /// `estimate_subindex_cost` returns plausible values.
208 #[test]

Callers

nothing calls this directly

Calls 3

to_stringMethod · 0.80
recordMethod · 0.45
compactMethod · 0.45

Tested by

no test coverage detected