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

source_changes at macosforge.org source_changes at macosforge.org
Wed Sep 1 12:05:21 PDT 2010


Revision: 6231
          http://trac.macosforge.org/projects/calendarserver/changeset/6231
Author:   exarkun at twistedmatrix.com
Date:     2010-09-01 12:05:19 -0700 (Wed, 01 Sep 2010)
Log Message:
-----------
Try combining these two sets of data in a new stat, to reflect the total time spent doing things with SQL

iternext values seem to always be really, really small compared to execute values though

Modified Paths:
--------------
    CalendarServer/trunk/contrib/performance/benchmark.py
    CalendarServer/trunk/contrib/performance/stats.py

Modified: CalendarServer/trunk/contrib/performance/benchmark.py
===================================================================
--- CalendarServer/trunk/contrib/performance/benchmark.py	2010-09-01 17:27:04 UTC (rev 6230)
+++ CalendarServer/trunk/contrib/performance/benchmark.py	2010-09-01 19:05:19 UTC (rev 6231)
@@ -166,8 +166,9 @@
         results = {
             Bytes('read'): self._read,
             Bytes('write'): self._write,
-            SQLDuration('execute'): self._execute,
-            SQLDuration('iternext'): self._iternext,
+            SQLDuration('execute'): self._execute, # Time spent in the execute phase of SQL execution
+            SQLDuration('iternext'): self._iternext, # Time spent fetching rows from the execute phase
+            SQLDuration('statements'): self._execute + self._iternext, # Combination of the previous two
             }
         self._init_stats()
         return results

Modified: CalendarServer/trunk/contrib/performance/stats.py
===================================================================
--- CalendarServer/trunk/contrib/performance/stats.py	2010-09-01 17:27:04 UTC (rev 6230)
+++ CalendarServer/trunk/contrib/performance/stats.py	2010-09-01 19:05:19 UTC (rev 6231)
@@ -138,7 +138,7 @@
             for (sql, interval) in data:
                 sql = self.normalize(sql)
                 statements.setdefault(sql, []).append(interval)
-        
+
         byTime = []
         for statement, times in statements.iteritems():
             byTime.append((sum(times), len(times), statement))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100901/38f574b0/attachment-0001.html>


More information about the calendarserver-changes mailing list