Skip to content

Commit 72f4467

Browse files
authored
Add missing Time Series aggregator types (#260)
1 parent 1ccdb73 commit 72f4467

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/redis/time-series.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ export enum AggregationValue {
5555
MIN = 'min',
5656
RANGE = 'range',
5757
SUM = 'sum',
58+
FIRST = 'first',
59+
LAST = 'last',
60+
STDP = 'std.p',
61+
STDS = 'std.s',
62+
VARP = 'var.p',
63+
VARS = 'var.s',
5864
}
5965

6066
export enum ReducerValue {
@@ -81,6 +87,12 @@ export const Aggregations: Array<SelectableValue<AggregationValue>> = [
8187
{ label: 'Min', description: 'Minimum', value: AggregationValue.MIN },
8288
{ label: 'Range', description: 'Diff between maximum and minimum in the bucket', value: AggregationValue.RANGE },
8389
{ label: 'Sum', description: 'Summation', value: AggregationValue.SUM },
90+
{ label: 'First', description: 'The value with the lowest timestamp in the bucket', value: AggregationValue.FIRST },
91+
{ label: 'Last', description: 'The value with the highest timestamp in the bucket', value: AggregationValue.LAST },
92+
{ label: 'Std.p', description: 'Population standard deviation of the values', value: AggregationValue.STDP },
93+
{ label: 'Std.s', description: 'Sample standard deviation of the values', value: AggregationValue.STDS },
94+
{ label: 'Var.p', description: 'Population variance of the values', value: AggregationValue.VARP },
95+
{ label: 'Var.s', description: 'Sample variance of the values', value: AggregationValue.VARS },
8496
];
8597

8698
/**

0 commit comments

Comments
 (0)