From d867451da9220fa9f00625427c35999ff28916c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konrad=20H=C3=B6ffner?= Date: Thu, 25 May 2023 11:42:35 +0200 Subject: [PATCH 1/2] fix >5s quick mode crash, resolve #658 When using quick mode without "--noplot", any benchmark running over 5 seconds will lead to a crash. This commit fixes this problem by adding a very small amount (that will not be reported due to rounding) in order to work around the gnuplot crash. See . --- src/routine.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/routine.rs b/src/routine.rs index b03b171d..88e4318b 100644 --- a/src/routine.rs +++ b/src/routine.rs @@ -103,7 +103,8 @@ pub(crate) trait Routine { // Early exit for extremely long running benchmarks: if time_start.elapsed() > maximum_bench_duration { let iters = vec![n as f64, n as f64].into_boxed_slice(); - let elapsed = vec![t_prev, t_prev].into_boxed_slice(); + // prevent gnuplot bug when all values are equal + let elapsed = vec![t_prev, t_prev + 0.000001].into_boxed_slice(); return (ActualSamplingMode::Flat, iters, elapsed); } From 23c61b868773811e7c0169d6b0896ef584312d12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konrad=20H=C3=B6ffner?= Date: Fri, 26 May 2023 09:37:36 +0200 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 638f1ab8..679f0778 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Fixed + - Quick mode (--quick) no longer crashes with measured times over 5 seconds when --noplot is not active + ## [0.5.0] - 2023-05-23 ### Changed