pub fn measure<T>(f: impl FnOnce() -> T) -> (T, Counters)
Runs f and returns its result along with the allocation counters the current thread accumulated during the call.
f
Allocations made by other threads are not counted.