From 06a1d0b0447d3766b6199135f6878c6ce047f3b1 Mon Sep 17 00:00:00 2001 From: Mike Perry Date: Sun, 20 Jan 2013 14:24:25 -0800 Subject: squash! Implement Path use bias accounting. Make a debug log more informative. --- src/or/circuitbuild.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index 105e1acf4..a4c67cfff 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -1582,9 +1582,11 @@ pathbias_count_use_attempt(origin_circuit_t *circ) pathbias_check_use_rate(guard); guard->use_attempts++; - log_debug(LD_CIRC, "Marked circuit %d as used for guard %s=%s.", - circ->global_identifier, guard->nickname, - hex_str(guard->identity, DIGEST_LEN)); + log_debug(LD_CIRC, + "Marked circuit %d (%f/%f) as used for guard %s=%s.", + circ->global_identifier, + guard->use_successes, guard->use_attempts, + guard->nickname, hex_str(guard->identity, DIGEST_LEN)); } circ->path_state = PATH_STATE_USE_ATTEMPTED; @@ -1664,9 +1666,11 @@ pathbias_count_use_success(origin_circuit_t *circ) guard->use_successes++; log_debug(LD_CIRC, - "Marked circuit %d as used successfully for guard %s=%s.", - circ->global_identifier, guard->nickname, - hex_str(guard->identity, DIGEST_LEN)); + "Marked circuit %d (%f/%f) as used successfully for guard " + "%s=%s.", + circ->global_identifier, guard->use_successes, + guard->use_attempts, guard->nickname, + hex_str(guard->identity, DIGEST_LEN)); } } -- cgit v1.2.3