aboutsummaryrefslogtreecommitdiff
path: root/src/feature/stats/rephist.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2022-10-27 10:45:08 -0400
committerDavid Goulet <dgoulet@torproject.org>2022-10-27 10:45:08 -0400
commita1c40c8511b841db773e82bd8024ef3581262900 (patch)
treed8aa76a8cd174aabcb18a05c312ccf70b61bfbd5 /src/feature/stats/rephist.c
parent06a26f18727d3831339c138ccec07ea2f7935014 (diff)
downloadtor-a1c40c8511b841db773e82bd8024ef3581262900.tar.gz
tor-a1c40c8511b841db773e82bd8024ef3581262900.zip
metrics: Fix naming and documentation
After nickm's review, minor changes to names and comments. Related to #40194 Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature/stats/rephist.c')
-rw-r--r--src/feature/stats/rephist.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/feature/stats/rephist.c b/src/feature/stats/rephist.c
index 962450e72b..021ef6d96e 100644
--- a/src/feature/stats/rephist.c
+++ b/src/feature/stats/rephist.c
@@ -1639,7 +1639,7 @@ rep_hist_note_exit_stream_opened(uint16_t port)
log_debug(LD_HIST, "Opened exit stream to port %d", port);
}
-/*** Streams statistics ***/
+/*** Exit streams statistics ***/
/** Number of BEGIN streams seen. */
static uint64_t streams_begin_seen;
@@ -1650,7 +1650,7 @@ static uint64_t streams_resolve_seen;
/** Note a stream as seen for the given relay command. */
void
-rep_hist_note_stream(unsigned int cmd)
+rep_hist_note_exit_stream(unsigned int cmd)
{
switch (cmd) {
case RELAY_COMMAND_BEGIN:
@@ -1663,13 +1663,14 @@ rep_hist_note_stream(unsigned int cmd)
streams_resolve_seen++;
break;
default:
+ tor_assert_nonfatal_unreached_once();
break;
}
}
/** Return number of stream seen for the given command. */
uint64_t
-rep_hist_get_stream_seen(unsigned int cmd)
+rep_hist_get_exit_stream_seen(unsigned int cmd)
{
switch (cmd) {
case RELAY_COMMAND_BEGIN: