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

Function scan_full_range

nodedb/src/engine/timeseries/columnar_bridge.rs:390–402  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

388
389 #[test]
390 fn scan_full_range() {
391 let segment = write_test_segment(100, 1000);
392
393 let result = scan_shared_segment(&segment, 0, 1, 1000, 1099).expect("scan");
394
395 assert_eq!(result.timestamps.len(), 100);
396 assert_eq!(result.values.len(), 100);
397 assert!(result.ts_valid.iter().all(|&v| v));
398 assert_eq!(result.timestamps[0], 1000);
399 assert_eq!(result.timestamps[99], 1099);
400 assert!((result.values[0] - 0.0).abs() < 0.001);
401 assert!((result.values[4] - 1.0).abs() < 0.001);
402 }
403
404 #[test]
405 fn scan_filtered_range() {

Callers

nothing calls this directly

Calls 3

scan_shared_segmentFunction · 0.85
write_test_segmentFunction · 0.70
expectMethod · 0.45

Tested by

no test coverage detected