pub struct MetricDistribution {
pub buckets: Vec<HistogramBucket>,
pub total_count: u64,
pub min: Option<f64>,
pub max: Option<f64>,
pub mean: Option<f64>,
pub std_dev: Option<f64>,
}Expand description
Represents a histogram distribution of values.
Used for metrics that capture value distributions rather than single values.
Fields§
§buckets: Vec<HistogramBucket>The histogram buckets with their boundaries and counts.
total_count: u64Total count of values in the distribution.
min: Option<f64>Minimum value in the distribution.
max: Option<f64>Maximum value in the distribution.
mean: Option<f64>Mean value of the distribution.
std_dev: Option<f64>Standard deviation of the distribution.
Implementations§
Source§impl MetricDistribution
impl MetricDistribution
Sourcepub fn from_buckets(buckets: Vec<HistogramBucket>) -> Self
pub fn from_buckets(buckets: Vec<HistogramBucket>) -> Self
Creates a distribution from a set of buckets.
Trait Implementations§
Source§impl Clone for MetricDistribution
impl Clone for MetricDistribution
Source§fn clone(&self) -> MetricDistribution
fn clone(&self) -> MetricDistribution
Returns a duplicate of the value. Read more
1.0.0 · 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 MetricDistribution
impl Debug for MetricDistribution
Source§impl Default for MetricDistribution
impl Default for MetricDistribution
Source§impl<'de> Deserialize<'de> for MetricDistribution
impl<'de> Deserialize<'de> for MetricDistribution
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for MetricDistribution
impl PartialEq for MetricDistribution
Source§impl Serialize for MetricDistribution
impl Serialize for MetricDistribution
impl StructuralPartialEq for MetricDistribution
Auto Trait Implementations§
impl Freeze for MetricDistribution
impl RefUnwindSafe for MetricDistribution
impl Send for MetricDistribution
impl Sync for MetricDistribution
impl Unpin for MetricDistribution
impl UnwindSafe for MetricDistribution
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more