pub struct MaxMetric {
pub name: &'static str,
pub value: f64,
}Expand description
Record the minimum or -INFINITY if records() never called.
Fields§
§name: &'static str§value: f64Implementations§
Trait Implementations§
Source§impl Metric for MaxMetric
impl Metric for MaxMetric
fn snapshot(&mut self) -> MetricEntry
fn records(&mut self, val: f64)
fn snapshot_in(&mut self, list: &mut Vec<MetricEntry>)
Source§fn take_begin_instant(&self, context: &ProcessContext<'_>) -> Instant
fn take_begin_instant(&self, context: &ProcessContext<'_>) -> Instant
Take now() from the context.
Using this allows DeactivatedMetric to skip this costly operation.
Source§fn records_duration(
&mut self,
context: &ProcessContext<'_>,
begin_instant: Instant,
)
fn records_duration( &mut self, context: &ProcessContext<'_>, begin_instant: Instant, )
Record a duration, take_begin_instant() should be used for begin_instant.
Auto Trait Implementations§
impl Freeze for MaxMetric
impl RefUnwindSafe for MaxMetric
impl Send for MaxMetric
impl Sync for MaxMetric
impl Unpin for MaxMetric
impl UnwindSafe for MaxMetric
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