pub struct Histogram {
pub name: &'static str,
/* private fields */
}
Expand description
AHistogram for Hyperlight A named histogram
Fields§
§name: &'static str
The name of the histogram
Implementations§
Source§impl Histogram
impl Histogram
Sourcepub fn new(name: &'static str, help: &str, buckets: Vec<f64>) -> Result<Self>
pub fn new(name: &'static str, help: &str, buckets: Vec<f64>) -> Result<Self>
Creates a new histogram and registers it with the metric registry
Sourcepub fn get_sample_sum(&self) -> f64
pub fn get_sample_sum(&self) -> f64
Gets the sum of values of an Histogram
Sourcepub fn get_sample_count(&self) -> u64
pub fn get_sample_count(&self) -> u64
Gets the count of values of an Histogram
Trait Implementations§
Source§impl From<Histogram> for HyperlightMetric
impl From<Histogram> for HyperlightMetric
Source§impl<S: HyperlightMetricOps> GetHyperlightMetric<Histogram> for S
impl<S: HyperlightMetricOps> GetHyperlightMetric<Histogram> for S
Source§impl<'a> TryFrom<&'a HyperlightMetric> for &'a Histogram
impl<'a> TryFrom<&'a HyperlightMetric> for &'a Histogram
Source§type Error = HyperlightError
type Error = HyperlightError
The type returned in the event of a conversion error.
Source§fn try_from(metric: &'a HyperlightMetric) -> Result<Self>
fn try_from(metric: &'a HyperlightMetric) -> Result<Self>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for Histogram
impl RefUnwindSafe for Histogram
impl Send for Histogram
impl Sync for Histogram
impl Unpin 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