aboutsummaryrefslogtreecommitdiff
path: root/src/feature/relay/relay_metrics.h
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2021-05-05 13:33:33 -0400
committerDavid Goulet <dgoulet@torproject.org>2021-05-12 11:58:25 -0400
commit8bb1874f1e80f10c1f222db52471a458c4d6d5bc (patch)
tree40be3e8dabf12a45f58c318d7d60670dcb00fc0f /src/feature/relay/relay_metrics.h
parent9c2fa3498233bbb5f347a03188433c6c5f6de24f (diff)
downloadtor-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/relay/relay_metrics.h')
-rw-r--r--src/feature/relay/relay_metrics.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/feature/relay/relay_metrics.h b/src/feature/relay/relay_metrics.h
index 7d644badd3..6868bd26df 100644
--- a/src/feature/relay/relay_metrics.h
+++ b/src/feature/relay/relay_metrics.h
@@ -16,7 +16,9 @@
* the base_metrics array. */
typedef enum {
/** Number of OOM invocation. */
- RELAY_METRICS_NUM_OOM_BYTES = 0,
+ RELAY_METRICS_NUM_OOM_BYTES = 0,
+ /** Number of onionskines handled. */
+ RELAY_METRICS_NUM_ONIONSKINS = 1,
} relay_metrics_key_t;
/** The metadata of a relay metric. */