pub struct Histogram {
pub total: u64,
pub sum: f64,
/* private fields */
}Expand description
A histogram for profiling measurements.
Fields§
§total: u64Total observations.
sum: f64Sum of all observations (for mean).
Implementations§
Source§impl Histogram
impl Histogram
Sourcepub fn new(n: usize, min_val: f64, max_val: f64) -> Self
pub fn new(n: usize, min_val: f64, max_val: f64) -> Self
Create a histogram with n equal-width buckets in [min_val, max_val].
Sourcepub fn mode_bucket(&self) -> Option<&HistogramBucket>
pub fn mode_bucket(&self) -> Option<&HistogramBucket>
Bucket with the most observations (mode bucket).
Sourcepub fn render_ascii(&self) -> String
pub fn render_ascii(&self) -> String
Render a simple ASCII histogram.
Auto Trait Implementations§
impl Freeze for Histogram
impl RefUnwindSafe for Histogram
impl Send for Histogram
impl Sync for Histogram
impl Unpin for Histogram
impl UnsafeUnpin for Histogram
impl UnwindSafe for Histogram
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