pub struct MetricsSeries { /* private fields */ }Expand description
Ring buffer of StoreMetrics snapshots for trend analysis.
Implementations§
Source§impl MetricsSeries
impl MetricsSeries
Sourcepub fn record(&mut self, timestamp: u64, metrics: StoreMetrics)
pub fn record(&mut self, timestamp: u64, metrics: StoreMetrics)
Record a metrics snapshot at the given timestamp.
Sourcepub fn latest(&self) -> Option<&(u64, StoreMetrics)>
pub fn latest(&self) -> Option<&(u64, StoreMetrics)>
Get the most recent snapshot.
Sourcepub fn trend(&self) -> MetricsTrend
pub fn trend(&self) -> MetricsTrend
Compute trend analysis over the stored snapshots.
Auto Trait Implementations§
impl Freeze for MetricsSeries
impl RefUnwindSafe for MetricsSeries
impl Send for MetricsSeries
impl Sync for MetricsSeries
impl Unpin for MetricsSeries
impl UnsafeUnpin for MetricsSeries
impl UnwindSafe for MetricsSeries
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