diff options
author | Alexander Færøy <ahf@torproject.org> | 2017-12-16 02:41:21 +0100 |
---|---|---|
committer | Alexander Færøy <ahf@torproject.org> | 2017-12-16 02:41:21 +0100 |
commit | d4f4108601fe7e2614f30055ff5abe00460f6a12 (patch) | |
tree | f8c926dc04c1c476561fff41b6d7fb25eed3dd20 /src/or/main.h | |
parent | e44662a7f9af990753a89b0a831d3439a509c8ae (diff) | |
download | tor-d4f4108601fe7e2614f30055ff5abe00460f6a12.tar.gz tor-d4f4108601fe7e2614f30055ff5abe00460f6a12.zip |
Add MainloopStats option.
This patch adds support for MainloopStats that allow developers to get
main event loop statistics via Tor's heartbeat status messages. The new
status log message will show how many succesful, erroneous, and idle
event loop iterations we have had.
See: https://bugs.torproject.org/24605
Diffstat (limited to 'src/or/main.h')
-rw-r--r-- | src/or/main.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/main.h b/src/or/main.h index 8eb977575e..f6346b65d1 100644 --- a/src/or/main.h +++ b/src/or/main.h @@ -79,6 +79,11 @@ void tor_free_all(int postfork); int do_main_loop(void); int tor_init(int argc, char **argv); +void reset_main_loop_counters(void); +uint64_t get_main_loop_success_count(void); +uint64_t get_main_loop_error_count(void); +uint64_t get_main_loop_idle_count(void); + extern time_t time_of_process_start; extern long stats_n_seconds_working; extern int quiet_level; |