#[bench]Expand description
Mark a function as a benchmark.
§Supported signatures
ⓘ
#[pbench::bench]
fn no_args() { /* ... */ }
#[pbench::bench]
fn with_bencher(b: &Bencher) { /* ... */ }
#[pbench::bench(args = [1, 2, 4, 8])]
fn with_args(b: &Bencher, arg: &str) { /* ... */ }§Options
sample_count = <expr>— number of samplessample_size = <expr>— iterations per samplemin_time = <seconds>— minimum benchmark duration (f64 seconds)max_time = <seconds>— maximum benchmark duration (f64 seconds)skip_ext_time— skip external time in min/max accountingargs = [<exprs>]— runtime arguments (requires 2-param fn signature)ignore— skip this benchmark unless--include-ignoredis passed