Deliver circuit handshake counts as part of the heartbeat

Previously, they went out once an hour, unconditionally.

Fixes 10485; bugfix on 0.2.4.17-rc.
This commit is contained in:
Nick Mathewson 2014-02-06 13:03:01 -05:00
parent 3511549651
commit edc6fa2570
4 changed files with 7 additions and 6 deletions

4
changes/bug10485 Normal file
View File

@ -0,0 +1,4 @@
o Minor bugfixes:
- Move message about circuit handshake counts into the heartbeat
message where it belongs, instead of logging it once per hour
unconditionally. Fixes bug 10485; bugfix on 0.2.4.17-rc.

View File

@ -1353,11 +1353,6 @@ run_scheduled_events(time_t now)
next_time_to_write_stats_files = next_write;
}
time_to_write_stats_files = next_time_to_write_stats_files;
/* Also commandeer this opportunity to log how our circuit handshake
* stats have been doing. */
if (public_server_mode(options))
rep_hist_log_circuit_handshake_stats(now);
}
/* 1h. Check whether we should write bridge statistics to disk.

View File

@ -3041,7 +3041,6 @@ void
rep_hist_log_circuit_handshake_stats(time_t now)
{
(void)now;
/* XXX024 maybe quiet this log message before 0.2.4 goes stable for real */
log_notice(LD_HIST, "Circuit handshake stats since last time: "
"%d/%d TAP, %d/%d NTor.",
onion_handshakes_completed[ONION_HANDSHAKE_TYPE_TAP],

View File

@ -121,6 +121,9 @@ log_heartbeat(time_t now)
log_notice(LD_HEARTBEAT, "TLS write overhead: %.f%%", overhead);
}
if (public_server_mode(options))
rep_hist_log_circuit_handshake_stats(now);
tor_free(uptime);
tor_free(bw_sent);
tor_free(bw_rcvd);