()
| 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] |