Struct tusk_data::metrics::TimeSeries [−][src]
pub struct TimeSeries { pub data: BTreeMap<DateTime<Utc>, MetricTypes>, pub meta_data: MetaData, }
A TimeSeries corresponds to a group of metrics that share common MetaData.
Fields
data: BTreeMap<DateTime<Utc>, MetricTypes>
meta_data: MetaData
Methods
impl TimeSeries
[src]
impl TimeSeries
pub fn join(&self, rhs: &Self, terms: Vec<String>, vo: Ops) -> Option<Self>
[src]
pub fn join(&self, rhs: &Self, terms: Vec<String>, vo: Ops) -> Option<Self>
Given two time series, some common keys and an vector operator we can use this to join two time series together. To do this we find all the common keys and then apply the vector operator to the metrics.
pub fn shift(&self, offset: Duration) -> Self
[src]
pub fn shift(&self, offset: Duration) -> Self
Shifts a TimeSeries backwards by an offset of time
pub fn merge(&self, rhs: Self) -> Result<Self, Errors>
[src]
pub fn merge(&self, rhs: Self) -> Result<Self, Errors>
Merges two TimeSeries into a single TimeSeries
. If a common
key exists then the value of the RHS is dropped.
If one of the LHS or RHS contains a superset of MetaData
of the other then those specific fields are dropped to
create a single TimeSeries
Trait Implementations
impl Clone for TimeSeries
[src]
impl Clone for TimeSeries
fn clone(&self) -> TimeSeries
[src]
fn clone(&self) -> TimeSeries
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for TimeSeries
[src]
impl Debug for TimeSeries
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Default for TimeSeries
[src]
impl Default for TimeSeries
fn default() -> TimeSeries
[src]
fn default() -> TimeSeries
Returns the "default value" for a type. Read more
Auto Trait Implementations
impl Send for TimeSeries
impl Send for TimeSeries
impl Sync for TimeSeries
impl Sync for TimeSeries