|
SObjectizer 5.8
|
Functions | |
| duration_t | calc_avg_time (std::uint_fast64_t count, duration_t previous, duration_t last) |
| A function for calculating average value. | |
| void | update_stats_from_duration (activity_stats_t &value_to_update, clock_type_t::duration last_duration) |
| Helper function for simplification of current stats update. | |
| void | update_stats_from_current_time (activity_stats_t &value_to_update, clock_type_t::time_point activity_started_at) |
| Helper function for simplification of current stats update. | |
|
inline |
A function for calculating average value.
Uses modified moving average (also known as running moving average) which is calculated as: MMA(t) = (last + (N-1)*MMA(t-1))/N.
| count | Total count of samples. |
| previous | Previous average value. |
| last | Duration of last activity (or waiting). |
Definition at line 109 of file work_thread_activity.hpp.
|
inline |
Helper function for simplification of current stats update.
Definition at line 143 of file work_thread_activity.hpp.
|
inline |
Helper function for simplification of current stats update.
Definition at line 127 of file work_thread_activity.hpp.