aboutsummaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2014-12-02 12:20:35 +0000
committerNick Mathewson <nickm@torproject.org>2014-12-19 10:35:25 -0500
commit14e83e626be84c4f311b8e8f0d80ca141675fa9e (patch)
tree4e15bdc7b247fa007a4fe9a10f558e3a491ba8c4 /src/or/main.c
parent7cd53b75c10831e01e288b01f63cab069d3e3035 (diff)
downloadtor-14e83e626be84c4f311b8e8f0d80ca141675fa9e.tar.gz
tor-14e83e626be84c4f311b8e8f0d80ca141675fa9e.zip
Add two hidden-service related statistics.
The two statistics are: 1. number of RELAY cells observed on successfully established rendezvous circuits; and 2. number of .onion addresses observed as hidden-service directory. Both statistics are accumulated over 24 hours, obfuscated by rounding up to the next multiple of a given number and adding random noise, and written to local file stats/hidserv-stats. Notably, no statistics will be gathered on clients or services, but only on relays.
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/main.c b/src/or/main.c
index e78e9bf6a6..160bfa00e0 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -1384,6 +1384,11 @@ run_scheduled_events(time_t now)
if (next_write && next_write < next_time_to_write_stats_files)
next_time_to_write_stats_files = next_write;
}
+ if (options->HiddenServiceStatistics) {
+ time_t next_write = rep_hist_hs_stats_write(time_to_write_stats_files);
+ if (next_write && next_write < next_time_to_write_stats_files)
+ next_time_to_write_stats_files = next_write;
+ }
if (options->ExitPortStatistics) {
time_t next_write = rep_hist_exit_stats_write(time_to_write_stats_files);
if (next_write && next_write < next_time_to_write_stats_files)