bw_array_t Struct Reference


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]

Detailed Description

Structure to track bandwidth use, and remember the maxima for a given time period.

Field Documentation

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 represented in obs[cur_obs_idx]

Referenced by add_obs(), advance_obs(), bw_array_new(), and rep_hist_load_state().

Total for all members of obs except obs[cur_obs_idx]

Referenced by advance_obs(), and rep_hist_load_state().

Largest value that total_obs has taken on in the current period.

Referenced by advance_obs(), commit_max(), and rep_hist_load_state().

Total bytes transferred in the current period.

Referenced by add_obs(), commit_max(), 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().


The documentation for this struct was generated from the following file:

Generated on Tue May 25 00:31:06 2010 for tor by  doxygen 1.5.6