Macro gbench::scope[][src]

macro_rules! scope {
    ($name:ident) => { ... };
    ($name:ident | $($arg:tt)*) => { ... };
}

A macro for benchmarking a scope of code

scope!(main)
// expands into this
let main = TimeScope::new(format!("main"));
scope!(main | "A {}", 0)
// expands into this
let main = TimeScope::new(format!("A {}", 0));