mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-10-31 16:40:18 +00:00
Add new (hidden) --min-benchmarking-time option
This commit is contained in:
1 parent
77e1b5e72f
commit
dffbdc34d4
4 files changed
+24
-4
No files matched your search
+7
-1
@@ -226,7 +226,7 @@ impl Options {
|
||||
.value_of(param)
|
||||
.map(|n| {
|
||||
n.parse::<u64>()
|
||||
.map_err(|e| OptionsError::NumericParsingError(param, e))
|
||||
.map_err(|e| OptionsError::IntParsingError(param, e))
|
||||
})
|
||||
.transpose()
|
||||
};
|
||||
@@ -345,6 +345,12 @@ impl Options {
|
||||
_ => None,
|
||||
};
|
||||
|
||||
if let Some(time) = matches.value_of("min-benchmarking-time") {
|
||||
options.min_benchmarking_time = time
|
||||
.parse::<f64>()
|
||||
.map_err(|e| OptionsError::FloatParsingError("min-benchmarking-time", e))?;
|
||||
}
|
||||
|
||||
Ok(options)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user