commit 06a1d0b0447d3766b6199135f6878c6ce047f3b1 Author: Mike Perry mikeperry-git@fscked.org Date: Sun Jan 20 14:24:25 2013 -0800
squash! Implement Path use bias accounting.
Make a debug log more informative. --- src/or/circuitbuild.c | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index 105e1ac..a4c67cf 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)); } }