[Zodb-checkins] CVS: ZODB3/ZEO - simul.py:1.12.8.2.18.17

Tim Peters cvs-admin at zope.org
Sat Dec 6 17:59:29 EST 2003


Update of /cvs-repository/ZODB3/ZEO
In directory cvs.zope.org:/tmp/cvs-serv969/ZEO

Modified Files:
      Tag: Zope-2_6-branch
	simul.py 
Log Message:
Ensure that the last line of output always ends with "OVERALL".  This
makes it much easier for another program parsing a whole bunch of these
to find the summary statistics from each run.


=== ZODB3/ZEO/simul.py 1.12.8.2.18.16 => 1.12.8.2.18.17 ===
--- ZODB3/ZEO/simul.py:1.12.8.2.18.16	Sat Dec  6 01:03:48 2003
+++ ZODB3/ZEO/simul.py	Sat Dec  6 17:59:28 2003
@@ -257,7 +257,7 @@
 
     nreports = 0
 
-    def report(self):
+    def report(self, extratext=''):
         if self.loads:
             self.nreports += 1
             args = (time.ctime(self.ts0)[4:-8],
@@ -265,11 +265,16 @@
                     self.loads, self.hits, self.invals, self.writes,
                     hitrate(self.loads, self.hits))
             args += tuple([getattr(self, name) for name in self.extras])
-            print self.format % args
+            print self.format % args, extratext
 
     def finish(self):
-        self.report()
-        if self.nreports > 1:
+        # Make sure that the last line of output ends with "OVERALL".  This
+        # makes it much easier for another program parsing the output to
+        # find summary statistics.
+        if self.nreports < 2:
+            self.report('OVERALL')
+        else:
+            self.report()
             args = (
                 time.ctime(self.epoch)[4:-8],
                 duration(self.ts1 - self.epoch),




More information about the Zodb-checkins mailing list