Data Fields | |
uint64_t | obs [NUM_SECS_ROLLING_MEASURE] |
int | cur_obs_idx |
time_t | cur_obs_time |
uint64_t | total_obs |
uint64_t | max_total |
uint64_t | total_in_period |
time_t | next_period |
int | next_max_idx |
int | num_maxes_set |
uint64_t | maxima [NUM_TOTALS] |
uint64_t | totals [NUM_TOTALS] |
uint64_t bw_array_t::obs[NUM_SECS_ROLLING_MEASURE] |
Observation array: Total number of bytes transferred in each of the last NUM_SECS_ROLLING_MEASURE seconds. This is used as a circular array.
Referenced by add_obs(), advance_obs(), and rep_hist_load_state().
Current position in obs.
Referenced by add_obs(), and advance_obs().
time_t bw_array_t::cur_obs_time |
Time represented in obs[cur_obs_idx]
Referenced by add_obs(), advance_obs(), bw_array_new(), and rep_hist_load_state().
uint64_t bw_array_t::total_obs |
Total for all members of obs except obs[cur_obs_idx]
Referenced by advance_obs(), and rep_hist_load_state().
uint64_t bw_array_t::max_total |
Largest value that total_obs has taken on in the current period.
Referenced by advance_obs(), commit_max(), and rep_hist_load_state().
uint64_t bw_array_t::total_in_period |
Total bytes transferred in the current period.
Referenced by add_obs(), commit_max(), and rep_hist_update_state().
time_t bw_array_t::next_period |
When does the next period begin?
Referenced by advance_obs(), bw_array_new(), commit_max(), rep_hist_get_bandwidth_lines(), rep_hist_load_state(), and rep_hist_update_state().
Where in 'maxima' should the maximum bandwidth usage for the current period be stored?
Referenced by commit_max(), and rep_hist_fill_bandwidth_history().
How many values in maxima/totals have been set ever?
Referenced by commit_max(), and rep_hist_fill_bandwidth_history().
uint64_t bw_array_t::maxima[NUM_TOTALS] |
Circular array of the maximum bandwidth-per-NUM_SECS_ROLLING_MEASURE usage for the last NUM_TOTALS periods
Referenced by commit_max(), find_largest_max(), and rep_hist_load_state().
uint64_t bw_array_t::totals[NUM_TOTALS] |
Circular array of the total bandwidth usage for the last NUM_TOTALS periods
Referenced by commit_max(), and rep_hist_fill_bandwidth_history().