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

[or-cvs] r20023: {torctl} Simplify filtering step to just be >= mean. (torctl/trunk/python/TorCtl)



Author: mikeperry
Date: 2009-07-15 00:15:18 -0400 (Wed, 15 Jul 2009)
New Revision: 20023

Modified:
   torctl/trunk/python/TorCtl/SQLSupport.py
Log:

Simplify filtering step to just be >= mean.



Modified: torctl/trunk/python/TorCtl/SQLSupport.py
===================================================================
--- torctl/trunk/python/TorCtl/SQLSupport.py	2009-07-15 01:47:04 UTC (rev 20022)
+++ torctl/trunk/python/TorCtl/SQLSupport.py	2009-07-15 04:15:18 UTC (rev 20023)
@@ -432,16 +432,17 @@
       for s in rs.router.streams:
         if isinstance(s, ClosedStream):
           skip = False
-          for br in badrouters:
-            if br != rs:
-              if br.router in s.circuit.routers:
-                skip = True
+          #for br in badrouters:
+          #  if br != rs:
+          #    if br.router in s.circuit.routers:
+          #      skip = True
           if not skip:
-            # Throw out outliers > 1 stddev 
-            # (too much variance for 2stddev to filter much)
-            if rs.strm_closed == 1 or s.bandwidth() >= rs.sbw-1*rs.sbw_dev:
+            # Throw out outliers < mean 
+            # (too much variance for stddev to filter much)
+            if rs.strm_closed == 1 or s.bandwidth() >= rs.sbw:
               tot_sbw += s.bandwidth()
               sbw_cnt += 1
+
       if sbw_cnt: rs.filt_sbw = tot_sbw/sbw_cnt
       else: rs.filt_sbw = None
       tc_session.add(rs)