[Zope-Checkins] CVS: ZODB3/ZEO - stats.py:1.17.6.1.18.3

Tim Peters cvs-admin at zope.org
Mon Dec 1 21:07:43 EST 2003


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

Modified Files:
      Tag: Zope-2_6-branch
	stats.py 
Log Message:
Added a cummulative % column to temporal distance output.


=== ZODB3/ZEO/stats.py 1.17.6.1.18.2 => 1.17.6.1.18.3 ===
--- ZODB3/ZEO/stats.py:1.17.6.1.18.2	Mon Dec  1 20:50:30 2003
+++ ZODB3/ZEO/stats.py	Mon Dec  1 21:07:43 2003
@@ -312,11 +312,14 @@
         all = sum(dist.values())
         print "Total oids with 1 load: %s" % addcommas(rest)
         print "Total oids with 2 or more loads: %s" % addcommas(repeats)
-        headers = ["Dist", "Count", "Percent"]
-        fmt = "%5s %7s %6s"
+        headers = ["Dist", "Count", "%", "Cumm%"]
+        fmt = "%5s %7s %6s %6s"
         print fmt % tuple(headers)
+        cumm = 0.0
         for dist, count in L:
-            print fmt % (dist, count, '%6.2f' % (100.0 * count / all))
+            percent = 100.0 * count / all
+            cumm += percent
+            print fmt % (dist, count, '%6.2f' % percent, '%6.2f' % cumm)
 
 def dumpbysize(bysize, how, how2):
     print




More information about the Zope-Checkins mailing list