MCPcopy Create free account
hub / github.com/f0rr0/oliphaunt / unique_perf_root

Function unique_perf_root

xtask/src/main.rs:5066–5078  ·  view source on GitHub ↗
(name: &str)

Source from the content-addressed store, hash-verified

5064}
5065
5066fn unique_perf_root(name: &str) -> Result<PathBuf> {
5067 let now = SystemTime::now()
5068 .duration_since(UNIX_EPOCH)
5069 .context("read system clock for perf root")?
5070 .as_nanos();
5071 let root = env::temp_dir().join(format!("pglite-oxide-{name}-{}-{now}", std::process::id()));
5072 if root.exists() {
5073 fs::remove_dir_all(&root)
5074 .with_context(|| format!("remove stale perf root {}", root.display()))?;
5075 }
5076 fs::create_dir_all(&root).with_context(|| format!("create perf root {}", root.display()))?;
5077 Ok(root)
5078}
5079
5080fn ensure_json_int(value: &serde_json::Value, expected: i64) -> Result<()> {
5081 let Some(actual) = value.as_i64() else {

Callers 1

perf_coldFunction · 0.85

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected