diff options
author | friendly73 <friendly73@x.x> | 2023-02-19 16:17:50 +0000 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2023-05-25 11:03:35 -0400 |
commit | 36076d3c46afd02bb7072c9d2aa9c5196932f024 (patch) | |
tree | 591e88f1e467f986c40c2b29a451d9365c773d4e /src/feature/stats/rephist.c | |
parent | a1042f4873edd2f04787e7f60b3f9d3642b36611 (diff) | |
download | tor-36076d3c46afd02bb7072c9d2aa9c5196932f024.tar.gz tor-36076d3c46afd02bb7072c9d2aa9c5196932f024.zip |
Added INTRO and REND metrics for relay.
Diffstat (limited to 'src/feature/stats/rephist.c')
-rw-r--r-- | src/feature/stats/rephist.c | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/feature/stats/rephist.c b/src/feature/stats/rephist.c index 8f4f33151a..dbd753a233 100644 --- a/src/feature/stats/rephist.c +++ b/src/feature/stats/rephist.c @@ -3038,3 +3038,56 @@ rep_hist_get_hs_v3_stats(void) return hs_v3_stats; } #endif /* defined(TOR_UNIT_TESTS) */ + +static uint64_t est_intro_actions[EST_INTRO_ACTION_COUNT] = {0}; +static uint64_t est_rend_actions[EST_REND_ACTION_COUNT] = {0}; +static uint64_t intro1_actions[INTRO1_ACTION_COUNT] = {0}; +static uint64_t rend1_actions[REND1_ACTION_COUNT] = {0}; + +void +rep_hist_note_est_intro_action(est_intro_action_t action) +{ + est_intro_actions[action]++; +} + +uint64_t +rep_hist_get_est_intro_action_count(est_intro_action_t action) +{ + return est_rend_actions[action]; +} + +void +rep_hist_note_est_rend_action(est_rend_action_t action) +{ + est_rend_actions[action]++; +} + +uint64_t +rep_hist_get_est_rend_action_count(est_rend_action_t action) +{ + return est_rend_actions[action]; +} + +void +rep_hist_note_intro1_action(intro1_action_t action) +{ + intro1_actions[action]++; +} + +uint64_t +rep_hist_get_intro1_action_count(intro1_action_t action) +{ + return intro1_actions[action]; +} + +void +rep_hist_note_rend1_action(rend1_action_t action) +{ + rend1_actions[action]++; +} + +uint64_t +rep_hist_get_rend1_action_count(rend1_action_t action) +{ + return rend1_actions[action]; +} |