rustbench 0.1.2

A lightweight Rust procedural macro for benchmarking function execution time.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use rustbench::benchmark;

#[benchmark]
fn example_sum() {
    let _: u64 = (1..=1_000_000).sum();
}

#[benchmark(5)]
fn example_sum_iteration() {
    let _: u64 = (1..=1_000_000).sum();
}

fn main() {
    example_sum_iteration();
    example_sum();
}