[][src]Macro mybench::bench

macro_rules! bench {
    ($func:expr, $description:expr) => { ... };
    ($func:expr, $count:expr, $description:expr) => { ... };
}

Measures average code execution time in N times.

bench!(wrapper, N, "Prompt") execute wrapper function N times.

bench!(wrapper, "Prompt") execute wrapper function 10,000 times.

bench!(|| { ... }, 1000, "With closure") execute closure 1,000 times.

The result prints to the standard output as filename:row:col 'Prompt' xxx.yy ms.