pub struct MetricHint {
pub name: &'static str,
pub polarity: Polarity,
pub unit: &'static str,
}Expand description
Payload-author metric declaration: polarity + display unit.
Attached to a Payload via the metrics field. Metrics
extracted from output are looked up against this table by name to
set their Polarity and Metric::unit. Unmatched metrics
land with Polarity::Unknown and an empty unit string.
Fields§
§name: &'static strDotted-path metric name (e.g. jobs.0.read.iops).
polarity: PolarityRegression direction for this metric.
unit: &'static strHuman-readable unit for display (e.g. iops, ns). Empty
string means “no unit”; matches the sentinel used by
MetricDef.
Trait Implementations§
Source§impl Clone for MetricHint
impl Clone for MetricHint
Source§fn clone(&self) -> MetricHint
fn clone(&self) -> MetricHint
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 MetricHint
impl Debug for MetricHint
impl Copy for MetricHint
Auto Trait Implementations§
impl Freeze for MetricHint
impl RefUnwindSafe for MetricHint
impl Send for MetricHint
impl Sync for MetricHint
impl Unpin for MetricHint
impl UnwindSafe for MetricHint
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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