[Checkins] SVN: Sandbox/J1m/replaylog/replaylog.py Added an argument for number of threads.

Jim Fulton jim at zope.com
Sun May 6 04:49:23 EDT 2007


Log message for revision 75518:
  Added an argument for number of threads.
  

Changed:
  U   Sandbox/J1m/replaylog/replaylog.py

-=-
Modified: Sandbox/J1m/replaylog/replaylog.py
===================================================================
--- Sandbox/J1m/replaylog/replaylog.py	2007-05-06 08:45:13 UTC (rev 75517)
+++ Sandbox/J1m/replaylog/replaylog.py	2007-05-06 08:49:22 UTC (rev 75518)
@@ -59,7 +59,7 @@
                 good += 1
             except:
                 print 'trouble parsing', line
-                traceback.print_exc()
+                #traceback.print_exc()
                 bad += 1
                 
                 
@@ -113,6 +113,7 @@
 def main():
     args = sys.argv[1:]
     server = args.pop(0)
+    nthreads = int(args.pop(0))
 
     f = tempfile.TemporaryFile()
 
@@ -121,7 +122,7 @@
     threads = []
     queue = Queue(f)
 
-    for i in range(50):
+    for i in range(nthreads):
         thread = threading.Thread(target=process_queue, args=(server, queue))
         thread.start()
         threads.append(thread)



More information about the Checkins mailing list