[Zodb-checkins] SVN: zodbbench/trunk/zodbbench/ Benchmarks should have version numbers too.

Tim Peters tim.one at comcast.net
Thu Oct 6 17:06:00 EDT 2005


Log message for revision 38836:
  Benchmarks should have version numbers too.
  

Changed:
  U   zodbbench/trunk/zodbbench/benchmarks/one_minute_commit.py
  U   zodbbench/trunk/zodbbench/utils.py

-=-
Modified: zodbbench/trunk/zodbbench/benchmarks/one_minute_commit.py
===================================================================
--- zodbbench/trunk/zodbbench/benchmarks/one_minute_commit.py	2005-10-06 21:01:17 UTC (rev 38835)
+++ zodbbench/trunk/zodbbench/benchmarks/one_minute_commit.py	2005-10-06 21:05:59 UTC (rev 38836)
@@ -31,6 +31,7 @@
 
 class OneMinute(BenchBase):
     name = "one-minute commit"
+    version = "0.9"
 
     def __init__(self):
         self.open_fs()

Modified: zodbbench/trunk/zodbbench/utils.py
===================================================================
--- zodbbench/trunk/zodbbench/utils.py	2005-10-06 21:01:17 UTC (rev 38835)
+++ zodbbench/trunk/zodbbench/utils.py	2005-10-06 21:05:59 UTC (rev 38836)
@@ -72,7 +72,8 @@
     from time import time as now
 
 class BenchBase(object):
-    name = None   # subclass should override with benchmark name
+    name = None     # subclass should override with benchmark name
+    version = None  #    "       "       "       "      "     version number
 
     def open_fs(self, path=None):
         """Open a FileStorage.
@@ -110,12 +111,12 @@
     def report(self, msg):
         """Display a report to stdout.
 
-        The starts by listing the name of the benchmark (self.name),
-        then gives the Python and ZODB versions in use, and then displays
-        `msg`.
+        The starts by listing the name of the benchmark (self.name and
+        self.version), then gives the Python and ZODB versions in use, and
+        then displays `msg`.
         """
 
-        print "Benchmark", self.name
+        print "Benchmark %s, version %s" % (self.name, self.version)
         print "Python version:", sys.version
         print "ZODB version:", ZODB.__version__
         print msg



More information about the Zodb-checkins mailing list