pub struct RowFilter {
pub kernels: Vec<String>,
pub project_commits: Vec<String>,
pub kernel_commits: Vec<String>,
pub run_sources: Vec<String>,
pub resolve_sources: Vec<String>,
pub cpu_budgets: Vec<String>,
pub schedulers: Vec<String>,
pub topologies: Vec<String>,
pub work_types: Vec<String>,
}Expand description
Re-export of the comparison-policy types so downstream crates
using ktstr::cli as their public surface don’t need to reach
into the internal ktstr::stats module (which is pub(crate) —
see lib.rs — and therefore not a stable public path). The
policy is the only item in stats that a CLI or external
consumer constructs directly; every other item is internal
plumbing reached via cli::compare_partitions.
Typed-field filter set for narrowing GauntletRow sets in the
cargo ktstr perf-delta pipeline. Every field is None /
empty by default; populated fields are AND-combined ACROSS
fields, with field-internal OR/AND semantics described per-field
below. Applied via apply_row_filters in compare_partitions
before the rows reach compare_rows_by.
Match semantics:
scheduler/topology/work_type— STRICT EQUALITY against the row’s corresponding field. The sibling substring filter oncompare_rows_by(-E) stays as the only fuzzy-match knob; typed fields are exact so a--scheduler scx_rustyfilter does NOT spuriously matchscx_rusty_alt.kernels— repeatable, OR-combined: a row matches iff itskernel_versionequals ANY entry inkernels. Mirrors the--kernelflag oncargo ktstr test/coverage/llvm-covso the same flag name carries the same multi-value semantic across every subcommand.project_commits— repeatable, OR-combined: a row matches iff itscommitequals ANY entry inproject_commits. Same multi-value semantic askernels, applied to the ktstr project commit recorded bydetect_project_commitat sidecar-write time. Surfaced as the--project-commitCLI flag.kernel_commits— repeatable, OR-combined: a row matches iff itskernel_commitequals ANY entry inkernel_commits. Same multi-value semantic asproject_commits, applied to the kernel source-tree commit recorded bycrate::test_support::sidecar::detect_kernel_commitat sidecar-write time. Filters on the kernel HEAD, NOT on the kernel release version (kernelsis the version filter).run_sources— repeatable, OR-combined: a row matches iff itsrun_sourceequals ANY entry inrun_sources. Same multi-value semantic askernels/project_commits/kernel_commits, applied to the run-environment provenance tag ("local","ci","archive") recorded bycrate::test_support::sidecar::detect_run_sourceat sidecar-write time, or rewritten to"archive"at load time when the consumer pulled the pool from a non-default--dir. Surfaced as the--run-sourceCLI flag.- A
kernels-populated filter against a row whosekernel_versionisNoneALWAYS fails (no wildcard semantic) — the operator wrote specific versions and aNone-row would silently dilute the set. The same opt-in policy applies toproject_commitsagainst rows withcommit == None, tokernel_commitsagainst rows withkernel_commit == None, and torun_sourcesagainst rows withrun_source == None.
Empty RowFilter (every field None/empty) is the no-op default
and matches every row. Use RowFilter::default() to build it.
Fields§
§kernels: Vec<String>Repeatable kernel-version filter, OR-combined: a row matches
iff its GauntletRow::kernel_version equals ANY entry. Empty
vec disables the filter (“do not filter on kernel”). A row
whose kernel_version is itself None never matches a
non-empty filter.
project_commits: Vec<String>Repeatable project-commit filter, OR-combined: a row matches
iff its GauntletRow::commit equals ANY entry. Empty vec
disables the filter (“do not filter on commit”). A row whose
commit is itself None never matches a non-empty filter
— same opt-in semantic as kernels.
Field name project_commits (renamed from commits)
disambiguates from the sibling kernel_commits field — both
describe commit dimensions, so the prefix makes “which
repository’s commit?” obvious at every call site.
kernel_commits: Vec<String>Repeatable kernel-source-commit filter, OR-combined: a row
matches iff its GauntletRow::kernel_commit equals ANY
entry. Empty vec disables the filter (“do not filter on
kernel commit”). A row whose kernel_commit is itself
None never matches a non-empty filter — same opt-in
semantic as project_commits.
Distinct from project_commits (the ktstr framework commit)
and from kernels (the kernel release version): two runs
with the same kernel_version but different kernel_commit
values represent the same release rebuilt from different
trees (e.g. WIP patches on top, a different remote ref).
run_sources: Vec<String>Repeatable run-environment-source filter, OR-combined: a row
matches iff its GauntletRow::run_source equals ANY entry.
Empty vec disables the filter (“do not filter on
run_source”). A row whose run_source is itself None
(sidecar pre-dates the field) never matches a non-empty
filter — same opt-in semantic as kernels /
project_commits / kernel_commits.
Typical values: "local", "ci", "archive". The schema
is open: any string is acceptable so a future producer can
introduce a new tag without a version bump.
Field name run_sources (renamed from sources)
disambiguates from KernelMetadata.source /
crate::cache::KernelSource — those describe the kernel
build’s input, this describes the run-environment provenance.
resolve_sources: Vec<String>Repeatable scheduler-resolution-source filter, OR-combined: a
row matches iff its GauntletRow::resolve_source equals ANY
entry. Empty vec disables the filter. A row whose
resolve_source is None (sidecar pre-dates the field, or a
skip resolved no binary) never matches a non-empty filter —
same opt-in semantic as run_sources. Values are the
crate::test_support::ResolveSource::as_str tags
("auto_built", "target_debug", "path", …). Distinct from
run_sources (the run ENVIRONMENT): this is HOW the scheduler
binary was found. Backs the Dimension::ResolveSource filter +
pairing dim (--resolve-source).
cpu_budgets: Vec<String>Repeatable cpu-budget filter, OR-combined: a row matches iff its
GauntletRow::cpu_budget (the effective host-CPU budget, as a
decimal string) equals ANY entry. Empty vec disables the filter.
Rows with cpu_budget == None (skips) are dropped when this filter
is non-empty, mirroring kernels / run_sources. Backs the
Dimension::CpuBudget filter + pairing dim (--cpu-budget).
schedulers: Vec<String>Repeatable scheduler-name filter, OR-combined: a row matches
iff its GauntletRow::scheduler equals ANY entry. Empty vec
disables the filter (“do not filter on scheduler”). Strict
equality on each entry — the substring -E filter is the
only fuzzy-match knob; typed flags exact-match. Mirrors the
shape of kernels / project_commits / kernel_commits /
run_sources so every typed dimension supports the same
repeatable OR-combined idiom.
topologies: Vec<String>Repeatable topology filter, OR-combined: a row matches iff
its GauntletRow::topology equals ANY entry. The filter
values are the rendered form (e.g. "1n2l4c2t") that
Topology::Display emits and cargo ktstr stats list
shows. Empty vec disables the filter.
work_types: Vec<String>Repeatable work-type filter, OR-combined: a row matches iff
its GauntletRow::work_type equals ANY entry. Valid names
are the PascalCase variants of WorkType::ALL_NAMES. Empty
vec disables the filter.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RowFilter
impl RefUnwindSafe for RowFilter
impl Send for RowFilter
impl Sync for RowFilter
impl Unpin for RowFilter
impl UnwindSafe for RowFilter
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<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