#[non_exhaustive]pub struct Stats { /* private fields */ }Expand description
The NExit metric.
This metric counts the number of possible exit points from a function/method.
Implementations§
Source§impl Stats
impl Stats
Sourcepub fn nexits_sum(&self) -> u64
pub fn nexits_sum(&self) -> u64
Returns the NExit metric sum value
Sourcepub fn nexits_min(&self) -> u64
pub fn nexits_min(&self) -> u64
Returns the NExit metric minimum value.
Collapses the usize::MAX sentinel that Stats::default() plants
into exit_min to 0, so a never-observed space
serializes to a meaningful number rather than 1.8446744e19.
Sourcepub fn nexits_max(&self) -> u64
pub fn nexits_max(&self) -> u64
Returns the NExit metric maximum value
Sourcepub fn nexits_average(&self) -> f64
pub fn nexits_average(&self) -> f64
Returns the NExit metric average value
This value is computed dividing the NExit value
for the total number of functions/closures in a space.
The per-function divisor (shared with cyclomatic/cognitive/
nargs, #512) is guarded with .max(1) via the shared average
helper, so a space with no counted functions (or one where Nom
was not selected) degrades to sum / 1 instead of producing
inf/NaN (#428).