[Checkins] SVN: zc.zeoinputlog/branches/replay/src/zc/zeoinputlog/replay.py *** empty log message ***

Jim Fulton jim at zope.com
Wed Oct 7 21:45:34 EDT 2009


Log message for revision 104903:
  *** empty log message ***

Changed:
  U   zc.zeoinputlog/branches/replay/src/zc/zeoinputlog/replay.py

-=-
Modified: zc.zeoinputlog/branches/replay/src/zc/zeoinputlog/replay.py
===================================================================
--- zc.zeoinputlog/branches/replay/src/zc/zeoinputlog/replay.py	2009-10-07 23:18:51 UTC (rev 104902)
+++ zc.zeoinputlog/branches/replay/src/zc/zeoinputlog/replay.py	2009-10-08 01:45:34 UTC (rev 104903)
@@ -403,7 +403,9 @@
         if last:
             n -= last[0]
             t -= last[1]
-        print "%20s %10d %10.3f" % (op, n, t*1000/n)
+        if n:
+            print "%20s %10d %10.3f" % (op, n, t*1000/n)
+
     return times
 
 def main(args=None):
@@ -422,11 +424,13 @@
           A marshalled extract of file-storage records for the period of the
           input log.
 
+    $Id$
     """
     if args is None:
         args = sys.argv[1:]
 
-    [addr, log, source] = args
+    print args
+    [addr, log, source] = args[:3]
     addr = parse_addr(addr)
 
     log = Log(log)
@@ -460,16 +464,16 @@
     last_times = {}
     for t in Transactions(source):
 
-        if nt and (nt%1000 == 0):
-            last_times = print_times(last_times, handlers.times,
-                                     "after %s transactions" % nt)
-
         sys.stdout.flush()
         pending = handlers.calls - handlers.replies - handlers.abandoned
         while pending > 10000:
             time.sleep(.01)
             pending = handlers.calls - handlers.replies - handlers.abandoned
 
+        if nt and (nt%1000 == 0):
+            last_times = print_times(last_times, handlers.times,
+                                     "after %s transactions" % nt)
+
         nt += 1
 
         tt = ZODB.TimeStamp.TimeStamp(t.id).timeTime()
@@ -481,7 +485,8 @@
         lastnow = now
         lasttt = tt
         work = nt + nr + handlers.calls + handlers.async
-        print '=== top', time.ctime(), ZODB.TimeStamp.TimeStamp(time_stamp(tt))
+        print '=== top', time.ctime(), nt, ZODB.TimeStamp.TimeStamp(
+            time_stamp(tt))
         print '       ', handlers.connected, handlers.calls, handlers.replies,
         print handlers.errors, handlers.async, pending, speed, speed1
         while logrecord[1] < tt:



More information about the checkins mailing list