-
Notifications
You must be signed in to change notification settings - Fork 324
DEV: (cmds) update TS cmd pages for multiple aggregators support #2949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dwdougherty
wants to merge
4
commits into
DOC-6334
Choose a base branch
from
DOC-6408
base: DOC-6334
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+214
−392
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -53,50 +53,9 @@ arguments: | |
| optional: true | ||
| token: ALIGN | ||
| type: integer | ||
| - arguments: | ||
| - name: avg | ||
| token: AVG | ||
| type: pure-token | ||
| - name: first | ||
| token: FIRST | ||
| type: pure-token | ||
| - name: last | ||
| token: LAST | ||
| type: pure-token | ||
| - name: min | ||
| token: MIN | ||
| type: pure-token | ||
| - name: max | ||
| token: MAX | ||
| type: pure-token | ||
| - name: sum | ||
| token: SUM | ||
| type: pure-token | ||
| - name: range | ||
| token: RANGE | ||
| type: pure-token | ||
| - name: count | ||
| token: COUNT | ||
| type: pure-token | ||
| - name: std.p | ||
| token: STD.P | ||
| type: pure-token | ||
| - name: std.s | ||
| token: STD.S | ||
| type: pure-token | ||
| - name: var.p | ||
| token: VAR.P | ||
| type: pure-token | ||
| - name: var.s | ||
| token: VAR.S | ||
| type: pure-token | ||
| - name: twa | ||
| since: 1.8.0 | ||
| token: TWA | ||
| type: pure-token | ||
| name: aggregator | ||
| - name: aggregationType | ||
| token: AGGREGATION | ||
| type: oneof | ||
| type: string | ||
| - name: bucketDuration | ||
| type: integer | ||
| - name: buckettimestamp | ||
|
|
@@ -165,15 +124,14 @@ stack_path: docs/data-types/timeseries | |
| summary: Query a range across multiple time series by filters in forward direction | ||
| syntax: "TS.MRANGE fromTimestamp toTimestamp\n [LATEST]\n [FILTER_BY_TS ts...]\n\ | ||
| \ [FILTER_BY_VALUE min max]\n [WITHLABELS | <SELECTED_LABELS label...>]\n [COUNT\ | ||
| \ count]\n [[ALIGN align] AGGREGATION aggregator bucketDuration [BUCKETTIMESTAMP\ | ||
| \ count]\n [[ALIGN align] AGGREGATION aggregators bucketDuration [BUCKETTIMESTAMP\ | ||
| \ bt] [EMPTY]]\n FILTER filterExpr...\n [GROUPBY label REDUCE reducer]\n" | ||
| syntax_fmt: "TS.MRANGE fromTimestamp toTimestamp [LATEST] [FILTER_BY_TS\_Timestamp\n\ | ||
| \ [Timestamp ...]] [FILTER_BY_VALUE min max] [WITHLABELS |\n SELECTED_LABELS label1\ | ||
| \ [label1 ...]] [COUNT\_count] [[ALIGN\_value]\n AGGREGATION\_<AVG | FIRST | LAST\ | ||
| \ | MIN | MAX | SUM | RANGE | COUNT\n | STD.P | STD.S | VAR.P | VAR.S | TWA> bucketDuration\n\ | ||
| \ [BUCKETTIMESTAMP] [EMPTY]] FILTER\_<l=v | l!=v | l= | l!= |\n l=(v1,v2,...)\ | ||
| \ | l!=(v1,v2,...) [l=v | l!=v | l= | l!= |\n l=(v1,v2,...) | l!=(v1,v2,...) ...]>\ | ||
| \ [GROUPBY label REDUCE\n reducer]" | ||
| \ [label1 ...]] [COUNT\_count] [[ALIGN\_value]\n AGGREGATION\ aggregators bucketDuration\ | ||
| \ [BUCKETTIMESTAMP]\n [EMPTY]] FILTER\_<l=v | l!=v | l= | l!= | l=(v1,v2,...) |\n\ | ||
| \ l!=(v1,v2,...) [l=v | l!=v | l= | l!= | l=(v1,v2,...) |\n l!=(v1,v2,...) ...]>\ | ||
| \ [GROUPBY label REDUCE reducer]" | ||
| title: TS.MRANGE | ||
| --- | ||
| {{< note >}} | ||
|
|
@@ -288,13 +246,13 @@ Values include: | |
| </details> | ||
|
|
||
| <details open> | ||
| <summary><code>AGGREGATION aggregator bucketDuration</code></summary> | ||
| <summary><code>AGGREGATION aggregators bucketDuration</code></summary> | ||
|
|
||
| per time series, aggregates samples into time buckets, where: | ||
| for each time series, aggregates samples into time buckets, where: | ||
|
|
||
| - `aggregator` takes one of the following aggregation types: | ||
| - `aggregators` is one or more comma-separated aggregator from the following table: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. aggregator --> aggregators |
||
|
|
||
| | `aggregator` | Description | | ||
| | aggregator | Description | | ||
| | ------------ | --------------------------------------------------------------- | | ||
| | `avg` | Arithmetic mean of all non-NaN values | | ||
| | `sum` | Sum of all non-NaN values | | ||
|
|
@@ -313,6 +271,11 @@ per time series, aggregates samples into time buckets, where: | |
| | `twa` | Time-weighted average over the bucket's timeframe (ignores NaN values) (since RedisTimeSeries 1.8) | | ||
|
|
||
| - `bucketDuration` is duration of each bucket, in milliseconds. | ||
|
|
||
| Note: `aggregators` can either be a single aggregator or multiple aggregators separated by commas as shown below. | ||
| No whitespace is allowed between aggregators. | ||
|
|
||
| AGGREGATION min,avg,max | ||
|
|
||
| Without `ALIGN`, bucket start times are multiples of `bucketDuration`. | ||
|
|
||
|
|
@@ -338,7 +301,7 @@ controls how bucket timestamps are reported. | |
|
|
||
| is a flag, which, when specified, reports aggregations also for empty buckets. | ||
|
|
||
| | `aggregator` | Value reported for each empty bucket | | ||
| | `aggregators` | Value reported for each empty bucket | | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. aggregators --> aggregator? |
||
| | -------------------- | ------------------------------------ | | ||
| | `sum`, `count` | `0` | | ||
| | `last` | The value of the last sample before the bucket's start. `NaN` when no such sample. | | ||
|
|
@@ -354,6 +317,7 @@ Regardless of the values of `fromTimestamp` and `toTimestamp`, no data is report | |
| splits time series into groups, each group contains time series that share the same value for the provided label name, then aggregates results in each group. | ||
|
|
||
| When combined with `AGGREGATION` the `GROUPBY`/`REDUCE` is applied post aggregation stage. | ||
| `GROUPBY`/`REDUCE` is not permitted when multiple aggregators are specified. | ||
|
|
||
| - `label` is label name. A group is created for all time series that share the same value for this label. | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.