pub struct Hist { /* private fields */ }Expand description
a log-linear histogram
Implementations§
Source§impl Hist
impl Hist
pub fn new() -> Hist
Sourcepub fn with_bits(bits: u8) -> Hist
pub fn with_bits(bits: u8) -> Hist
bits linear steps per power of two as a power of two (1..=8)
pub fn bits(&self) -> u8
pub fn record(&mut self, v: u64)
pub fn record_n(&mut self, v: u64, n: u64)
pub fn count(&self) -> u64
pub fn sum(&self) -> u128
pub fn min(&self) -> Option<u64>
pub fn max(&self) -> Option<u64>
Sourcepub fn quantile(&self, per_mille: u32) -> Option<u64>
pub fn quantile(&self, per_mille: u32) -> Option<u64>
the value at per_mille (500: median, 990: p99, 1000: the largest)
pub fn p50(&self) -> Option<u64>
pub fn p95(&self) -> Option<u64>
pub fn p99(&self) -> Option<u64>
Sourcepub fn merge(&mut self, o: &Hist) -> bool
pub fn merge(&mut self, o: &Hist) -> bool
adds the values of another histogram of the same resolution (false otherwise)
pub fn clear(&mut self)
Trait Implementations§
impl Eq for Hist
impl StructuralPartialEq for Hist
Auto Trait Implementations§
impl Forget for Hist
impl Freeze for Hist
impl RefUnwindSafe for Hist
impl Send for Hist
impl Sync for Hist
impl Unpin for Hist
impl UnsafeUnpin for Hist
impl UnwindSafe for Hist
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