Skip to main content

KeyMetric

Struct KeyMetric 

Source
pub struct KeyMetric {
    pub column: String,
    pub agg: KeyAgg,
    pub family: String,
    pub matchers: String,
    pub samples: Option<String>,
}
Expand description

SRD-113 — one key-metric designation on an execution node: column: agg(family), where matchers in braces and, for a family of the session sampler, a sample mode may follow the family (avg(sysmon_cgroup_cpu_cores{cgroup="node"}, within); SRD-118 §10.1). Designating key metrics both names the node’s measurables and attaches the node to the table row of its nearest enclosing anchor (or the spine). family is empty for the family-less span().

Fields§

§column: String§agg: KeyAgg§family: String§matchers: String

The matchers written in braces after the family, without the braces: they select among the family’s series. Empty for none.

§samples: Option<String>

The sample mode written after the family, for a family of the session sampler: which of its samples count toward the phase (SRD-118 §5.1). None for the default.

Implementations§

Source§

impl KeyMetric

Source

pub const SAMPLE_MODES: &'static [&'static str]

The sample modes, in the order they are listed to a user. They are the values of the phase_samples matcher (nmbrs_metrics::queryapi::phase_samples).

Source

pub const DEFAULT_SAMPLES: &'static str = "overlapping"

The mode a designation of a sampler family has when it names none.

Source

pub fn is_session_family(family: &str) -> bool

True when family is the session sampler’s: recorded by the session, with no phase label, and read over a phase by its samples’ times.

Source

pub fn is_phase_host_family(family: &str) -> bool

True when family is a phase’s own record of a sampler family (sysmon_phases=on, SRD-118 §11): a series of the phase, which carries the same window statistics the sampler’s does.

Source

pub fn is_host_family(family: &str) -> bool

True when family is a host measure, the session’s or a phase’s own.

Source

pub fn sample_mode(&self) -> Option<&str>

The mode this designation’s samples are counted by, when its family is the session sampler’s.

Source

pub fn parse_measure( inner: &str, ) -> Result<(String, String, Option<String>), String>

Read what a designation holds between its parentheses: family, family{matchers}, family, mode or family{matchers}, mode. Returns the family, the matchers without their braces, and the mode.

Trait Implementations§

Source§

impl Clone for KeyMetric

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for KeyMetric

Source§

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

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

impl<'de> Deserialize<'de> for KeyMetric

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 KeyMetric

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

Auto Trait Implementations§

§

impl Forget for KeyMetric

§

impl Freeze for KeyMetric
where *const u8 is !null: Freeze, PhantomData<u8>: Freeze,

§

impl Move for KeyMetric

§

impl RefUnwindSafe for KeyMetric

§

impl Send for KeyMetric
where RawVecInner: Send,

§

impl Sync for KeyMetric
where RawVecInner: Sync,

§

impl Unpin for KeyMetric
where *const u8 is !null: Unpin,

§

impl UnsafeUnpin for KeyMetric

§

impl UnwindSafe for KeyMetric
where RawVecInner: UnwindSafe,

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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 = !

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

fn try_from(value: U) -> Result<T, !>

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.