[librsvg: 2/12] No need to have extra long running time on these benchmarks
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 2/12] No need to have extra long running time on these benchmarks
- Date: Tue, 13 Oct 2020 14:03:23 +0000 (UTC)
commit 3963938e0c23570af17437a1412b0d616c2af83f
Author: Sven Neumann <sven svenfoo org>
Date: Mon Oct 12 10:44:25 2020 +0200
No need to have extra long running time on these benchmarks
We can get 100 samples easily in 5 seconds, there's no need to
increase the running time.
librsvg/benches/pixbuf_from_surface.rs | 8 +-------
rsvg_internals/benches/surface_from_pixbuf.rs | 7 +------
2 files changed, 2 insertions(+), 13 deletions(-)
---
diff --git a/librsvg/benches/pixbuf_from_surface.rs b/librsvg/benches/pixbuf_from_surface.rs
index b34f31b5..ddc84cd7 100644
--- a/librsvg/benches/pixbuf_from_surface.rs
+++ b/librsvg/benches/pixbuf_from_surface.rs
@@ -1,5 +1,3 @@
-use std::time::Duration;
-
use criterion::{criterion_group, criterion_main, Criterion};
use rsvg_c_api::pixbuf_utils::pixbuf_from_surface;
@@ -42,9 +40,5 @@ fn bench_pixbuf_from_surface(c: &mut Criterion) {
});
}
-criterion_group!(
- name = benches;
- config = Criterion::default().measurement_time(Duration::from_secs(10));
- targets = bench_pixbuf_from_surface,
-);
+criterion_group!(benches, bench_pixbuf_from_surface);
criterion_main!(benches);
diff --git a/rsvg_internals/benches/surface_from_pixbuf.rs b/rsvg_internals/benches/surface_from_pixbuf.rs
index b59b9bc1..ed924f33 100644
--- a/rsvg_internals/benches/surface_from_pixbuf.rs
+++ b/rsvg_internals/benches/surface_from_pixbuf.rs
@@ -1,6 +1,5 @@
use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion};
use gdk_pixbuf::{Colorspace, Pixbuf};
-use std::time::Duration;
use rsvg_internals::surface_utils::shared_surface::SharedImageSurface;
@@ -27,9 +26,5 @@ fn bench_surface_from_pixbuf(c: &mut Criterion) {
}
}
-criterion_group!(
- name = benches;
- config = Criterion::default().measurement_time(Duration::from_secs(10));
- targets = bench_surface_from_pixbuf,
-);
+criterion_group!(benches, bench_surface_from_pixbuf);
criterion_main!(benches);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]