| 1 |
// This file is part of the uutils coreutils package. |
| 2 |
// |
| 3 |
// For the full copyright and license information, please view the LICENSE |
| 4 |
// file that was distributed with this source code. |
| 5 |
|
| 6 |
use divan::{Bencher, black_box}; |
| 7 |
use uu_false::uumain; |
| 8 |
use uucore::benchmark::run_util_function; |
| 9 |
|
| 10 |
/// Benchmark multiple consecutive invocations (avoid less than 1 ns) |
| 11 |
#[divan::bench] |
| 12 |
fn false_consecutive_calls(bencher: Bencher) { |
| 13 |
bencher.bench(|| { |
| 14 |
for _ in 0..100 { |
| 15 |
black_box(run_util_function(uumain, &[])); |
| 16 |
} |
| 17 |
}); |
| 18 |
} |
| 19 |
|
| 20 |
fn main() { |
| 21 |
divan::main(); |
| 22 |
} |