sqaush-me: Improve benchmarks naming

This commit is contained in:
Clément Renault 2019-11-29 12:28:46 +01:00 committed by Clément Renault
parent d8ba405baf
commit 951f0bcb10
No known key found for this signature in database
GPG Key ID: 0151CDAB43460DAE

View File

@ -78,11 +78,11 @@ pub fn criterion_benchmark(c: &mut Criterion) {
query.get(0..count) query.get(0..count)
}); });
let mut group = c.benchmark_group("searching in movies"); let mut group = c.benchmark_group("searching in movies (19654 docs)");
group.sample_size(10); group.sample_size(10);
for query in iter { for query in iter {
let bench_name = BenchmarkId::new("query", format!("{:?}", query)); let bench_name = BenchmarkId::from_parameter(format!("{:?}", query));
group.bench_with_input(bench_name, &query, |b, query| b.iter(|| { group.bench_with_input(bench_name, &query, |b, query| b.iter(|| {
let builder = index.query_builder(); let builder = index.query_builder();
builder.query(&reader, query, 0..20).unwrap(); builder.query(&reader, query, 0..20).unwrap();