[−][src]Struct lognplot::tsdb::SampleMetrics
Metrics collected about a certain trace This can be used during query.
Fields
min: f64
The minimum value of all samples
max: f64
The maximum value of all samples
sum: f64
The sum of all values. Together with the count, this allows to calculate the average value.
sum_squared: f64
This value allows for calculation of the variance of the signal. TODO: this value will be insanely large at some point in time.
count: usize
The total number of samples
Methods
impl SampleMetrics
[src]
pub fn new(min: f64, max: f64, sum: f64, sum_squared: f64, count: usize) -> Self
[src]
pub fn mean(&self) -> f64
[src]
Calculate the mean value of this metrics.
Trait Implementations
impl Metrics<Sample> for SampleMetrics
[src]
fn update(&mut self, sample: &Sample)
[src]
Integrate a single sample into tha metrics. This involves updating the min and max values as well as the count and the sum.
fn include(&mut self, metrics: &SampleMetrics)
[src]
Include other metrics into this metrics.
impl From<Sample> for SampleMetrics
[src]
impl Clone for SampleMetrics
[src]
fn clone(&self) -> SampleMetrics
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for SampleMetrics
[src]
Auto Trait Implementations
impl Send for SampleMetrics
impl Sync for SampleMetrics
impl Unpin for SampleMetrics
impl UnwindSafe for SampleMetrics
impl RefUnwindSafe for SampleMetrics
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,