Fix bench

This commit is contained in:
dalance 2020-11-11 19:56:54 +09:00
parent bb150325f1
commit b53e806659
2 changed files with 3 additions and 3 deletions

View File

@ -22,7 +22,7 @@ fn test1(b: &mut Bencher) {
let includes: Vec<PathBuf> = Vec::new(); let includes: Vec<PathBuf> = Vec::new();
let path = get_path("test1.sv"); let path = get_path("test1.sv");
b.iter(|| { b.iter(|| {
let _ = parse_sv(&path, &defines, &includes, false); let _ = parse_sv(&path, &defines, &includes, false, false);
}); });
} }
@ -32,6 +32,6 @@ fn test2(b: &mut Bencher) {
let includes: Vec<PathBuf> = Vec::new(); let includes: Vec<PathBuf> = Vec::new();
let path = get_path("test2.sv"); let path = get_path("test2.sv");
b.iter(|| { b.iter(|| {
let _ = parse_sv(&path, &defines, &includes, false); let _ = parse_sv(&path, &defines, &includes, false, false);
}); });
} }

View File

@ -26,7 +26,7 @@ fn gen_benchmark_group(c: &mut Criterion, s: &str) {
let mut group = c.benchmark_group(s); let mut group = c.benchmark_group(s);
group.throughput(Throughput::Bytes(size)); group.throughput(Throughput::Bytes(size));
group.bench_function(s, |b| { group.bench_function(s, |b| {
b.iter_with_large_drop(|| parse_sv(&path, &defines, &includes, false)) b.iter_with_large_drop(|| parse_sv(&path, &defines, &includes, false, false))
}); });
group.finish(); group.finish();
} }