MCPcopy Create free account
hub / github.com/AIScientists-Dev/Flowtrace / new_run_id

Function new_run_id

crates/flowtrace-core/src/state.rs:291–299  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

289}
290
291pub fn new_run_id() -> String {
292 use std::time::{SystemTime, UNIX_EPOCH};
293 let ts = Utc::now().format("%Y%m%dT%H%M%SZ");
294 let nanos = SystemTime::now()
295 .duration_since(UNIX_EPOCH)
296 .map(|d| d.subsec_nanos())
297 .unwrap_or(0);
298 format!("run_{}_{:04x}", ts, nanos & 0xffff)
299}
300
301pub fn create_run(trace_root: &Path, name: impl Into<String>) -> Result<String> {
302 let run_id = new_run_id();

Callers 2

create_runFunction · 0.85
run_id_formatFunction · 0.85

Calls

no outgoing calls

Tested by 1

run_id_formatFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…