Skip to main content

measure

Function measure 

Source
pub fn measure(
    iterations: usize,
    operation: impl FnMut(),
) -> Result<Measurement, AlreadyMeasuring>
Expand description

Measure a workload on this thread; nested scopes refuse before executing.

Setup, result formatting and other threads are excluded. Panics propagate, and an unwind guard disables accounting before returning control to the caller.

ยงErrors

Returns AlreadyMeasuring when called from an active measurement.