pub struct TsGroupByOptions<'a> { /* private fields */ }Expand description
Options for the ts_mrange command.
GROUPBY is optional, so the default value emits nothing and leaves the
reply one entry per matched series.
Implementations§
Source§impl<'a> TsGroupByOptions<'a>
impl<'a> TsGroupByOptions<'a>
Sourcepub fn new(label: &'a str, reducer: TsAggregationType) -> Self
pub fn new(label: &'a str, reducer: TsAggregationType) -> Self
aggregates results across different time series, grouped by the provided label name.
When combined with aggregation the groupby/reduce is applied post aggregation stage.
§Arguments
label- is the label name to group a series by. A new series for each value is produced.reducer- is the reducer type used to aggregate series that share the same label value.
§Notes
- The produced time series is named
<label>=<groupbyvalue> - The produced time series contains two labels with these label array structures:
reducer, the reducer usedsource, the time series keys used to compute the grouped series (key1,key2,key3,…)
Trait Implementations§
Source§impl<'a> Default for TsGroupByOptions<'a>
impl<'a> Default for TsGroupByOptions<'a>
Auto Trait Implementations§
impl<'a> Freeze for TsGroupByOptions<'a>
impl<'a> RefUnwindSafe for TsGroupByOptions<'a>
impl<'a> Send for TsGroupByOptions<'a>
impl<'a> Sync for TsGroupByOptions<'a>
impl<'a> Unpin for TsGroupByOptions<'a>
impl<'a> UnsafeUnpin for TsGroupByOptions<'a>
impl<'a> UnwindSafe for TsGroupByOptions<'a>
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