counter_series:sum_over
Since: Dev Builds Only
The functionality described in this section requires a dev build of KumoMTA. You can obtain a dev build by following the instructions in the Installation section.
Returns the rolling total over the requested time span.
duration— span to sum over. Accepts an integer number of seconds, or a duration string such as"30s","5m".
The duration is rounded up to a whole number of buckets, so a span
shorter than bucket_size still includes the current bucket. The
effective span is also capped at num_buckets * bucket_size; requesting a
longer span is equivalent to calling sum.
Calling sum_over also rotates the ring buffer, so any buckets that have
aged out since the last access are zeroed before the result is computed.