diff options
author | Karsten Loesing <karsten.loesing@gmx.net> | 2010-08-11 14:13:08 +0200 |
---|---|---|
committer | Karsten Loesing <karsten.loesing@gmx.net> | 2010-08-11 16:19:54 +0200 |
commit | acd25558b825f5d1254738fc45f5c7f0ccb3fb94 (patch) | |
tree | c3da824f4215d8affb30936549f26efd6c2a8f26 /src/or/rephist.h | |
parent | 863b6c439e6bfc64f602ecb9526940fa966ca9fe (diff) | |
download | tor-acd25558b825f5d1254738fc45f5c7f0ccb3fb94.tar.gz tor-acd25558b825f5d1254738fc45f5c7f0ccb3fb94.zip |
Refactor exit port statistics code and add unit tests.
Diffstat (limited to 'src/or/rephist.h')
-rw-r--r-- | src/or/rephist.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/or/rephist.h b/src/or/rephist.h index fe45a81a3b..dfdce4e1db 100644 --- a/src/or/rephist.h +++ b/src/or/rephist.h @@ -23,12 +23,6 @@ void rep_hist_note_extend_failed(const char *from_name, const char *to_name); void rep_hist_dump_stats(time_t now, int severity); void rep_hist_note_bytes_read(size_t num_bytes, time_t when); void rep_hist_note_bytes_written(size_t num_bytes, time_t when); -void rep_hist_note_exit_bytes_read(uint16_t port, size_t num_bytes); -void rep_hist_note_exit_bytes_written(uint16_t port, size_t num_bytes); -void rep_hist_note_exit_stream_opened(uint16_t port); -void rep_hist_exit_stats_init(time_t now); -time_t rep_hist_exit_stats_write(time_t now); -void rep_hist_exit_stats_term(void); int rep_hist_bandwidth_assess(void); char *rep_hist_get_bandwidth_lines(int for_extrainfo); void rep_hist_update_state(or_state_t *state); @@ -71,6 +65,15 @@ void hs_usage_note_fetch_successful(const char *service_id, time_t now); void hs_usage_write_statistics_to_file(time_t now); void hs_usage_free_all(void); +void rep_hist_exit_stats_init(time_t now); +void rep_hist_reset_exit_stats(time_t now); +void rep_hist_exit_stats_term(void); +char *rep_hist_exit_stats_history(time_t now); +time_t rep_hist_exit_stats_write(time_t now); +void rep_hist_note_exit_bytes(uint16_t port, size_t num_written, + size_t num_read); +void rep_hist_note_exit_stream_opened(uint16_t port); + void rep_hist_buffer_stats_init(time_t now); void rep_hist_buffer_stats_add_circ(circuit_t *circ, time_t end_of_interval); |