Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix >5s quick mode crash, resolve #658 #685

Merged
merged 2 commits into from
May 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/routine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ pub(crate) trait Routine<M: Measurement, T: ?Sized> {
// 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);
}

Expand Down