summaryrefslogtreecommitdiff
path: root/src/feature/stats/rephist.h
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2021-05-12 15:31:44 -0400
committerDavid Goulet <dgoulet@torproject.org>2021-05-12 15:31:44 -0400
commitd4fbfb54d41d9b93fbdfab48c59f0e688dd7f645 (patch)
tree463c0e3bc84073300fec225ac7198665d1d2c94d /src/feature/stats/rephist.h
parent3fbd510c527b64bb83e87d78e81f1ad72def5f5f (diff)
downloadtor-d4fbfb54d41d9b93fbdfab48c59f0e688dd7f645.tar.gz
tor-d4fbfb54d41d9b93fbdfab48c59f0e688dd7f645.zip
rephist: Add a counter for the onioniskins stats
Current counters are reset every heartbeat. This commit adds two counters for the assigned and dropped onionskins that are not reset so they can be exported onto the MetricsPort. Closes #40387 Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature/stats/rephist.h')
-rw-r--r--src/feature/stats/rephist.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/feature/stats/rephist.h b/src/feature/stats/rephist.h
index ca305dfd8d..7f414de4c8 100644
--- a/src/feature/stats/rephist.h
+++ b/src/feature/stats/rephist.h
@@ -63,7 +63,11 @@ 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));
+
+MOCK_DECL(uint64_t, rep_hist_get_circuit_n_handshake_assigned,
+ (uint16_t type));
+MOCK_DECL(uint64_t, rep_hist_get_circuit_n_handshake_dropped,
+ (uint16_t type));
void rep_hist_hs_stats_init(time_t now);
void rep_hist_hs_stats_term(void);
@@ -90,7 +94,6 @@ 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