format_value_cell

Function format_value_cell 

Source
pub fn format_value_cell(agg: &Aggregated, ladder: ScaleLadder) -> String
Expand description

Format a per-row baseline / candidate cell for super::write_diff. Numeric aggregates (Aggregated::Sum / Aggregated::Max) run through auto_scale so large values render in a readable magnitude (1.235ms instead of 1234567ns). When the scaled unit equals the ladder’s base unit (no step-up was triggered), the original integer value is rendered verbatim — this avoids polluting small numbers with a .000 suffix. Non-numeric aggregates (OrdinalRange, Mode, Affinity) fall through to the Aggregated std::fmt::Display impl unchanged because no scaling applies; the ladder is ScaleLadder::None for these and the suffix is empty.