MCPcopy Create free account
hub / github.com/CodSpeedHQ/codspeed / save_to

Method save_to

crates/runner-shared/src/unwind_data.rs:54–62  ·  view source on GitHub ↗
(&self, folder: P, key: &str)

Source from the content-addressed store, hash-verified

52 }
53
54 pub fn save_to<P: AsRef<std::path::Path>>(&self, folder: P, key: &str) -> anyhow::Result<()> {
55 let path = folder.as_ref().join(format!("{key}.{UNWIND_FILE_EXT}"));
56 let compat = UnwindDataCompat::V4(self.clone());
57 let file = std::fs::File::create(&path)?;
58 const BUFFER_SIZE: usize = 256 * 1024;
59 let writer = BufWriter::with_capacity(BUFFER_SIZE, file);
60 bincode::serialize_into(writer, &compat)?;
61 Ok(())
62 }
63}
64
65/// A versioned enum for `UnwindData` to allow for future extensions while maintaining backward compatibility.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected