Skip to content

Commit bfc84ad

Browse files
fix >5s quick mode crash, resolve #658 (#685)
1 parent 4a560cb commit bfc84ad

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10+
### Fixed
11+
- Quick mode (--quick) no longer crashes with measured times over 5 seconds when --noplot is not active
12+
1013
## [0.5.0] - 2023-05-23
1114

1215
### Changed

src/routine.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ pub(crate) trait Routine<M: Measurement, T: ?Sized> {
103103
// Early exit for extremely long running benchmarks:
104104
if time_start.elapsed() > maximum_bench_duration {
105105
let iters = vec![n as f64, n as f64].into_boxed_slice();
106-
let elapsed = vec![t_prev, t_prev].into_boxed_slice();
106+
// prevent gnuplot bug when all values are equal
107+
let elapsed = vec![t_prev, t_prev + 0.000001].into_boxed_slice();
107108
return (ActualSamplingMode::Flat, iters, elapsed);
108109
}
109110

0 commit comments

Comments
 (0)