Skip to content

Commit

Permalink
bench: add more benchmarking
Browse files Browse the repository at this point in the history
  • Loading branch information
hschimke committed Aug 1, 2024
1 parent 32f0f20 commit f3e98f5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions benches/benchmarks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,16 @@ fn multi_barcode_filtered_reader_benchmark(c: &mut Criterion) {
});
}

fn multi_barcode_complex_benchmark(c: &mut Criterion) {
let mut image = get_image("test_resources/blackbox/github_issue_cases/170050507-1f10f0ef-82ca-4e14-a2d2-4b288ec54809.png");
c.bench_function("multi_barcode", |b| {
b.iter(|| {
let mut reader = GenericMultipleBarcodeReader::new(MultiFormatReader::default());
let _res = reader.decode_multiple(&mut image);
});
});
}

criterion_group!(
benches,
aztec_benchmark,
Expand All @@ -238,5 +248,6 @@ criterion_group!(
upce_benchmark,
multi_barcode_benchmark,
multi_barcode_filtered_reader_benchmark,
multi_barcode_complex_benchmark,
);
criterion_main!(benches);

0 comments on commit f3e98f5

Please sign in to comment.