Versions:
rate()
ToolkitTimescaleDB Toolkit functions are available under Timescale Community Edition. They are automatically included with Timescale Cloud. Click to learn more.The rate of change of the counter over the observed time period. This is the raw
or simple rate, equivalent to delta(summary)
or time_delta(summary)
. After
accounting for resets, the last value is subtracted from the first value and
divided by the duration between the last observed time and the first observed
time.
rate(summary CounterSummary) RETURNS DOUBLE PRECISION
For more information about counter aggregation functions, see the hyperfunctions documentation.
Name | Type | Description |
---|---|---|
summary | CounterSummary | The input CounterSummary from a counter_agg call |
Name | Type | Description |
---|---|---|
rate | DOUBLE PRECISION | The per second observed rate computed from the CounterSummary |
SELECTid,rate(summary)FROM (SELECTid,counter_agg(ts, val) AS summaryFROM fooGROUP BY id) t
Found an issue on this page?
Report an issue!Keywords