[Zodb-checkins] CVS: StandaloneZODB/Tools - timeiter.py:1.1.2.9

Guido van Rossum guido@python.org
Fri, 18 Jan 2002 13:12:09 -0500


Update of /cvs-repository/StandaloneZODB/Tools
In directory cvs.zope.org:/tmp/cvs-serv16510

Modified Files:
      Tag: Standby-branch
	timeiter.py 
Log Message:
- ZEO now also supports 3-arg tpc_begin().

- Add column headers to sumary output.


=== StandaloneZODB/Tools/timeiter.py 1.1.2.8 => 1.1.2.9 ===
     counter = 0
     skipper = 0
+    print "%4s. %20s %6s %8s %6s %6s %6s %6s %6s" % (
+        "NUM", "TRANSACTION ID", "OBJS", "BYTES",
+        # Does anybody know what these times mean?
+        "t4-t0", "t1-t0", "t2-t1", "t3-t2", "t4-t3")
     for txn in srcdb.iterator():
         skipper += 1
         if skipper <= options.skiptxn:
@@ -237,11 +241,7 @@
         objects = 0
         size = 0
         t0 = time.time()
-        if options.dtype == "zeo":
-            # Hack: ZEO client storage only supports 1-arg tpc_begin
-            dstdb.tpc_begin(txn)
-        else:
-            dstdb.tpc_begin(txn, tid, txn.status)
+        dstdb.tpc_begin(txn, tid, txn.status)
         t1 = time.time()
         for r in txn:
             oid = r.oid