pub struct Comparison {
pub baseline_median_ns: f64,
pub median_ns: f64,
pub delta_pct: f64,
pub low_pct: f64,
pub high_pct: f64,
pub verdict: Verdict,
}Expand description
This run’s median against a baseline’s, and how sure of the difference the two series allow anyone to be.
Fields§
§baseline_median_ns: f64§median_ns: f64§delta_pct: f64The shift between the two medians, as a percentage of the baseline’s. Positive is slower.
low_pct: f64The interval around delta_pct, at CONFIDENCE.
high_pct: f64§verdict: VerdictImplementations§
Source§impl Comparison
impl Comparison
Sourcepub fn of(baseline: &[u64], current: &[u64]) -> Comparison
pub fn of(baseline: &[u64], current: &[u64]) -> Comparison
Compares two series of wall times.
The interval is a percentile bootstrap on the relative shift between
the medians: resample each side with replacement, take the two
medians, and record (current - baseline) / baseline. The 2.5th and
97.5th percentiles of ten thousand such records are the interval.
A bootstrap rather than a t test because nothing here is normal and
the statistic is a median; a percentile bootstrap rather than a rank
test because what a refactor needs is not only “is there a
difference” but “how large could it be”, and the interval answers
both while a p value answers only the first.
Sourcepub fn to_json(self, benchmark: &str, of: &str, backend: &str) -> String
pub fn to_json(self, benchmark: &str, of: &str, backend: &str) -> String
The comparison as one line of the harness’s JSON output.
kind is comparison rather than the kind of the row compared, so
that a reader filtering on kind keeps finding exactly the rows it
was finding; of says which kind this line is about.
Trait Implementations§
Source§impl Clone for Comparison
impl Clone for Comparison
Source§fn clone(&self) -> Comparison
fn clone(&self) -> Comparison
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more