[][src]Struct hdrhist::HDRHist

pub struct HDRHist { /* fields omitted */ }

An hdr histogram that collects u64 sample with 5 bit precision.

Methods

impl HDRHist[src]

pub fn new() -> Self[src]

Construct an empty hdr histogram.

pub fn add_value(&mut self, value: u64)[src]

Add a sample to the histogram.

This is guaranteed to be constant time and never re-allocates.

pub fn combined(self, other: Self) -> Self[src]

Combine this histogram with another. This doesn't normalize, and only adds the per-bucket counts. Only use it for histograms that have captured a comparable number of samples.

pub fn ccdf<'a>(
    &'a self
) -> impl Iterator<Item = (u64, f64, u64)> + 'a
[src]

Output the complementary cumulative distribution function (ccdf) of the samples

Returns an iterator over increasing sample values such that, for every triple (value, prob, count), prob is the ratio of samples >= value, and count is the number of samples >= the current value and < the next value.

pub fn ccdf_upper_bound<'a>(
    &'a self
) -> impl Iterator<Item = (u64, f64)> + 'a
[src]

Outputs an upper bound of the complementary cumulative distribution function (ccdf) of the samples.

You can use these points to plot with linear interpolation and never report intermediate sample values that underestimate quantiles. In other words, all the actual quantile values will be below the reported curve.

pub fn ccdf_lower_bound<'a>(
    &'a self
) -> impl Iterator<Item = (u64, f64)> + 'a
[src]

Outputs an upper bound of the complementary cumulative distribution function (ccdf) of the samples.

You can use these points to plot with linear interpolation and never report intermediate sample values that overestimate quantiles. In other words, all the actual quantile values will be above the reported curve.

pub fn quantiles<'a>(
    &'a self,
    quantiles: impl Iterator<Item = f64> + 'a
) -> impl Iterator<Item = (f64, u64, u64)> + 'a
[src]

Output estimated quantiles as (quantile, lower_bound, upper_bound) pairs

Each quantile's value is somewhere >= lower_bound and < upper_bound

pub fn summary<'a>(
    &'a self
) -> impl Iterator<Item = (f64, u64, u64)> + 'a
[src]

Output a summary of estimated quantiles

pub fn summary_string(&self) -> String[src]

Output a text summary of estimated quantiles

Trait Implementations

impl Clone for HDRHist[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for HDRHist

impl Sync for HDRHist

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.