Function
write_test_segment
(count: usize, start_ts: i64)
Source from the content-addressed store, hash-verified
| 372 | // -- Read path tests -- |
| 373 | |
| 374 | fn write_test_segment(count: usize, start_ts: i64) -> Vec<u8> { |
| 375 | let mut mt = ColumnarMemtable::new_metric(default_config()); |
| 376 | for i in 0..count { |
| 377 | mt.ingest_metric( |
| 378 | (i % 5) as u64, |
| 379 | MetricSample { |
| 380 | timestamp_ms: start_ts + i as i64, |
| 381 | value: i as f64 * 0.25, |
| 382 | }, |
| 383 | ); |
| 384 | } |
| 385 | let drain = mt.drain(); |
| 386 | write_ts_drain_as_segment(&drain, None).expect("write") |
| 387 | } |
| 388 | |
| 389 | #[test] |
| 390 | fn scan_full_range() { |