[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r20159: {torflow} Change how we count the percentage of the network we conside (torflow/trunk/NetworkScanners/BwAuthority)
Author: mikeperry
Date: 2009-07-27 12:42:43 -0400 (Mon, 27 Jul 2009)
New Revision: 20159
Modified:
torflow/trunk/NetworkScanners/BwAuthority/aggregate.py
Log:
Change how we count the percentage of the network we consider
scanned. Just because a node appeared recently doesn't mean
we should disregard it from the totals.
Modified: torflow/trunk/NetworkScanners/BwAuthority/aggregate.py
===================================================================
--- torflow/trunk/NetworkScanners/BwAuthority/aggregate.py 2009-07-27 14:43:58 UTC (rev 20158)
+++ torflow/trunk/NetworkScanners/BwAuthority/aggregate.py 2009-07-27 16:42:43 UTC (rev 20159)
@@ -276,12 +276,12 @@
except TorCtl.ErrorReply:
r = None
if r and not r.down and r.bw > 0:
- if time.mktime(r.published.utctimetuple()) - r.uptime \
- < oldest_timestamp:
- missed_nodes += 1.0
- # 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+" at "+str(round((100.0*n.list_rank)/max_rank,1))+" "+str(n.bandwidth))
+ #if time.mktime(r.published.utctimetuple()) - r.uptime \
+ # < oldest_timestamp:
+ missed_nodes += 1.0
+ # 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+" at "+str(round((100.0*n.list_rank)/max_rank,1))+" "+str(n.bandwidth))
measured_pct = round(100.0*len(nodes)/(len(nodes)+missed_nodes),1)
if measured_pct < MIN_REPORT: