Counter and gauge aggregation
This section contains functions related to counter and gauge aggregation. Counter aggregation functions are used to accumulate monotonically increasing data by treating any decrements as resets. Gauge aggregates are similar, but are used to track data which can decrease as well as increase. For more information about counter aggregation functions, see the hyperfunctions documentation.
Some hyperfunctions are included in the default TimescaleDB product. For additional hyperfunctions, you need to install the Timescale Toolkit PostgreSQL extension.
Metric aggregation functions
Hyperfunction type | Hyperfunction name | Toolkit | Experimental | |
---|---|---|---|---|
counter_agg() functions | ||||
Aggregate | counter_agg() | ✅ | ||
Accessor | corr() | ✅ | ||
counter_zero_time() | ✅ | |||
delta() | ✅ | |||
extrapolated_delta() | ✅ | |||
extrapolated_rate() | ✅ | |||
first_time(), last_time() | ✅ | |||
first_val(), last_val() | ✅ | |||
idelta_left(), idelta_right() | ✅ | |||
intercept() | ✅ | |||
interpolated_delta() | ✅ | ✅ | ||
interpolated_rate() | ✅ | ✅ | ||
irate_left(), irate_right() | ✅ | |||
num_changes() | ✅ | |||
num_elements() | ✅ | |||
num_resets() | ✅ | |||
rate() | ✅ | |||
slope() | ✅ | |||
time_delta() | ✅ | |||
Rollup | rollup() | ✅ | ||
Mutator | with_bounds() | ✅ | ||
gauge_agg() functions | ||||
Aggregate | gauge_agg() | ✅ | ✅ | |
Accessor | corr() | ✅ | ||
delta() | ✅ | |||
extrapolated_delta() | ✅ | |||
extrapolated_rate() | ✅ | |||
idelta_left(), idelta_right() | ✅ | |||
intercept() | ✅ | |||
interpolated_delta() | ✅ | ✅ | ||
interpolated_rate() | ✅ | ✅ | ||
irate_left(), irate_right() | ✅ | |||
num_changes() | ✅ | |||
num_elements() | ✅ | |||
rate() | ✅ | |||
slope() | ✅ | |||
time_delta() | ✅ | |||
Rollup | rollup() | ✅ | ||
Mutator | with_bounds() | ✅ |
important
All accessors can be used with CounterSummary
, and all but num_resets
with GaugeSummary
.
当前内容版权归 TimescaleDB 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 TimescaleDB .