pub struct BetterThanPhase<'v> { /* private fields */ }Expand description
Cross-phase “is the candidate phase better than the baseline phase on this
metric?” comparator, returned by
crate::vmm::VmResult::better_across_phases (pooled aggregate) and
crate::vmm::VmResult::better_across_phases_cgroup (one named cgroup). The
polarity-aware sibling of CrossPhaseRatio: it reads two PER-PHASE scalars
(via phase_metric / phase_cgroup_metric, not a sampled series) and orients
“better” from the metric’s registry-declared
polarity, so the same call expresses “scheduler beats EEVDF” for a
LowerBetter latency AND a HigherBetter throughput without the test author
naming a direction. A missing/undirected/zero-baseline comparison is
Inconclusive (never a silent pass); a non-finite value is a Fail.
Implementations§
Source§impl<'v> BetterThanPhase<'v>
impl<'v> BetterThanPhase<'v>
Sourcepub fn better_than(self) -> &'v mut Verdict
pub fn better_than(self) -> &'v mut Verdict
Pass iff the candidate is STRICTLY better than the baseline per the metric’s polarity (LowerBetter: candidate < baseline; HigherBetter: candidate > baseline) — any improvement, no margin.
Sourcepub fn by_at_least(self, margin: f64) -> &'v mut Verdict
pub fn by_at_least(self, margin: f64) -> &'v mut Verdict
Pass iff the candidate improves on the baseline by at least margin, a
FRACTION of the baseline (0.10 = 10% better): LowerBetter requires
candidate <= baseline * (1 - margin), HigherBetter requires
candidate >= baseline * (1 + margin). by_at_least(0.0) means “no
regression” (at least as good). A zero baseline is Inconclusive (nothing
to scale the fractional margin against).
Auto Trait Implementations§
impl<'v> Freeze for BetterThanPhase<'v>
impl<'v> RefUnwindSafe for BetterThanPhase<'v>
impl<'v> Send for BetterThanPhase<'v>
impl<'v> Sync for BetterThanPhase<'v>
impl<'v> Unpin for BetterThanPhase<'v>
impl<'v> !UnwindSafe for BetterThanPhase<'v>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more