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

Function prefetch_does_not_crash

nodedb-vector/src/mmap_segment/reader.rs:555–563  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

553
554 #[test]
555 fn prefetch_does_not_crash() {
556 let dir = tempfile::tempdir().unwrap();
557 let path = dir.path().join("prefetch.vseg");
558
559 let v = vec![1.0f32; 768];
560 let seg = MmapVectorSegment::create(&path, 768, &[&v]).unwrap();
561 seg.prefetch(0);
562 seg.prefetch(999);
563 }
564
565 #[test]
566 fn empty_segment() {

Callers

nothing calls this directly

Calls 4

joinMethod · 0.80
createFunction · 0.50
pathMethod · 0.45
prefetchMethod · 0.45

Tested by

no test coverage detected