Accumulates minimum, maximum, and average values between periodic callbacks.
More...
#include <src/stat_trackers.h>
|
|
using | callback_function = std::function<void(T stat_min, T stat_max, double stat_avg)> |
| | Callback invoked with the minimum, maximum, and average for one interval.
|
|
| void | collect_and_callback_on_interval (T stat, const callback_function &callback, std::chrono::seconds interval_in_seconds) |
| | Add one statistic sample and invoke the callback when the interval elapses.
|
|
void | reset () |
| | Reset the object to its initial empty state.
|
template<typename T>
class stat_trackers::min_max_avg_tracker< T >
Accumulates minimum, maximum, and average values between periodic callbacks.
◆ collect_and_callback_on_interval()
Add one statistic sample and invoke the callback when the interval elapses.
- Parameters
-
| stat | Statistic value used to update the tracker. |
| callback | Callback invoked with the calculated statistic. |
| interval_in_seconds | Minimum time between callback invocations. |
The documentation for this class was generated from the following file: