From d4f4108601fe7e2614f30055ff5abe00460f6a12 Mon Sep 17 00:00:00 2001 From: Alexander Færøy Date: Sat, 16 Dec 2017 02:41:21 +0100 Subject: 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 --- src/or/main.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/or/main.h') 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; -- cgit v1.2.3-54-g00ecf