benches: remove dead code

This commit is contained in:
zimbatm 2021-02-25 18:43:23 +01:00
parent 1396279664
commit c9115ddcdd
No known key found for this signature in database
GPG Key ID: 71BAF6D40C1D63D7

View File

@ -1,7 +1,6 @@
use criterion::{criterion_group, criterion_main, Criterion};
use std::path::PathBuf;
use treefmt::config;
use treefmt::engine;
pub fn bench_group(c: &mut Criterion) {
c.bench_function("parse config", |b| {
@ -12,18 +11,6 @@ pub fn bench_group(c: &mut Criterion) {
assert!(root.is_ok());
})
});
let treefmt_toml = PathBuf::from("./treefmt.toml");
let root = config::from_path(&treefmt_toml).unwrap();
c.bench_function("command context", |b| {
b.iter(|| {
let dir = PathBuf::from(".");
let ctx = engine::create_command_context(&dir, &root);
assert!(ctx.is_ok());
})
});
}
criterion_group!(benches, bench_group);