diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-03-11 22:06:07 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-03-11 22:06:07 -0400 |
commit | 452cfaacfc6e6b4313d2170c29e18d6399038999 (patch) | |
tree | 0f5cfb8b9a50ea24be992f28496fea5cd4771f27 /src/or/status.c | |
parent | 051b1e8ac4114fb23904cdf8dead72d585904e0a (diff) | |
download | tor-452cfaacfc6e6b4313d2170c29e18d6399038999.tar.gz tor-452cfaacfc6e6b4313d2170c29e18d6399038999.zip |
Track TLS overhead: diagnostic for bug 7707
Diffstat (limited to 'src/or/status.c')
-rw-r--r-- | src/or/status.c | 6 |
1 files changed, 6 insertions, 0 deletions
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); |