2015-09-01 16:00:51 +00:00
|
|
|
use clap::App;
|
2020-02-17 18:14:19 +00:00
|
|
|
use criterion::{criterion_group, criterion_main, Criterion};
|
2015-09-01 16:00:51 +00:00
|
|
|
|
2020-02-17 18:14:19 +00:00
|
|
|
pub fn empty_app(c: &mut Criterion) {
|
|
|
|
c.bench_function("build_app", |b| b.iter(|| App::new("claptests")));
|
2020-01-31 09:13:44 +00:00
|
|
|
}
|
2015-09-01 16:00:51 +00:00
|
|
|
|
2020-02-17 18:14:19 +00:00
|
|
|
pub fn parse_clean(c: &mut Criterion) {
|
|
|
|
c.bench_function("parse_clean", |b| b.iter(|| App::new("claptests").get_matches_from(vec![""])));
|
2020-01-31 09:13:44 +00:00
|
|
|
}
|
2020-02-17 18:14:19 +00:00
|
|
|
|
|
|
|
criterion_group!(benches, empty_app, parse_clean);
|
|
|
|
criterion_main!(benches);
|