pub struct SamplingInterval { /* private fields */ }
Expand description
A time interval in which samples are folded into an aggregation.
Sampling intervals determine the timing of aggregations and interpolation in time series and are defined by the following quantities:
- Maximum sampling period. This is the basic unit of time that defines the sampling interval and represents the maximum duration in which a sample must be observed. For any such duration in which no sample is observed, an interpolated sample is used instead. This can also be thought of as its inverse: the minimum sampling frequency.
- Sampling period count. This is the number of sampling periods that form the sampling interval. This determines the minimum number of samples (interpolated or otherwise) folded into the aggregation for the sampling interval.
- Capacity. This is the number of sampling intervals (and therefore aggregations) that must be stored to represent an aggregated series. This quantity is somewhat extrinsic to the time interval itself, but determines its durability.
These quantities are concatenated into a shorthand to describe sampling intervals, formatted
as capacity x sampling_period_count x maximum_sampling_period
. For example, a 10x2x5s
sampling interval persists 10 intervals formed from two maximum sampling period of 5s. In such
an interval, there is at least one sample every 5s, an aggregation every 10s, and at most 10
aggregations that represent a 100s period.
Implementations§
Trait Implementations§
Source§impl Clone for SamplingInterval
impl Clone for SamplingInterval
Source§fn clone(&self) -> SamplingInterval
fn clone(&self) -> SamplingInterval
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SamplingInterval
impl Debug for SamplingInterval
Source§impl Display for SamplingInterval
impl Display for SamplingInterval
Source§impl From<SamplingInterval> for SamplingProfile
impl From<SamplingInterval> for SamplingProfile
Source§fn from(interval: SamplingInterval) -> Self
fn from(interval: SamplingInterval) -> Self
Converts to this type from the input type.
Source§impl Hash for SamplingInterval
impl Hash for SamplingInterval
Source§impl PartialEq for SamplingInterval
impl PartialEq for SamplingInterval
impl Copy for SamplingInterval
impl Eq for SamplingInterval
impl StructuralPartialEq for SamplingInterval
Auto Trait Implementations§
impl Freeze for SamplingInterval
impl RefUnwindSafe for SamplingInterval
impl Send for SamplingInterval
impl Sync for SamplingInterval
impl Unpin for SamplingInterval
impl UnwindSafe for SamplingInterval
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more