Struct Metric

Source
pub struct Metric {
    pub aggregation: Option<String>,
    pub category: Option<LocalizedString>,
    pub derived: Option<DerivedMetric>,
    pub display_label: Option<LocalizedString>,
    pub has_nonzero_data: Option<bool>,
    pub hot_value: Option<f32>,
    pub indexed_hot_keys: Option<HashMap<String, IndexedHotKey>>,
    pub indexed_key_range_infos: Option<HashMap<String, IndexedKeyRangeInfos>>,
    pub info: Option<LocalizedString>,
    pub matrix: Option<MetricMatrix>,
    pub unit: Option<LocalizedString>,
    pub visible: Option<bool>,
}
Expand description

A message representing the actual monitoring data, values for each key bucket over time, of a metric.

This type is not used in any activity, and only used as part of another schema.

Fields§

§aggregation: Option<String>

The aggregation function used to aggregate each key bucket

§category: Option<LocalizedString>

The category of the metric, e.g. “Activity”, “Alerts”, “Reads”, etc.

§derived: Option<DerivedMetric>

The references to numerator and denominator metrics for a derived metric.

§display_label: Option<LocalizedString>

The displayed label of the metric.

§has_nonzero_data: Option<bool>

Whether the metric has any non-zero data.

§hot_value: Option<f32>

The value that is considered hot for the metric. On a per metric basis hotness signals high utilization and something that might potentially be a cause for concern by the end user. hot_value is used to calibrate and scale visual color scales.

§indexed_hot_keys: Option<HashMap<String, IndexedHotKey>>

The (sparse) mapping from time index to an IndexedHotKey message, representing those time intervals for which there are hot keys.

§indexed_key_range_infos: Option<HashMap<String, IndexedKeyRangeInfos>>

The (sparse) mapping from time interval index to an IndexedKeyRangeInfos message, representing those time intervals for which there are informational messages concerning key ranges.

§info: Option<LocalizedString>

Information about the metric.

§matrix: Option<MetricMatrix>

The data for the metric as a matrix.

§unit: Option<LocalizedString>

The unit of the metric.

§visible: Option<bool>

Whether the metric is visible to the end user.

Trait Implementations§

Source§

impl Clone for Metric

Source§

fn clone(&self) -> Metric

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Metric

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Metric

Source§

fn default() -> Metric

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Metric

Source§

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 Serialize for Metric

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Part for Metric

Auto Trait Implementations§

§

impl Freeze for Metric

§

impl RefUnwindSafe for Metric

§

impl Send for Metric

§

impl Sync for Metric

§

impl Unpin for Metric

§

impl UnwindSafe for Metric

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,