[or-cvs] r21447: {torflow} Remove control port debug logging from bwauthority.py. Also (torflow/trunk/NetworkScanners/BwAuthority)
Mike Perry
mikeperry-svn at fscked.org
Tue Jan 19 04:59:23 UTC 2010
Author: mikeperry
Date: 2010-01-19 04:59:23 +0000 (Tue, 19 Jan 2010)
New Revision: 21447
Added:
torflow/trunk/NetworkScanners/BwAuthority/alpha_test.py
Modified:
torflow/trunk/NetworkScanners/BwAuthority/bwauthority.py
Log:
Remove control port debug logging from bwauthority.py.
Also add a script for testing ALPHA convergence.
Added: torflow/trunk/NetworkScanners/BwAuthority/alpha_test.py
===================================================================
--- torflow/trunk/NetworkScanners/BwAuthority/alpha_test.py (rev 0)
+++ torflow/trunk/NetworkScanners/BwAuthority/alpha_test.py 2010-01-19 04:59:23 UTC (rev 21447)
@@ -0,0 +1,19 @@
+#!/usr/bin/python
+
+import sys
+
+def ns_update(alpha, bw, r):
+ return bw*((1.0-alpha)+alpha*r)
+
+def main():
+ alpha = float(sys.argv[1])
+ bw = bw_orig = 1024
+ r = 2.5
+ for i in xrange(30):
+ print bw
+ bw = ns_update(alpha, bw, r)
+ if r < 1 and bw < bw_orig*r:
+ print i
+ break
+
+main()
Property changes on: torflow/trunk/NetworkScanners/BwAuthority/alpha_test.py
___________________________________________________________________
Added: svn:executable
+ *
Modified: torflow/trunk/NetworkScanners/BwAuthority/bwauthority.py
===================================================================
--- torflow/trunk/NetworkScanners/BwAuthority/bwauthority.py 2010-01-19 04:56:43 UTC (rev 21446)
+++ torflow/trunk/NetworkScanners/BwAuthority/bwauthority.py 2010-01-19 04:59:23 UTC (rev 21447)
@@ -321,7 +321,7 @@
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((TorUtil.control_host,TorUtil.control_port))
c = PathSupport.Connection(s)
- c.debug(file(out_dir+"/control.log", "w", buffering=0))
+ #c.debug(file(out_dir+"/control.log", "w", buffering=0))
c.authenticate_cookie(file(cookie_file, "r"))
#f = c.get_option("__LeaveStreamsUnattached")[0]
h = BwScanHandler(c, __selmgr,
More information about the tor-commits
mailing list