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

Function make_snapshot

nodedb/src/engine/graph/olap/parallel.rs:195–202  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

193 use crate::engine::graph::csr::CsrIndex;
194
195 fn make_snapshot() -> Arc<CsrSnapshot> {
196 let mut csr = CsrIndex::new();
197 for i in 0..100 {
198 csr.add_edge(&format!("n{i}"), "L", &format!("n{}", (i + 1) % 100))
199 .unwrap();
200 }
201 Arc::new(CsrSnapshot::from_csr(&mut csr))
202 }
203
204 #[test]
205 fn compute_partitions_basic() {

Callers 4

parallel_map_degreeFunction · 0.85

Calls 1

add_edgeMethod · 0.80

Tested by 4

parallel_map_degreeFunction · 0.68