mirror of
https://github.com/numtide/treefmt.git
synced 2024-10-05 13:07:17 +03:00
benches: remove dead code
This commit is contained in:
parent
1396279664
commit
c9115ddcdd
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user