Module stats

Source
Expand description

Statistics utilities.

Structsยง

SlidingMinMax
Keeps track of the minimum and maximum value over a fixed-size sliding window of samples.

Constantsยง

HISTOGRAM_BYTE_BUCKETS
Buckets that capture sizes of 64 bytes up to a gigabyte
HISTOGRAM_MILLISECOND_BUCKETS ๐Ÿ”’
A standard range of buckets for timing data, measured in seconds. Individual histograms may only need a subset of this range, in which case, see histogram_seconds_buckets below.
HISTOGRAM_SECOND_BUCKETS ๐Ÿ”’
A standard range of buckets for timing data, measured in seconds. Individual histograms may only need a subset of this range, in which case, see histogram_seconds_buckets below.

Functionsยง

histogram_milliseconds_buckets
Returns a Vec of time buckets that are both present in our standard buckets above and within the provided inclusive range. (This makes it more meaningful to compare latency percentiles across histograms if needed, without requiring all metrics to use exactly the same buckets.)
histogram_seconds_buckets
Returns a Vec of time buckets that are both present in our standard buckets above and within the provided inclusive range. (This makes it more meaningful to compare latency percentiles across histograms if needed, without requiring all metrics to use exactly the same buckets.)
po_max ๐Ÿ”’
Like std::cmp::max, but works with PartialOrd values.
po_min ๐Ÿ”’
Like std::cmp::min, but works with PartialOrd values.