mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-01 08:50:19 +00:00
Switch to unit-safe quantities
This commit is contained in:
1 parent
914d5cbc59
commit
f9aa299c0f
15 files changed
+399
-287
No files matched your search
@@ -1,7 +1,8 @@
|
||||
use std::fmt;
|
||||
|
||||
use crate::benchmark::quantity::Second;
|
||||
use crate::benchmark::MIN_EXECUTION_TIME;
|
||||
use crate::quantity::{FormatQuantity, Time, TimeUnit};
|
||||
use crate::output::format::format_duration;
|
||||
|
||||
pub struct OutlierWarningOptions {
|
||||
pub warmup_in_use: bool,
|
||||
@@ -21,11 +22,10 @@ impl fmt::Display for Warnings {
|
||||
match *self {
|
||||
Warnings::FastExecutionTime => write!(
|
||||
f,
|
||||
"Command took less than {} ms to complete. Note that the results might be \
|
||||
"Command took less than {MIN_EXECUTION_TIME} to complete. Note that the results might be \
|
||||
inaccurate because hyperfine can not calibrate the shell startup time much \
|
||||
more precise than this limit. You can try to use the `-N`/`--shell=none` \
|
||||
option to disable the shell completely.",
|
||||
MIN_EXECUTION_TIME.format_with_precision(TimeUnit::MilliSecond, 0)
|
||||
),
|
||||
Warnings::NonZeroExitCode => write!(f, "Ignoring non-zero exit code."),
|
||||
Warnings::SlowInitialRun(time_first_run, ref options) => write!(
|
||||
|
||||
Reference in new issue
Block a user