From b736073b9d83c63ec05dab92c6cc140ea055db5e Mon Sep 17 00:00:00 2001 From: Erwan Vivien Date: Mon, 30 Oct 2023 17:43:26 +0100 Subject: [PATCH] chore: remove unused bench function --- benches/qr.rs | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/benches/qr.rs b/benches/qr.rs index fffd4ec..727f94c 100644 --- a/benches/qr.rs +++ b/benches/qr.rs @@ -2,7 +2,7 @@ use std::time::Duration; use criterion::*; -use fast_qr::{QRBuilder, QRCode}; +use fast_qr::QRBuilder; fn bench_fastqr_qrcode(c: &mut Criterion) { let bytes: &[u8] = b"https://example.com/"; @@ -60,31 +60,5 @@ fn bench_fastqr_qrcode(c: &mut Criterion) { } } -fn bench_mask(c: &mut Criterion) { - let mut group = c.benchmark_group("mask"); - group.measurement_time(Duration::from_secs(10)); - group.sample_size(200); - - use fast_qr::datamasking::Mask; - - let mut mat = black_box(QRCode::default(177)); - for (mask, id) in [ - (Mask::Checkerboard, "checkerboard"), - (Mask::HorizontalLines, "horizontal_lines"), - (Mask::VerticalLines, "vertical_lines"), - (Mask::DiagonalLines, "diagonal_lines"), - (Mask::LargeCheckerboard, "large_checkerboard"), - (Mask::Fields, "fields"), - (Mask::Diamonds, "diamonds"), - (Mask::Meadow, "meadow"), - ] { - group.bench_function(id, |b| { - b.iter(|| fast_qr::datamasking::mask(&mut mat, mask)) - }); - } - - group.finish(); -} - criterion_group!(benches, bench_fastqr_qrcode); criterion_main!(benches);