pub fn derive_slicing_dims(
filter_a: &RowFilter,
filter_b: &RowFilter,
) -> Vec<Dimension>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.
Derive the set of dimensions on which filter_a and
filter_b differ. These are the SLICING dimensions —
dimensions on which the two sides select disjoint cohorts and
therefore form the A/B contrast. The complement (every other
dimension) is the PAIRING-key dimension set used by
compare_rows to join A-side rows against B-side rows.
Comparison shape per dimension: every dim uses the same
SORTED-DEDUPED Vec<&str> comparison — order and multiplicity
don’t matter (--a-kernel 6.14 --a-kernel 6.15 and
--b-kernel 6.15 --b-kernel 6.14 are NOT a slice). All nine
dimensions are repeatable Vec filters; the previously
Option<String>-typed scheduler / topology / work_type
dims were promoted to Vec<String> so the operator-visible
shape is uniform across every dimension.
Returns dimensions in canonical (Dimension::ALL) order so callers
(header lines, error messages, side labels) get a stable presentation.
Only a Dimension::SLICEABLE dimension can be a slicing dim; the
non-sliceable dims are filter + pairing only and are only ever set via a
single shared --<x> filter (applied to BOTH sides), so they can never
differ A↔B — the walk skips them.