[or-cvs] r20024: {torflow} Always choose the greater of the filtered vs avg ratio. (torflow/trunk/NetworkScanners/BwAuthority)

mikeperry at seul.org mikeperry at seul.org
Wed Jul 15 04:21:15 UTC 2009


Author: mikeperry
Date: 2009-07-15 00:21:14 -0400 (Wed, 15 Jul 2009)
New Revision: 20024

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

Always choose the greater of the filtered vs avg ratio.



Modified: torflow/trunk/NetworkScanners/BwAuthority/aggregate.py
===================================================================
--- torflow/trunk/NetworkScanners/BwAuthority/aggregate.py	2009-07-15 04:15:18 UTC (rev 20023)
+++ torflow/trunk/NetworkScanners/BwAuthority/aggregate.py	2009-07-15 04:21:14 UTC (rev 20024)
@@ -225,7 +225,7 @@
   for n in nodes.itervalues():
     n.fbw_ratio = n.filt_bw[n.chosen_fbw]/true_filt_avg
     n.sbw_ratio = n.strm_bw[n.chosen_sbw]/true_strm_avg
-    if closest_to_one((n.sbw_ratio, n.fbw_ratio)) == 0:
+    if n.sbw_ratio > n.fbw_ratio:
       n.ratio = n.sbw_ratio
       n.new_bw = n.ns_bw[n.chosen_sbw]*n.ratio
       n.chosen_time = n.timestamps[n.chosen_sbw]



More information about the tor-commits mailing list