Enum glean_core::metrics::Metric[][src]

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(DurationTimeUnit), TimingDistribution(Histogram<Functional>), MemoryDistribution(Histogram<Functional>), Jwe(String), Rate(i32i32), 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.

Tuple Fields of Boolean

0: bool
Counter(i32)

A counter metric. See CounterMetric for more information.

Tuple Fields of Counter

0: i32
CustomDistributionExponential(Histogram<PrecomputedExponential>)

A custom distribution with precomputed exponential bucketing. See CustomDistributionMetric for more information.

Tuple Fields of CustomDistributionExponential

0: Histogram<PrecomputedExponential>
CustomDistributionLinear(Histogram<PrecomputedLinear>)

A custom distribution with precomputed linear bucketing. See CustomDistributionMetric for more information.

Tuple Fields of CustomDistributionLinear

0: Histogram<PrecomputedLinear>

A datetime metric. See DatetimeMetric for more information.

Tuple Fields of Datetime

0: DateTime<FixedOffset>1: TimeUnit
Experiment(RecordedExperimentData)

An experiment metric. See ExperimentMetric for more information.

Tuple Fields of Experiment

0: RecordedExperimentData
Quantity(i64)

A quantity metric. See QuantityMetric for more information.

Tuple Fields of Quantity

0: i64
String(String)

A string metric. See StringMetric for more information.

Tuple Fields of String

0: String
StringList(Vec<String>)

A string list metric. See StringListMetric for more information.

Tuple Fields of StringList

0: Vec<String>
Uuid(String)

A UUID metric. See UuidMetric for more information.

Tuple Fields of Uuid

0: String
Timespan(DurationTimeUnit)

A timespan metric. See TimespanMetric for more information.

Tuple Fields of Timespan

0: Duration1: TimeUnit
TimingDistribution(Histogram<Functional>)

A timing distribution. See TimingDistributionMetric for more information.

Tuple Fields of TimingDistribution

0: Histogram<Functional>
MemoryDistribution(Histogram<Functional>)

A memory distribution. See MemoryDistributionMetric for more information.

Tuple Fields of MemoryDistribution

0: Histogram<Functional>
Jwe(String)

A JWE metric. See JweMetric for more information.

Tuple Fields of Jwe

0: String
Rate(i32i32)

A rate metric. See RateMetric for more information.

Tuple Fields of Rate

0: i321: i32
Url(String)

A URL metric. See UrlMetric for more information.

Tuple Fields of Url

0: String

Implementations

Gets the ping section the metric fits into.

This determines the section of the ping to place the metric data in when assembling the ping payload.

The JSON representation of the metric’s data

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.