diff options
author | David Goulet <dgoulet@torproject.org> | 2021-04-15 14:23:47 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2021-05-12 11:58:25 -0400 |
commit | 9c2fa3498233bbb5f347a03188433c6c5f6de24f (patch) | |
tree | f3dc5b9d500198c147ae9e414b7f97abe8c4685b /src/core/or/relay.h | |
parent | bdde4579c2fcb43cf5a32d617b3a5fe72314adf8 (diff) | |
download | tor-9c2fa3498233bbb5f347a03188433c6c5f6de24f.tar.gz tor-9c2fa3498233bbb5f347a03188433c6c5f6de24f.zip |
relay: Add the OOM invocation metrics
With this commit, a relay now emits metrics event on the MetricsPort
related to the OOM invocation for:
- DNS cache
- GeoIP database
- Cell queues
- HSDir caches
Everytime the OOM is invoked, the number of bytes is added to the
metrics counter for that specific type of invocation.
Related to #40367
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/core/or/relay.h')
-rw-r--r-- | src/core/or/relay.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/or/relay.h b/src/core/or/relay.h index 2f337d5d16..eac920f491 100644 --- a/src/core/or/relay.h +++ b/src/core/or/relay.h @@ -49,6 +49,11 @@ extern uint64_t stats_n_data_bytes_packaged; extern uint64_t stats_n_data_cells_received; extern uint64_t stats_n_data_bytes_received; +extern uint64_t oom_stats_n_bytes_removed_dns; +extern uint64_t oom_stats_n_bytes_removed_cell; +extern uint64_t oom_stats_n_bytes_removed_geoip; +extern uint64_t oom_stats_n_bytes_removed_hsdir; + void dump_cell_pool_usage(int severity); size_t packed_cell_mem_cost(void); |