MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / collect

Function collect

atomic-core/examples/graph_codec_lab.rs:41–53  ·  view source on GitHub ↗
(path: &Path, out: &mut Vec<PathBuf>)

Source from the content-addressed store, hash-verified

39 semantic_sequential_decode_ms: f64,
40}
41fn collect(path: &Path, out: &mut Vec<PathBuf>) -> Result<()> {
42 if path.is_dir() {
43 for entry in fs::read_dir(path)? {
44 let p = entry?.path();
45 if !p.is_symlink() {
46 collect(&p, out)?;
47 }
48 }
49 } else if path.extension().is_some_and(|s| s == "change") {
50 out.push(path.into());
51 }
52 Ok(())
53}
54fn measure(path: &Path) -> Result<Row> {
55 let original = fs::read(path)?;
56 let (mut change, hash) = Change::deserialize(&mut original.as_slice())?;

Callers 1

mainFunction · 0.70

Calls 4

is_dirMethod · 0.80
extensionMethod · 0.80
pathMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected