From 452cfaacfc6e6b4313d2170c29e18d6399038999 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 11 Mar 2013 22:06:07 -0400 Subject: Track TLS overhead: diagnostic for bug 7707 --- src/or/status.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/or') diff --git a/src/or/status.c b/src/or/status.c index 126167dcb9..e44de635cb 100644 --- a/src/or/status.c +++ b/src/or/status.c @@ -85,6 +85,7 @@ log_heartbeat(time_t now) char *bw_rcvd = NULL; char *uptime = NULL; const routerinfo_t *me; + double r = tls_get_write_overhead_ratio(); const or_options_t *options = get_options(); (void)now; @@ -112,6 +113,11 @@ log_heartbeat(time_t now) 100*(U64_TO_DBL(stats_n_data_bytes_packaged) / U64_TO_DBL(stats_n_data_cells_packaged*RELAY_PAYLOAD_SIZE)) ); + if (r > 1.0) { + double overhead = ( r - 1.0 ) * 100.0; + log_notice(LD_HEARTBEAT, "TLS write overhead: %.f%%", overhead); + } + tor_free(uptime); tor_free(bw_sent); tor_free(bw_rcvd); -- cgit v1.2.3-54-g00ecf