From 57ea0d283d552fe7167a27c11ca1f76a14d4b42a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Gallou=C3=ABt?= Date: Sat, 5 Oct 2019 09:17:22 +0000 Subject: [PATCH] Bench with more time to improve accuracy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Adrien Gallouët --- src/bench.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bench.c b/src/bench.c index 6693be2..c60cddf 100644 --- a/src/bench.c +++ b/src/bench.c @@ -62,7 +62,7 @@ gt_bench(int argc, char **argv) int64_t min, mean, max, n; } mbps = { .n = 0 }; - int64_t bytes_max = (int64_t)1 << 20; + int64_t bytes_max = (int64_t)1 << 24; while (!gt_quit && mbps.n < 10) { int64_t bytes = 0; @@ -79,7 +79,7 @@ gt_bench(int argc, char **argv) } int64_t dt = (int64_t)clock() - base; - bytes_max = (bytes * (CLOCKS_PER_SEC / 4)) / dt; + bytes_max = (bytes * (CLOCKS_PER_SEC / 3)) / dt; int64_t _mbps = (8 * bytes * CLOCKS_PER_SEC) / (dt * 1000 * 1000); if (!mbps.n++) {