pub struct History { /* private fields */ }Expand description
Fixed-size history of samples, newest last.
Implementations§
Source§impl History
impl History
Sourcepub fn max_of_last(&self, n: usize) -> f64
pub fn max_of_last(&self, n: usize) -> f64
Largest of the newest n samples.
Sourcepub fn graph(
&self,
columns: usize,
span: GraphSpan,
interval: Duration,
) -> Vec<f64>
pub fn graph( &self, columns: usize, span: GraphSpan, interval: Duration, ) -> Vec<f64>
Values for a graph columns wide, oldest first. GraphSpan::Fit
gives the newest sample per column; a time span gives the samples of
that span (one every interval) spread over the columns, averaged
where several share a column and interpolated where there are fewer
samples than columns. While the history is shorter than the span,
fewer values come back, so the graph fills up from the right.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for History
impl RefUnwindSafe for History
impl Send for History
impl Sync for History
impl Unpin for History
impl UnsafeUnpin for History
impl UnwindSafe for History
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