Enum glean_core::metrics::Metric
source · [−]pub enum Metric {
Show 16 variants
Boolean(bool),
Counter(i32),
CustomDistributionExponential(Histogram<PrecomputedExponential>),
CustomDistributionLinear(Histogram<PrecomputedLinear>),
Datetime(DateTime<FixedOffset>, TimeUnit),
Experiment(RecordedExperimentData),
Quantity(i64),
String(String),
StringList(Vec<String>),
Uuid(String),
Timespan(Duration, TimeUnit),
TimingDistribution(Histogram<Functional>),
MemoryDistribution(Histogram<Functional>),
Jwe(String),
Rate(i32, i32),
Url(String),
}
Expand description
The available metrics.
This is the in-memory and persisted layout of a metric.
Note
The order of metrics in this enum is important, as it is used for serialization. Do not reorder the variants.
Any new metric must be added at the end.
Variants
Boolean(bool)
A boolean metric. See BooleanMetric
for more information.
Counter(i32)
A counter metric. See CounterMetric
for more information.
CustomDistributionExponential(Histogram<PrecomputedExponential>)
A custom distribution with precomputed exponential bucketing.
See CustomDistributionMetric
for more information.
CustomDistributionLinear(Histogram<PrecomputedLinear>)
A custom distribution with precomputed linear bucketing.
See CustomDistributionMetric
for more information.
Datetime(DateTime<FixedOffset>, TimeUnit)
A datetime metric. See DatetimeMetric
for more information.
Experiment(RecordedExperimentData)
An experiment metric. See ExperimentMetric
for more information.
Quantity(i64)
A quantity metric. See QuantityMetric
for more information.
String(String)
A string metric. See StringMetric
for more information.
StringList(Vec<String>)
A string list metric. See StringListMetric
for more information.
Uuid(String)
A UUID metric. See UuidMetric
for more information.
Timespan(Duration, TimeUnit)
A timespan metric. See TimespanMetric
for more information.
TimingDistribution(Histogram<Functional>)
A timing distribution. See TimingDistributionMetric
for more information.
MemoryDistribution(Histogram<Functional>)
A memory distribution. See MemoryDistributionMetric
for more information.
Jwe(String)
A JWE metric. See JweMetric
for more information.
Rate(i32, i32)
A rate metric. See RateMetric
for more information.
Url(String)
A URL metric. See UrlMetric
for more information.
Implementations
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Metric
impl<'de> Deserialize<'de> for Metric
sourcefn 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
impl StructuralPartialEq for Metric
Auto Trait Implementations
impl RefUnwindSafe for Metric
impl Send for Metric
impl Sync for Metric
impl Unpin for Metric
impl UnwindSafe for Metric
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> EncodableKey for T where
T: Serialize,
impl<T> EncodableKey for T where
T: Serialize,
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more