RowFilter

Struct RowFilter 

Source
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 on compare_rows_by (-E) stays as the only fuzzy-match knob; typed fields are exact so a --scheduler scx_rusty filter does NOT spuriously match scx_rusty_alt.
  • kernels — repeatable, OR-combined: a row matches iff its kernel_version equals ANY entry in kernels. Mirrors the --kernel flag on cargo ktstr test/coverage/llvm-cov so the same flag name carries the same multi-value semantic across every subcommand.
  • project_commits — repeatable, OR-combined: a row matches iff its commit equals ANY entry in project_commits. Same multi-value semantic as kernels, applied to the ktstr project commit recorded by detect_project_commit at sidecar-write time. Surfaced as the --project-commit CLI flag.
  • kernel_commits — repeatable, OR-combined: a row matches iff its kernel_commit equals ANY entry in kernel_commits. Same multi-value semantic as project_commits, applied to the kernel source-tree commit recorded by crate::test_support::sidecar::detect_kernel_commit at sidecar-write time. Filters on the kernel HEAD, NOT on the kernel release version (kernels is the version filter).
  • run_sources — repeatable, OR-combined: a row matches iff its run_source equals ANY entry in run_sources. Same multi-value semantic as kernels / project_commits / kernel_commits, applied to the run-environment provenance tag ("local", "ci", "archive") recorded by crate::test_support::sidecar::detect_run_source at 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-source CLI flag.
  • A kernels-populated filter against a row whose kernel_version is None ALWAYS fails (no wildcard semantic) — the operator wrote specific versions and a None-row would silently dilute the set. The same opt-in policy applies to project_commits against rows with commit == None, to kernel_commits against rows with kernel_commit == None, and to run_sources against rows with run_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§

Source§

impl RowFilter

Source

pub fn matches(&self, row: &GauntletRow) -> bool

Returns true when every populated filter field matches the row. The empty RowFilter (default) returns true for every row — it’s the identity filter.

Trait Implementations§

Source§

impl Clone for RowFilter

Source§

fn clone(&self) -> RowFilter

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RowFilter

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RowFilter

Source§

fn default() -> RowFilter

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> MaybeSend for T
where T: Send,

§

impl<T> MaybeSend for T
where T: Send,