diff options
author | Mike Perry <mikeperry-git@fscked.org> | 2013-01-20 14:24:25 -0800 |
---|---|---|
committer | Mike Perry <mikeperry-git@fscked.org> | 2013-01-20 14:32:56 -0800 |
commit | 06a1d0b0447d3766b6199135f6878c6ce047f3b1 (patch) | |
tree | e43dbd575a82ec51ab3e635b7197accd0d69781c | |
parent | f858370233a7d01d89949f79f92e8b67acd69f46 (diff) | |
download | tor-06a1d0b0447d3766b6199135f6878c6ce047f3b1.tar tor-06a1d0b0447d3766b6199135f6878c6ce047f3b1.tar.gz |
squash! Implement Path use bias accounting.
Make a debug log more informative.
-rw-r--r-- | 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 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)); } } |