Addressed review comments.

This commit is contained in:
Diogo Sousa authored and David Peter committed 2018-09-09 23:18:18 +02:00
1 parent d78c33b864
commit 0466a1d7cf
4 files changed
+12 -8

No files matched your search

+7 -4
View File
@@ -216,10 +216,13 @@ pub fn run_benchmark(
/ (res.time_real + prepare_res.time_real + shell_spawning_time.time_real))
as u64;
let count = cmp::min(
cmp::max(runs_in_min_time, options.runs.min),
options.runs.max
);
let count = {
let min = cmp::max(runs_in_min_time, options.runs.min);
options.runs.max.as_ref()
.map(|max| cmp::min(min, *max))
.unwrap_or(min)
};
let count_remaining = count - 1;