mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-10-12 02:22:35 +00:00
Resolve overlap with merged result refactors and iteration support
This commit is contained in:
@@ -14,15 +14,6 @@ pub struct Parameter {
|
||||
|
||||
/// Meta data and performance metrics for a single benchmark
|
||||
#[derive(Debug, Default, Clone, Serialize, PartialEq)]
|
||||
#[serde(transparent)]
|
||||
pub struct Parameter {
|
||||
pub value: String,
|
||||
#[serde(skip)]
|
||||
pub is_unused: bool,
|
||||
}
|
||||
|
||||
/// Meta data and performance metrics for a single benchmark
|
||||
#[derive(Debug, Default, Clone, PartialEq)]
|
||||
pub struct BenchmarkResult {
|
||||
/// The full command line of the program that is being benchmarked
|
||||
pub command: String,
|
||||
|
||||
@@ -259,7 +259,8 @@ impl<'a> Benchmark<'a> {
|
||||
None
|
||||
};
|
||||
|
||||
let preparation_result = run_preparation_command()?;
|
||||
let benchmark_iteration = BenchmarkIteration::Benchmark(0);
|
||||
let preparation_result = run_preparation_command(benchmark_iteration)?;
|
||||
let preparation_overhead = preparation_result.map_or(Time::zero(), |res| {
|
||||
res.time_wall_clock + self.executor.time_overhead()
|
||||
});
|
||||
@@ -288,7 +289,7 @@ impl<'a> Benchmark<'a> {
|
||||
);
|
||||
}
|
||||
|
||||
let conclusion_result = run_conclusion_command()?;
|
||||
let conclusion_result = run_conclusion_command(benchmark_iteration)?;
|
||||
let conclusion_overhead = conclusion_result.map_or(Time::zero(), |res| {
|
||||
res.time_wall_clock + self.executor.time_overhead()
|
||||
});
|
||||
|
||||
@@ -107,7 +107,7 @@ pub fn standard_deviation<Q: UnsafeRawValue>(values: impl IntoIterator<Item = Q>
|
||||
Q::unsafe_from_raw_value(result)
|
||||
}
|
||||
|
||||
/// Compute modifized Z-scores for a given sample. A (unmodified) Z-score is defined by
|
||||
/// Compute modified Z-scores for a given sample. A (unmodified) Z-score is defined by
|
||||
/// `(x_i - x_mean)/x_stddev` whereas the modified Z-score is defined by `(x_i - x_median)/MAD`
|
||||
/// where MAD is the median absolute deviation.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user