tusk_data 0.0.1

Data types for monitoring with Tusk
Documentation
// Implements the various operations for `MetricTypes`

/// These represent the possible operations that
/// can be applied to a time series
#[derive(Serialize, Deserialize, Clone, Debug)]
pub enum Ops {
    /// These are operations that are performed
    /// on two time series and return one.
    Multiply,
    Add,
    Subtract,
    Divive,
    Merge,

    /// These are operations that are performed 
    /// on one time series and return one 
    Sqrt,
    Square,
    Variance,
    StdDeviation,

    /// These are operations that are performed 
    /// on one time series and return one time 
    /// series of a lower cardinality.
    Rate(Interval),
    Sum(Interval),
    Max(Interval),
    Min(Interval),
}

/// An `Interval` represents a period of time in seconds.
/// This is not a type in `chrono` as `chrono::Duration` 
/// does not support `serde` yet.
pub type Interval = i64;