pub struct SubMsStageSummary {
pub name: String,
pub count: usize,
pub p50_ns: u64,
pub p99_ns: u64,
pub p999_ns: u64,
pub max_ns: u64,
pub mean_ns: u64,
pub stddev_ns: u64,
pub cdf_buckets_ns: Vec<u64>,
pub jitter_score: f64,
pub samples_ns: Option<Vec<u64>>,
}Expand description
Per-stage summary. The counterpart of one stages.<name> entry in the
subms JSON contract.
samples_ns carries the downsampled (max-500) chronological timeline
emitted by crate::summarize; crate::summarize_lean leaves it None.
Does NOT derive Eq because jitter_score: f64 can be NaN. Use
PartialEq instead, and prefer comparing the integer fields explicitly
in tests rather than assert_eq!-ing the whole struct.
Fields§
§name: String§count: usize§p50_ns: u64§p99_ns: u64§p999_ns: u64§max_ns: u64§mean_ns: u64§stddev_ns: u64Sample-standard-deviation across the (post-warmup-skip) timings.
0 when count < 2. Added in subms 0.4.0; the JSON contract emits
it as stddev_ns and older readers ignore the field.
cdf_buckets_ns: Vec<u64>Log2-spaced histogram of the chronological samples. 64 buckets
covering 1ns .. ~18.4s (2^0 .. 2^64 ns). Each entry is the count
of samples whose value falls in [2^i, 2^(i+1)) nanoseconds.
Empty (all-zero) when the stage has no samples. The full CDF can
be reconstructed by cumulative sum across the array.
Added in subms 0.5.0; the JSON contract emits it as
cdf_buckets_ns and older readers ignore the field.
jitter_score: f64Jitter score in [0.0, 1.0]: coefficient of variation of the
per-window mean across non-overlapping 32-sample windows,
clamped. 0 = perfectly stable measurement environment, 1+ = the
underlying noise floor dominates the signal. Useful for spotting
bench runs where the measurement rig was unstable, separate
from the algorithm’s own tail.
Added in subms 0.5.0.
samples_ns: Option<Vec<u64>>Trait Implementations§
Source§impl Clone for SubMsStageSummary
impl Clone for SubMsStageSummary
Source§fn clone(&self) -> SubMsStageSummary
fn clone(&self) -> SubMsStageSummary
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SubMsStageSummary
impl Debug for SubMsStageSummary
Source§impl PartialEq for SubMsStageSummary
impl PartialEq for SubMsStageSummary
Source§fn eq(&self, other: &SubMsStageSummary) -> bool
fn eq(&self, other: &SubMsStageSummary) -> bool
self and other values to be equal, and is used by ==.