Expand description
Traces for psync-predict, from functions annotated #[psync::graph(profile)].
Such a function runs as written, and reports every statement that awaits: its source line and how long it took, by the clock you install. Install a clock and a sink once, before the run:
β
fn clock() -> u64 { /* microseconds since some start */ }
fn sink(line: usize, cost: u64) { println!("{line} {cost}") }
psync::profile::install(clock, sink);Without them, profiled statements report nothing. A statement left by ?, return or
break reports nothing either, so trace a run that does not take an early exit.