You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In case a client or intermediate layer has already aggregated several samples (e.g. an average) and the client does not have (or does not need) the originals to submit to the time series, it could be useful to have ability to add a value with a "weight", so that it will count as several samples when aggregating.
For example, I may have 10 samples whose average value is 5.25 but I do not know what each sample value is and I don't even care because I am only interested in the rolling average. One solution would be to do:
MULTI
TS.ADD key t 5.25TS.ADD key t 5.25
...
TS.ADD key t 5.25
EXEC
But a better solution could be:
TS.ADD key t 5.255.25 ... 5.25
or
TS.ADD key t 5.25 REPEAT 10
or
TS.ADD key t 5.25 WEIGHT 10
If multiple fields per sample are supported then one of them could simply be the weight and an aggregation could reduce (weight, value) => (weight * value)
The text was updated successfully, but these errors were encountered:
P.s. due to timestamps only being of second-precision, it is even more likely that samples will have to be aggregated before being added to the time series.
In case a client or intermediate layer has already aggregated several samples (e.g. an average) and the client does not have (or does not need) the originals to submit to the time series, it could be useful to have ability to add a value with a "weight", so that it will count as several samples when aggregating.
For example, I may have 10 samples whose average value is 5.25 but I do not know what each sample value is and I don't even care because I am only interested in the rolling average. One solution would be to do:
But a better solution could be:
or
or
If multiple fields per sample are supported then one of them could simply be the weight and an aggregation could reduce
(weight, value) => (weight * value)
The text was updated successfully, but these errors were encountered: