diff options
author | George Kadianakis <desnacked@riseup.net> | 2021-03-09 15:36:40 +0200 |
---|---|---|
committer | George Kadianakis <desnacked@riseup.net> | 2021-03-17 18:22:38 +0200 |
commit | 0a5ecb334298187a64f58382231245111130aa76 (patch) | |
tree | 90ddab78a61f285b17ab01a7893763e5f39684a8 /src/feature/relay | |
parent | 80b6054bb016aca0b18f8da79f23a859a804ef07 (diff) | |
download | tor-0a5ecb334298187a64f58382231245111130aa76.tar.gz tor-0a5ecb334298187a64f58382231245111130aa76.zip |
Implement backbone of overload statistics.
- Implement overload statistics structure.
- Implement function that keeps track of overload statistics.
- Implement function that writes overload statistics to descriptor.
- Unittest for the whole logic.
Diffstat (limited to 'src/feature/relay')
-rw-r--r-- | src/feature/relay/router.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/feature/relay/router.c b/src/feature/relay/router.c index 73e8393761..88160bd1cb 100644 --- a/src/feature/relay/router.c +++ b/src/feature/relay/router.c @@ -3372,6 +3372,12 @@ extrainfo_dump_to_string_stats_helper(smartlist_t *chunks, if (contents) smartlist_add(chunks, contents); } + if (options->OverloadStatistics) { + contents = rep_hist_get_overload_stats_lines(); + if (contents) { + smartlist_add(chunks, contents); + } + } /* bridge statistics */ if (should_record_bridge_info(options)) { const char *bridge_stats = geoip_get_bridge_stats_extrainfo(now); |