Struct glean_core::metrics::CustomDistributionMetric [−][src]
pub struct CustomDistributionMetric { /* fields omitted */ }
Expand description
A custom distribution metric.
Memory distributions are used to accumulate and store memory sizes.
Implementations
pub fn new(
meta: CommonMetricData,
range_min: u64,
range_max: u64,
bucket_count: u64,
histogram_type: HistogramType
) -> Self
pub fn new(
meta: CommonMetricData,
range_min: u64,
range_max: u64,
bucket_count: u64,
histogram_type: HistogramType
) -> Self
Creates a new memory distribution metric.
Accumulates the provided signed samples in the metric.
This is required so that the platform-specific code can provide us with
64 bit signed integers if no u64
comparable type is available. This
will take care of filtering and reporting errors for any provided negative
sample.
Arguments
samples
- The vector holding the samples to be recorded by the metric.
Notes
Discards any negative value in samples
and report an ErrorType::InvalidValue
for each of them.
Test-only API (exported for FFI purposes).
Gets the currently stored histogram.
This doesn’t clear the stored value.
Trait Implementations
Access the stored metadata
Access the stored metadata mutable
Whether this metric should currently be recorded Read more
Auto Trait Implementations
impl RefUnwindSafe for CustomDistributionMetric
impl Send for CustomDistributionMetric
impl Sync for CustomDistributionMetric
impl Unpin for CustomDistributionMetric
impl UnwindSafe for CustomDistributionMetric