diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-09-04 10:44:36 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-09-04 10:44:36 -0400 |
commit | 94b04d6c64ec998a9117d65a156888fa3af188e5 (patch) | |
tree | 08ed94f695e8c1b9abef413a8bfee98c8be07be8 /src/feature/stats | |
parent | 1c62adb65baa99c92f937318c452955306301643 (diff) | |
parent | 81f4223329a709e5138532b037a58c118b30dd7f (diff) | |
download | tor-94b04d6c64ec998a9117d65a156888fa3af188e5.tar.gz tor-94b04d6c64ec998a9117d65a156888fa3af188e5.zip |
Merge branch 'bug24104_029_squashed'
Diffstat (limited to 'src/feature/stats')
-rw-r--r-- | src/feature/stats/rephist.c | 4 | ||||
-rw-r--r-- | src/feature/stats/rephist.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/feature/stats/rephist.c b/src/feature/stats/rephist.c index 6bb680c5dc..e24728ca76 100644 --- a/src/feature/stats/rephist.c +++ b/src/feature/stats/rephist.c @@ -1216,8 +1216,8 @@ find_largest_max(bw_array_t *b) * * Return the smaller of these sums, divided by NUM_SECS_ROLLING_MEASURE. */ -int -rep_hist_bandwidth_assess(void) +MOCK_IMPL(int, +rep_hist_bandwidth_assess,(void)) { uint64_t w,r; r = find_largest_max(read_array); diff --git a/src/feature/stats/rephist.h b/src/feature/stats/rephist.h index 06a5e48211..67a015a4cd 100644 --- a/src/feature/stats/rephist.h +++ b/src/feature/stats/rephist.h @@ -22,7 +22,7 @@ void rep_hist_make_router_pessimal(const char *id, time_t when); void rep_hist_note_dir_bytes_read(size_t num_bytes, time_t when); void rep_hist_note_dir_bytes_written(size_t num_bytes, time_t when); -int rep_hist_bandwidth_assess(void); +MOCK_DECL(int, rep_hist_bandwidth_assess, (void)); char *rep_hist_get_bandwidth_lines(void); void rep_hist_update_state(or_state_t *state); int rep_hist_load_state(or_state_t *state, char **err); |