MetricCollector.average
T average(Duration window)Gets the average value within a time window.
For numeric types, calculates the arithmetic mean. Returns 0 if no data is available.
Parameters
window | The duration to look back from now. |
Returns
The average value in the window, or T.init if no data.