12 #ifndef TOR_FEATURE_STATS_BWHIST_H
13 #define TOR_FEATURE_STATS_BWHIST_H
16 void bwhist_free_all(
void);
36 #define bw_array_free(val) \
37 FREE_AND_NULL(bw_array_t, bw_array_free_, (val))
STATIC void commit_max(bw_array_t *b)
STATIC void bw_array_free_(bw_array_t *b)
STATIC bw_array_t * write_array
STATIC size_t bwhist_fill_bandwidth_history(char *buf, size_t len, const bw_array_t *b)
STATIC void advance_obs(bw_array_t *b)
STATIC uint64_t find_largest_max(bw_array_t *b)
STATIC void add_obs(bw_array_t *b, time_t when, uint64_t n)
STATIC bw_array_t * bw_array_new(void)
void bwhist_note_dir_bytes_written(uint64_t num_bytes, time_t when)
char * bwhist_get_bandwidth_lines(void)
void bwhist_update_state(struct or_state_t *state)
int bwhist_load_state(struct or_state_t *state, char **err)
void bwhist_note_bytes_read(uint64_t num_bytes, time_t when, bool ipv6)
void bwhist_note_dir_bytes_read(uint64_t num_bytes, time_t when)
void bwhist_note_bytes_written(uint64_t num_bytes, time_t when, bool ipv6)
int bwhist_bandwidth_assess(void)
#define MOCK_DECL(rv, funcname, arglist)