[−][src]Function microbench::measure_drop
pub fn measure_drop<T>(options: &Options, f: impl FnMut() -> T) -> Vec<Sample>
Measures the execution time of the supplied function ignoring drop time.
This function does not include the time it takes to drop the values returned
by the supplied function in the measurements. This can be useful when you
want to exclude the running time of a slow implementation of Drop
from
your benchmark. However, it should be noted that this function introduces a
very small amount of overhead which will be reflected in the measurements
(typically of the order of a few nanoseconds).
Warning: This function can potentially allocate very large amounts of
memory. The memory
option controls the maximum amount of memory this
function is allowed to allocate.