adjust benchmark sample count
This commit is contained in:
parent
2c34886dc5
commit
59886a80fd
|
@ -3,14 +3,17 @@ use image::{ImageReader, RgbImage};
|
|||
use pi_frame_server::dither::{DitherMethod, DitheredImage, Palette};
|
||||
|
||||
fn criterion_benchmark(c: &mut Criterion) {
|
||||
let mut group = c.benchmark_group("dithering_benchmark");
|
||||
|
||||
let sample_file = "sample_0.tiff";
|
||||
let image: RgbImage = ImageReader::open(format!("samples/{sample_file}"))
|
||||
.expect("file exists")
|
||||
.decode()
|
||||
.expect("file is valid")
|
||||
.into_rgb8();
|
||||
group.sample_size(20);
|
||||
|
||||
c.bench_with_input(BenchmarkId::new("dither", "sample_0"), &image, |b, i| {
|
||||
group.bench_with_input(BenchmarkId::new("dither", "sample_0"), &image, |b, i| {
|
||||
b.iter(|| {
|
||||
let mut method = DitherMethod::Atkinson.get_ditherer();
|
||||
let mut result = DitheredImage::new(
|
||||
|
|
Loading…
Reference in a new issue