[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [torflow/master] Directly use the circ_error if it is negative.
commit 9e27a77f17bae2f9535373f8b48c2cee6ea2ae4d
Author: Mike Perry <mikeperry-git@xxxxxxxxxx>
Date: Thu Dec 1 21:23:46 2011 -0800
Directly use the circ_error if it is negative.
---
NetworkScanners/BwAuthority/README.spec.txt | 4 +++-
NetworkScanners/BwAuthority/aggregate.py | 8 ++++----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/NetworkScanners/BwAuthority/README.spec.txt b/NetworkScanners/BwAuthority/README.spec.txt
index db5c125..d223160 100644
--- a/NetworkScanners/BwAuthority/README.spec.txt
+++ b/NetworkScanners/BwAuthority/README.spec.txt
@@ -516,7 +516,9 @@
to the node, and the average success rate for the entire node class,
respectively.
- This error value is then added to pid_error.
+ If this error value is negative (meaning the node is failing
+ more circuits than the network average), we use it as the
+ pid_error.
"bwauthbestratio=0"
If absent, the larger of stream bandwidth vs filtered bandwidth
diff --git a/NetworkScanners/BwAuthority/aggregate.py b/NetworkScanners/BwAuthority/aggregate.py
index a2372af..ae6f5be 100755
--- a/NetworkScanners/BwAuthority/aggregate.py
+++ b/NetworkScanners/BwAuthority/aggregate.py
@@ -546,10 +546,10 @@ def main(argv):
if cs_junk.use_circ_fails:
circ_error = ((1.0-n.circ_fail_rate) - true_circ_avg[n.node_class()]) \
/ true_circ_avg[n.node_class()]
- # FIXME: Hrmm, should we only penalize for circ successes, or should
- # we reward, too? Let's try both for now.
- # if circ_error < 0:
- n.pid_error += circ_error
+ # FIXME: Hrmm, should we only penalize for circ fails, or should
+ # we reward, too?
+ if circ_error < 0:
+ n.pid_error = circ_error
if n.idhex in prev_votes.vote_map:
# If there is a new sample, let's use it for all but guards
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits