pub enum Dimension {
Kernel,
Scheduler,
Topology,
WorkType,
ProjectCommit,
KernelCommit,
RunSource,
ResolveSource,
CpuBudget,
}Expand description
Re-exports of the dimensional-slicing types used by
cargo-ktstr’s BuildCompareFilters::build() plumbing. The
stats module is pub(crate) (its tabular reporting types
have no stable surface yet), but the cargo-ktstr binary needs
Dimension and derive_slicing_dims to unit-test the
filter-builder shape (the BuildCompareFilters tests assert
which slicing dim a per-side filter pair derives). Same
pattern as CpuCap above: keep the canonical definitions in
stats (where the comparison plumbing consumes them
internally) and re-export the slim slicing surface through
cli so the binaries reach them through the public cli
module.
One of the nine dimensions that compose a GauntletRow’s
identity in the comparison pipeline: kernel, scheduler,
topology, work-type, project-commit, kernel-commit,
run-source, resolve-source, cpu-budget. Each maps to the corresponding
RowFilter field and GauntletRow field; the dimension
model lets compare_partitions derive its slicing dims and
dynamic pairing key without hardcoding the dimension list at
every call site. Variant names match the CLI flag suffix
(e.g. Dimension::ProjectCommit ↔ --project-commit,
Dimension::RunSource ↔ --run-source,
Dimension::CpuBudget ↔ --cpu-budget) so a reader can map
from operator surface to internal enum without a translation
table.
scenario is NOT a dimension — it is the test name and is
always part of the pairing key (you can’t compare scenario A
against scenario B; that would compare unrelated tests).
Iteration order via Dimension::ALL is deterministic and
matches the order operators read in the CLI flags
(--kernel / --scheduler / --topology / --work-type /
--project-commit / --kernel-commit / --run-source /
--resolve-source / --cpu-budget), so generated labels and error messages list
dims in a stable, predictable order.
Variants§
Implementations§
Source§impl Dimension
impl Dimension
Sourcepub const ALL: &'static [Dimension]
pub const ALL: &'static [Dimension]
Every dimension in CLI-flag order. Used by
Self::pairing_dims (invoked from compare_partitions) to
compute the pairing-dim complement set (all dims minus slicing
dims). The sliceable subset derive_slicing_dims contrasts on
is Self::SLICEABLE.
Sourcepub const SLICEABLE: &'static [Dimension]
pub const SLICEABLE: &'static [Dimension]
The dimensions that may form an A/B CONTRAST (slice). Only the
version axes are contrastable: comparing across a project commit,
a kernel version, or a kernel commit is a purposeful “did this
change regress” question. Every other dimension
(scheduler/topology/work_type/run_source/resolve_source/cpu_budget)
is FILTER + PAIRING only — it narrows the cohort and joins A to B,
but contrasting across it bulk-compares heterogeneous runs
(different configs/hosts/conditions), which the significance math
cannot soundly attribute. A cross-config question is answered
in-test via the Verdict DSL (better_across_phases), not here.
Sourcepub fn pairing_dims(slicing: &[Dimension]) -> Vec<Dimension>
pub fn pairing_dims(slicing: &[Dimension]) -> Vec<Dimension>
Compute pairing dims from a slicing-dim set: every
dimension in Dimension::ALL that is NOT in slicing,
in canonical order. This is the dynamic key derivation the
comparison pipeline uses everywhere — slicing dims define
the contrast (different on A vs B), pairing dims define
the join (same across A and B). A non-Self::SLICEABLE dimension is
never in slicing, so it is always a pairing dim.
Trait Implementations§
Source§impl Ord for Dimension
impl Ord for Dimension
Source§impl PartialOrd for Dimension
impl PartialOrd for Dimension
impl Copy for Dimension
impl Eq for Dimension
impl StructuralPartialEq for Dimension
Auto Trait Implementations§
impl Freeze for Dimension
impl RefUnwindSafe for Dimension
impl Send for Dimension
impl Sync for Dimension
impl Unpin for Dimension
impl UnwindSafe for Dimension
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§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