Skip to main content

record_phase

Macro record_phase 

Source
macro_rules! record_phase {
    ($timer:expr, $phase:literal) => { ... };
}
Expand description

Records the time since the Option<Instant> in $timer as the block write task phase $phase, then resets $timer to now, so consecutive phases can share one timer.

Does nothing if $timer is None. $phase must be a literal, so the metric key is static.