Module stats

Source
Expand description

Type safe descriptive statistics

Count, average, standard deviation, median and percentiles, with the number unit (ViewType) and tiles count verified in the type system, and ability to handle weighted values.

Modules§

average
Average trait (can’t find in std lib?)
weighted
Weighted values

Structs§

Stats
ViewType is perhaps a bit of a misnomer: simply the type that the statistics is made for, e.g. NanoTime. But that type must, for full functionality, support conversion to and from u64, and ToStatsString for viewing.

Enums§

StatsError
StatsField
Selects a field of Stats, e.g. to calculate the stats for one of the Stats fields.
SubStats
A way to give full access to Stats structs with the possible parameterizations, unlike the dyn TableViewRow approach which only gives access to that interface. Also avoid the need for boxing, perhaps performance relevant. (But then, somewhat funnily?, we need to implement TableViewRow for this, too.)
SubStatsKind

Traits§

ToStatsString
Convert a value to a string in a unit and corresponding representation suitable for the stats here.