diff options
author | David Goulet <dgoulet@torproject.org> | 2021-05-05 13:33:33 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2021-05-12 11:58:25 -0400 |
commit | 8bb1874f1e80f10c1f222db52471a458c4d6d5bc (patch) | |
tree | 40be3e8dabf12a45f58c318d7d60670dcb00fc0f /src/feature/stats/rephist.h | |
parent | 9c2fa3498233bbb5f347a03188433c6c5f6de24f (diff) | |
download | tor-8bb1874f1e80f10c1f222db52471a458c4d6d5bc.tar.gz tor-8bb1874f1e80f10c1f222db52471a458c4d6d5bc.zip |
relay: Add the onionskins processing metrics
With this commit, a relay now emits metrics event on the MetricsPort
related to how many onionskins were handled (processed or dropped) for
each handshake type.
Related to #40367
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature/stats/rephist.h')
-rw-r--r-- | src/feature/stats/rephist.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/feature/stats/rephist.h b/src/feature/stats/rephist.h index d4a2f301cf..0bb9dd4678 100644 --- a/src/feature/stats/rephist.h +++ b/src/feature/stats/rephist.h @@ -58,10 +58,12 @@ time_t rep_hist_desc_stats_write(time_t now); void rep_hist_note_circuit_handshake_requested(uint16_t type); void rep_hist_note_circuit_handshake_assigned(uint16_t type); +void rep_hist_note_circuit_handshake_dropped(uint16_t type); void rep_hist_log_circuit_handshake_stats(time_t now); MOCK_DECL(int, rep_hist_get_circuit_handshake_requested, (uint16_t type)); MOCK_DECL(int, rep_hist_get_circuit_handshake_assigned, (uint16_t type)); +MOCK_DECL(uint64_t, rep_hist_get_circuit_handshake_dropped, (uint16_t type)); void rep_hist_hs_stats_init(time_t now); void rep_hist_hs_stats_term(void); @@ -83,6 +85,7 @@ extern uint32_t rephist_total_num; #ifdef TOR_UNIT_TESTS extern int onion_handshakes_requested[MAX_ONION_HANDSHAKE_TYPE+1]; extern int onion_handshakes_assigned[MAX_ONION_HANDSHAKE_TYPE+1]; +extern uint64_t onion_handshakes_dropped[MAX_ONION_HANDSHAKE_TYPE+1]; #endif #ifdef REPHIST_PRIVATE |