• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 use clap::Command;
2 use criterion::{criterion_group, criterion_main, Criterion};
3 
build_empty(c: &mut Criterion)4 pub fn build_empty(c: &mut Criterion) {
5     c.bench_function("build_empty", |b| b.iter(|| Command::new("claptests")));
6 }
7 
parse_empty(c: &mut Criterion)8 pub fn parse_empty(c: &mut Criterion) {
9     c.bench_function("parse_empty", |b| {
10         b.iter(|| Command::new("claptests").get_matches_from(vec![""]))
11     });
12 }
13 
14 criterion_group!(benches, build_empty, parse_empty);
15 criterion_main!(benches);
16