tor
master
|
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] |
Structure to track bandwidth use, and remember the maxima for a given time period.
int cur_obs_idx |
Current position in obs.
time_t cur_obs_time |
Time represented in obs[cur_obs_idx]
uint64_t max_total |
Largest value that total_obs has taken on in the current period.
uint64_t maxima[NUM_TOTALS] |
Circular array of the maximum bandwidth-per-NUM_SECS_ROLLING_MEASURE usage for the last NUM_TOTALS periods
int next_max_idx |
Where in 'maxima' should the maximum bandwidth usage for the current period be stored?
time_t next_period |
When does the next period begin?
int num_maxes_set |
How many values in maxima/totals have been set ever?
uint64_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.
uint64_t total_in_period |
Total bytes transferred in the current period.
uint64_t total_obs |
Total for all members of obs except obs[cur_obs_idx]
uint64_t totals[NUM_TOTALS] |
Circular array of the total bandwidth usage for the last NUM_TOTALS periods