Struct prometheus_utils::Sample
source · [−]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
sourceimpl<T: Ord + Zero + Copy + Into<i64>> Sample<T>
impl<T: Ord + Zero + Copy + Into<i64>> Sample<T>
sourcepub fn as_bucket_pairs(&self) -> Vec<(TimingBucket, i64)>
pub fn as_bucket_pairs(&self) -> Vec<(TimingBucket, i64)>
Returns each member of the struct along with its TimingBucket
label. Each percentile is given as an i64.
Trait Implementations
sourceimpl<T: PartialEq + Ord + Zero + Copy> PartialEq<Sample<T>> for Sample<T>
impl<T: PartialEq + Ord + Zero + Copy> PartialEq<Sample<T>> for Sample<T>
impl<T: Eq + Ord + Zero + Copy> Eq for Sample<T>
impl<T: Ord + Zero + Copy> StructuralEq for Sample<T>
impl<T: Ord + Zero + Copy> StructuralPartialEq for Sample<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for Sample<T>where
T: RefUnwindSafe,
impl<T> Send for Sample<T>where
T: Send,
impl<T> Sync for Sample<T>where
T: Sync,
impl<T> Unpin for Sample<T>where
T: Unpin,
impl<T> UnwindSafe for Sample<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more