As stated in title, what is a difference between avg
from rollup_rate()
and rate()
in MetricsQL?
It is not clear to me from the official documentation.
Let's suppose we have a time series with the following samples on the duration d
:
(v1, t1), (v2, t2), .... (vN, tN)`
Then the rate(m[d])
at tN
is calculated as (vN - v1) / (tN - t1)
, while the avg
returned from rollup_rate(m[d])
is calculated as an average value for per-sample rates (v2-v1)/(t2-t1)
, ..., (vN - vNminus1) / (tN - tNminus1)
.