(trace_root: &Path, name: impl Into<String>)
| 299 | } |
| 300 | |
| 301 | pub fn create_run(trace_root: &Path, name: impl Into<String>) -> Result<String> { |
| 302 | let run_id = new_run_id(); |
| 303 | let dir = run_dir(trace_root, &run_id); |
| 304 | fs::create_dir_all(&dir)?; |
| 305 | write_state(trace_root, &run_id, &RunState::new(name))?; |
| 306 | Ok(run_id) |
| 307 | } |
| 308 | |
| 309 | pub fn read_state(trace_root: &Path, run_id: &str) -> Result<RunState> { |
| 310 | let path = state_path(trace_root, run_id); |
no test coverage detected
searching dependent graphs…