pub struct FixedHistogramSnapshot {
pub bounds: Vec<u64>,
pub counts: Vec<u64>,
pub overflow: u64,
pub count: u64,
pub sum: u64,
}Expand description
Snapshot of a non-cumulative fixed-bucket histogram.
Fields§
§bounds: Vec<u64>Inclusive upper bound for each bucket.
counts: Vec<u64>Per-bucket counts; values are not cumulative.
overflow: u64Values larger than the final bound.
count: u64Total observations including overflow.
sum: u64Wrapping sum of all observed values.
Implementations§
Source§impl FixedHistogramSnapshot
impl FixedHistogramSnapshot
Sourcepub fn percentile(&self, percentile: f64) -> Option<u64>
pub fn percentile(&self, percentile: f64) -> Option<u64>
Returns the inclusive bucket bound containing the requested approximate percentile.
percentile is clamped to 0.0..=1.0. Overflow observations return the final finite
bound because the histogram intentionally stores no dynamic maximum.
Trait Implementations§
Source§impl Clone for FixedHistogramSnapshot
impl Clone for FixedHistogramSnapshot
Source§fn clone(&self) -> FixedHistogramSnapshot
fn clone(&self) -> FixedHistogramSnapshot
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FixedHistogramSnapshot
impl Debug for FixedHistogramSnapshot
impl Eq for FixedHistogramSnapshot
Source§impl PartialEq for FixedHistogramSnapshot
impl PartialEq for FixedHistogramSnapshot
impl StructuralPartialEq for FixedHistogramSnapshot
Auto Trait Implementations§
impl Freeze for FixedHistogramSnapshot
impl RefUnwindSafe for FixedHistogramSnapshot
impl Send for FixedHistogramSnapshot
impl Sync for FixedHistogramSnapshot
impl Unpin for FixedHistogramSnapshot
impl UnsafeUnpin for FixedHistogramSnapshot
impl UnwindSafe for FixedHistogramSnapshot
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more