[or-cvs] r17988: {torflow} Tiny output fix for speedracer. (torflow/trunk/NetworkScanners)

kloesing at seul.org kloesing at seul.org
Tue Jan 6 22:18:52 UTC 2009


Author: kloesing
Date: 2009-01-06 17:18:51 -0500 (Tue, 06 Jan 2009)
New Revision: 17988

Modified:
   torflow/trunk/NetworkScanners/speedracer.py
Log:
Tiny output fix for speedracer.

Modified: torflow/trunk/NetworkScanners/speedracer.py
===================================================================
--- torflow/trunk/NetworkScanners/speedracer.py	2009-01-06 22:07:21 UTC (rev 17987)
+++ torflow/trunk/NetworkScanners/speedracer.py	2009-01-06 22:18:51 UTC (rev 17988)
@@ -111,17 +111,17 @@
         
         t0 = time()
         ret = http_request(url)
-        if ret == 1:
-            successful += 1
         delta_build = time() - t0
         if delta_build >= 550.0:
             plog('NOTICE', 'Timer exceeded limit: ' + delta_build + '\n')
 
-        build_exit = get_exit_node(meta)
-        fetch_exit = build_exit
+        if ret == 1:
+            successful += 1
+            build_exit = get_exit_node(meta)
+            plog('DEBUG', str(skip) + '-' + str(pct) + '% circuit build+fetch took ' + str(delta_build) + ' for ' + str(build_exit))
+        else:
+            plog('DEBUG', str(skip) + '-' + str(pct) + '% circuit build+fetch failed for ' + str(build_exit))
 
-        plog('DEBUG', str(skip)+'-'+str(pct)+'% circuit build+fetch took ' + str(delta_build) + ' for ' + str(fetch_exit))
-        
         if (successful % save_every) == 0:
           meta.send_command_and_check('CLOSEALLCIRCS')
           meta.send_command_and_check('SAVESTATS '+os.getcwd()+'/data/speedraces/stats-'+str(skip)+':'+str(pct)+"-"+str(successful)+"-"+race_time)



More information about the tor-commits mailing list