[or-cvs] r19657: {torflow} Add checks to filter out any nodes that clearly weren't arou (torflow/trunk/NetworkScanners/BwAuthority)
mikeperry at seul.org
mikeperry at seul.org
Mon Jun 8 04:48:04 UTC 2009
Author: mikeperry
Date: 2009-06-08 00:48:04 -0400 (Mon, 08 Jun 2009)
New Revision: 19657
Modified:
torflow/trunk/NetworkScanners/BwAuthority/aggregate.py
Log:
Add checks to filter out any nodes that clearly weren't
around during our last measurements from our messages
about missing them. There still are about 80 nodes
that are escaping measurement, possibly due to hibernation
changes.
Modified: torflow/trunk/NetworkScanners/BwAuthority/aggregate.py
===================================================================
--- torflow/trunk/NetworkScanners/BwAuthority/aggregate.py 2009-06-08 03:03:24 UTC (rev 19656)
+++ torflow/trunk/NetworkScanners/BwAuthority/aggregate.py 2009-06-08 04:48:04 UTC (rev 19657)
@@ -4,6 +4,7 @@
import math
import sys
import socket
+import time
sys.path.append("../../")
from TorCtl.TorUtil import plog
@@ -202,7 +203,14 @@
for n in prev_consensus.itervalues():
if not n.measured:
- plog("INFO", "Didn't measure "+n.idhex+"="+n.nickname)
+ if "Fast" in n.flags and "Running" in n.flags:
+ r = c.get_router(n)
+ if r and not r.down and r.bw > 0:
+ if time.mktime(r.published.utctimetuple()) - r.uptime \
+ < oldest_timestamp:
+ # We still tend to miss about 80 nodes even with these
+ # checks.. Possibly going in and out of hibernation?
+ plog("INFO", "Didn't measure "+n.idhex+"="+n.nickname)
n_print = nodes.values()
n_print.sort(lambda x,y: int(x.new_bw) - int(y.new_bw))
More information about the tor-commits
mailing list