Skip to main content

measure

Function measure 

Source
pub fn measure<T>(f: impl FnOnce() -> T) -> (T, Counters)
Expand description

Runs f and returns its result along with the allocation counters the current thread accumulated during the call.

Allocations made by other threads are not counted.