[Zope-Checkins] CVS: Zope/utilities/ZODBTools - zeoserverlog.py:1.4

Jeremy Hylton cvs-admin at zope.org
Fri Oct 24 11:29:14 EDT 2003


Update of /cvs-repository/Zope/utilities/ZODBTools
In directory cvs.zope.org:/tmp/cvs-serv30908/utilities/ZODBTools

Modified Files:
	zeoserverlog.py 
Log Message:
Generate column headings for the minute output.


=== Zope/utilities/ZODBTools/zeoserverlog.py 1.3 => 1.4 ===
--- Zope/utilities/ZODBTools/zeoserverlog.py:1.3	Thu Oct  2 14:17:26 2003
+++ Zope/utilities/ZODBTools/zeoserverlog.py	Fri Oct 24 11:29:13 2003
@@ -362,6 +362,11 @@
     else:
         f = xopen(f)
 
+    cols = ["time", "reads", "stores", "commits", "aborts", "txns"]
+    fmt = "%18s %6s %6s %7s %6s %6s"
+    print fmt % cols
+    print fmt % ["-"*len(col) for col in cols]
+
     mlast = r = s = c = a = cl = None
     rs = []
     ss = []
@@ -381,7 +386,7 @@
             if m != mlast:
                 if mlast:
                     if detail:
-                        print mlast, len(cl), r, s, c, a, a+c
+                        print fmt % (mlast, len(cl), r, s, c, a, a+c)
                     cls.append(len(cl))
                     rs.append(r)
                     ss.append(s)
@@ -406,7 +411,7 @@
 
     if mlast:
         if detail:
-            print mlast, len(cl), r, s, c, a, a+c
+            print fmt % (mlast, len(cl), r, s, c, a, a+c)
         cls.append(len(cl))
         rs.append(r)
         ss.append(s)




More information about the Zope-Checkins mailing list