[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r20510: {torflow} Fix crash-causing typo and change the limit for number of su (torflow/trunk/NetworkScanners/BwAuthority)



Author: mikeperry
Date: 2009-09-09 03:52:31 -0400 (Wed, 09 Sep 2009)
New Revision: 20510

Modified:
   torflow/trunk/NetworkScanners/BwAuthority/bwauthority.py
Log:

Fix crash-causing typo and change the limit for number
of successful streams required.



Modified: torflow/trunk/NetworkScanners/BwAuthority/bwauthority.py
===================================================================
--- torflow/trunk/NetworkScanners/BwAuthority/bwauthority.py	2009-09-09 07:34:01 UTC (rev 20509)
+++ torflow/trunk/NetworkScanners/BwAuthority/bwauthority.py	2009-09-09 07:52:31 UTC (rev 20510)
@@ -157,9 +157,11 @@
            num_routers = len(
                  sets.Set(this.selmgr.path_selector.entry_gen.rstr_routers
                            + this.selmgr.path_selector.exit_gen.rstr_routers))
-           if cond._num_streams < (2*num_routers*count)/3:
+           # If more than 35% of the 2-hop paths failed, keep going to get
+           # more measurements
+           if num_streams < 0.65*((num_routers*count)/2.0):
              plog("WARN", "Not enough streams yet. "+str(num_streams)+" < "+
-                        str(2*num_routers*count/3))
+                        str(0.65*(num_routers*count/2.0)))
              cond._finished = False
       cond.notify()
       cond.release()