#[non_exhaustive]pub struct DerivedRow {Show 13 fields
pub group_key: String,
pub display_key: String,
pub thread_count_a: usize,
pub thread_count_b: usize,
pub metric_name: &'static str,
pub metric_ladder: ScaleLadder,
pub is_ratio: bool,
pub baseline: Option<DerivedValue>,
pub candidate: Option<DerivedValue>,
pub delta: Option<f64>,
pub delta_pct: Option<f64>,
pub sort_by_cell: Option<String>,
pub sort_by_delta: Option<f64>,
}Expand description
One row in the derived-metrics table: (matched group, derivation) with the computed scalar from both sides.
Mirrors DiffRow in shape so the renderer can reuse the
same (group | threads | metric | baseline | candidate | delta | %) column layout. The % column is suppressed for
rows whose derivation is a ratio
(super::DerivedMetricDef::is_ratio true) — absolute delta on a
[0, 1] ratio is already in percentage points so a delta_pct
readout would be confusing.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.group_key: String§display_key: String§thread_count_a: usize§thread_count_b: usize§metric_name: &'static str§metric_ladder: ScaleLadderAuto-scale ladder for the row’s value/delta cells. Mirrors
DiffRow::metric_ladder; sourced from
super::DerivedMetricDef::ladder at build time.
is_ratio: boolTrue when the derivation produces a ratio. Renderer
suppresses the % column for ratio rows.
baseline: Option<DerivedValue>None when the input metric was missing on this side or
the formula divides by zero.
candidate: Option<DerivedValue>None with the same semantics as Self::baseline.
delta: Option<f64>Signed candidate − baseline; None when either side is
None.
delta_pct: Option<f64>delta / baseline; None when baseline is zero, either
side is None, OR the row is a ratio (suppressed for
ratios so a 0.5 → 0.6 row doesn’t render as
+20% when the natural read is +10pp).
sort_by_cell: Option<String>Pre-rendered cell string for the SortBy column under
--sort-by. Same value for every row in a group; None
when no --sort-by is set. Mirrors
DiffRow::sort_by_cell.
sort_by_delta: Option<f64>Sort metric’s delta for this group, used to color the
SortBy column. Mirrors DiffRow::sort_by_delta.
Trait Implementations§
Source§impl Clone for DerivedRow
impl Clone for DerivedRow
Source§fn clone(&self) -> DerivedRow
fn clone(&self) -> DerivedRow
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for DerivedRow
impl RefUnwindSafe for DerivedRow
impl Send for DerivedRow
impl Sync for DerivedRow
impl Unpin for DerivedRow
impl UnwindSafe for DerivedRow
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