()
| 289 | } |
| 290 | |
| 291 | pub 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 | |
| 301 | pub fn create_run(trace_root: &Path, name: impl Into<String>) -> Result<String> { |
| 302 | let run_id = new_run_id(); |
no outgoing calls
searching dependent graphs…