aboutsummaryrefslogtreecommitdiff
path: root/src/feature/stats/rephist.h
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2022-10-11 13:17:35 -0400
committerDavid Goulet <dgoulet@torproject.org>2022-10-12 09:25:19 -0400
commit5603baf2570a427c2ea56145ed5607aae504d6b7 (patch)
tree80010152a5373ce3fa2a69552abfae5ceef6f8e6 /src/feature/stats/rephist.h
parentd09414858e2f5c5efa2ece4b3a32a6b47374dfdd (diff)
downloadtor-5603baf2570a427c2ea56145ed5607aae504d6b7.tar.gz
tor-5603baf2570a427c2ea56145ed5607aae504d6b7.zip
conn: Keep stats of opened and closed connections
Related to #40194 Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature/stats/rephist.h')
-rw-r--r--src/feature/stats/rephist.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/feature/stats/rephist.h b/src/feature/stats/rephist.h
index e8f43fbb1d..21808cdee8 100644
--- a/src/feature/stats/rephist.h
+++ b/src/feature/stats/rephist.h
@@ -41,6 +41,11 @@ 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_note_conn_opened(bool initiated, unsigned int type);
+void rep_hist_note_conn_closed(bool initiated, unsigned int type);
+uint64_t rep_hist_get_conn_created(bool initiated, unsigned int type);
+uint64_t rep_hist_get_conn_opened(bool initiated, unsigned int type);
+
void rep_hist_buffer_stats_init(time_t now);
void rep_hist_buffer_stats_add_circ(circuit_t *circ,
time_t end_of_interval);