pub struct Sample<T: Ord + Zero + Copy> {
    pub dropped: usize,
    pub wraps: usize,
    pub p25: T,
    pub p50: T,
    pub p75: T,
    pub p90: T,
    pub p95: T,
    pub p99: T,
    pub p99p9: T,
    pub max: T,
    pub count: usize,
}
Expand description

A sample of the state in Observations.

Fields

dropped: usize

Number of observations dropped due to lock contention

wraps: usize

Number of times the observation window wrapped around

p25: T

25th percentile observation

p50: T

50th percentile observation

p75: T

75th percentile observation

p90: T

90th percentile observation

p95: T

95th percentile observation

p99: T

99th percentile observation

p99p9: T

99.9th percentile observation

max: T

Maximum observation

count: usize

Number of observations

Implementations

Returns each member of the struct along with its TimingBucket label. Each percentile is given as an i64.

Returns the number of observations dropped due to the observation lock being held.

Returns the number of times the observation count exceeded the available window size.

Trait Implementations

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.