diff options
Diffstat (limited to 'src/or/status.c')
-rw-r--r-- | src/or/status.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/or/status.c b/src/or/status.c index 04cd96eed5..126167dcb9 100644 --- a/src/or/status.c +++ b/src/or/status.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2010-2012, The Tor Project, Inc. */ +/* Copyright (c) 2010-2013, The Tor Project, Inc. */ /* See LICENSE for licensing information */ /** @@ -10,6 +10,7 @@ #include "config.h" #include "status.h" #include "nodelist.h" +#include "relay.h" #include "router.h" #include "circuitlist.h" #include "main.h" @@ -21,7 +22,7 @@ count_circuits(void) circuit_t *circ; int nr=0; - for (circ = _circuit_get_global_list(); circ; circ = circ->next) + for (circ = circuit_get_global_list_(); circ; circ = circ->next) nr++; return nr; @@ -106,6 +107,11 @@ log_heartbeat(time_t now) "circuits open. I've sent %s and received %s.", uptime, count_circuits(),bw_sent,bw_rcvd); + if (stats_n_data_cells_packaged) + log_notice(LD_HEARTBEAT, "Average packaged cell fullness: %2.3f%%", + 100*(U64_TO_DBL(stats_n_data_bytes_packaged) / + U64_TO_DBL(stats_n_data_cells_packaged*RELAY_PAYLOAD_SIZE)) ); + tor_free(uptime); tor_free(bw_sent); tor_free(bw_rcvd); |