[CalendarServer-changes] [6099] CalendarServer/trunk/contrib/performance

source_changes at macosforge.org source_changes at macosforge.org
Tue Aug 17 17:34:33 PDT 2010


Revision: 6099
          http://trac.macosforge.org/projects/calendarserver/changeset/6099
Author:   exarkun at twistedmatrix.com
Date:     2010-08-17 17:34:30 -0700 (Tue, 17 Aug 2010)
Log Message:
-----------
simple tool for simple inspection of the stats dumps

Added Paths:
-----------
    CalendarServer/trunk/contrib/performance/report
    CalendarServer/trunk/contrib/performance/report.py

Added: CalendarServer/trunk/contrib/performance/report
===================================================================
--- CalendarServer/trunk/contrib/performance/report	                        (rev 0)
+++ CalendarServer/trunk/contrib/performance/report	2010-08-18 00:34:30 UTC (rev 6099)
@@ -0,0 +1,4 @@
+#!/usr/bin/python
+
+from report import main
+main()


Property changes on: CalendarServer/trunk/contrib/performance/report
___________________________________________________________________
Added: svn:executable
   + *

Added: CalendarServer/trunk/contrib/performance/report.py
===================================================================
--- CalendarServer/trunk/contrib/performance/report.py	                        (rev 0)
+++ CalendarServer/trunk/contrib/performance/report.py	2010-08-18 00:34:30 UTC (rev 6099)
@@ -0,0 +1,39 @@
+import sys, pickle
+
+
+def main():
+    statistics = pickle.load(file(sys.argv[1]))
+
+    if len(sys.argv) == 2:
+        print 'Available benchmarks'
+        print '\t' + '\n\t'.join(statistics.keys())
+        return
+
+    statistics = statistics[sys.argv[2]]
+
+    if len(sys.argv) == 3:
+        print 'Available parameters'
+        print '\t' + '\n\t'.join(map(str, statistics.keys()))
+        return
+
+    statistics = statistics[int(sys.argv[3])]
+
+    if len(sys.argv) == 4:
+        print 'Available statistics'
+        print '\t' + '\n\t'.join([s.name for s in statistics])
+        return
+
+    for stat in statistics:
+        if stat.name == sys.argv[4]:
+            samples = statistics[stat]
+            break
+
+    if len(sys.argv) == 5:
+        print 'Samples'
+        print '\t' + '\n\t'.join(map(str, samples))
+        print 'Commands'
+        print '\t' + '\n\t'.join(stat.commands)
+        return
+
+    getattr(stat, sys.argv[5])(samples)
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100817/ae799a4c/attachment-0001.html>


More information about the calendarserver-changes mailing list