diff options
author | Mike Perry <mikeperry-git@fscked.org> | 2013-01-19 19:56:52 -0800 |
---|---|---|
committer | Mike Perry <mikeperry-git@fscked.org> | 2013-01-20 14:32:27 -0800 |
commit | fb711e6d77cc6b4d4ff2daa506960919626a3f6a (patch) | |
tree | 018ab7283be68abcf574ded6fc43b10881413f85 /src/or/circuitbuild.c | |
parent | 38c7195a32dac6f8914ba88a5a19a366e6b8dec7 (diff) | |
download | tor-fb711e6d77cc6b4d4ff2daa506960919626a3f6a.tar.gz tor-fb711e6d77cc6b4d4ff2daa506960919626a3f6a.zip |
squash! Remove a source of error during path bias scaling
Move a log message about scaling to after we scale
Diffstat (limited to 'src/or/circuitbuild.c')
-rw-r--r-- | src/or/circuitbuild.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index 8c7bd87ca5..105e1acf4a 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -2244,12 +2244,6 @@ pathbias_check_use_rate(entry_guard_t *guard) PATH_STATE_USE_ATTEMPTED, PATH_STATE_USE_ATTEMPTED); guard->use_attempts -= opened_attempts; - log_info(LD_CIRC, - "Scaling pathbias use counts to (%f/%f)*(%d/%d) for guard %s=%s", - guard->use_successes, guard->use_attempts, - mult_factor, scale_factor, guard->nickname, - hex_str(guard->identity, DIGEST_LEN)); - guard->use_attempts *= mult_factor; guard->use_successes *= mult_factor; @@ -2257,6 +2251,11 @@ pathbias_check_use_rate(entry_guard_t *guard) guard->use_successes /= scale_factor; guard->use_attempts += opened_attempts; + + log_info(LD_CIRC, + "Scaled pathbias use counts to %f/%f for guard %s=%s", + guard->use_successes, guard->use_attempts, + guard->nickname, hex_str(guard->identity, DIGEST_LEN)); } return 0; @@ -2394,11 +2393,6 @@ pathbias_check_close_rate(entry_guard_t *guard) PATH_STATE_USE_FAILED); guard->circ_attempts -= opened_attempts; guard->circ_successes -= opened_built; - log_info(LD_CIRC, - "Scaling pathbias counts to (%f/%f)*(%d/%d) for guard %s=%s", - guard->circ_successes, guard->circ_attempts, - mult_factor, scale_factor, guard->nickname, - hex_str(guard->identity, DIGEST_LEN)); guard->circ_attempts *= mult_factor; guard->circ_successes *= mult_factor; @@ -2416,6 +2410,12 @@ pathbias_check_close_rate(entry_guard_t *guard) guard->circ_attempts += opened_attempts; guard->circ_successes += opened_built; + + log_info(LD_CIRC, + "Scaled pathbias counts to (%f,%f)/%f for guard %s=%s", + guard->circ_successes, guard->successful_circuits_closed, + guard->circ_attempts, guard->nickname, + hex_str(guard->identity, DIGEST_LEN)); } return 0; |