Skip to main content

timed

Function timed 

Source
pub fn timed<T>(label: &str, f: impl FnOnce() -> T) -> T
Expand description

Time f, log it as a sub-command (see subcmd), and return its value. Wrap every git / cargo / rustc invocation in this so the cost of each external call is visible — these dominate the wall clock on a cold cache.