[CalendarServer-changes] [7503] CalendarServer/trunk/contrib/performance/loadtest

source_changes at macosforge.org source_changes at macosforge.org
Thu May 19 12:15:52 PDT 2011


Revision: 7503
          http://trac.macosforge.org/projects/calendarserver/changeset/7503
Author:   exarkun at twistedmatrix.com
Date:     2011-05-19 12:15:51 -0700 (Thu, 19 May 2011)
Log Message:
-----------
Start a normal log observer so that error messages are included in output; also make the log dumper really work

Modified Paths:
--------------
    CalendarServer/trunk/contrib/performance/loadtest/ical.py
    CalendarServer/trunk/contrib/performance/loadtest/population.py
    CalendarServer/trunk/contrib/performance/loadtest/sim.py

Modified: CalendarServer/trunk/contrib/performance/loadtest/ical.py
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/ical.py	2011-05-19 18:03:51 UTC (rev 7502)
+++ CalendarServer/trunk/contrib/performance/loadtest/ical.py	2011-05-19 19:15:51 UTC (rev 7503)
@@ -468,6 +468,7 @@
             self._checkCalendarsForEvents, calendarHome)
         return pollCalendarHome.start(self.calendarHomePollInterval, now=False)
 
+
     def _newOperation(self, label, deferred):
         before = self.reactor.seconds()
         msg(type="operation", phase="start", user=self.user, label=label)

Modified: CalendarServer/trunk/contrib/performance/loadtest/population.py
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/population.py	2011-05-19 18:03:51 UTC (rev 7502)
+++ CalendarServer/trunk/contrib/performance/loadtest/population.py	2011-05-19 19:15:51 UTC (rev 7503)
@@ -165,10 +165,11 @@
     def _dumpLogs(self, loggingReactor):
         path = FilePath(mkdtemp())
         logstate = loggingReactor.getLogFiles()
+        i = 0
         for i, log in enumerate(logstate.finished):
-            path.child('%03.log' % (i,)).setContent(log.getvalue())
+            path.child('%03d.log' % (i,)).setContent(log.getvalue())
         for i, log in enumerate(logstate.active, i):
-            path.child('%03.log' % (i,)).setContent(log.getvalue())
+            path.child('%03d.log' % (i,)).setContent(log.getvalue())
         return path
 
 

Modified: CalendarServer/trunk/contrib/performance/loadtest/sim.py
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/sim.py	2011-05-19 18:03:51 UTC (rev 7502)
+++ CalendarServer/trunk/contrib/performance/loadtest/sim.py	2011-05-19 19:15:51 UTC (rev 7503)
@@ -15,14 +15,14 @@
 #
 ##
 
-from sys import argv
+from sys import argv, stderr
 from random import Random
 from plistlib import readPlist
 from collections import namedtuple
 
 from twisted.python import context
 from twisted.python.filepath import FilePath
-from twisted.python.log import addObserver, removeObserver
+from twisted.python.log import startLogging, addObserver, removeObserver
 from twisted.python.usage import UsageError, Options
 from twisted.python.reflect import namedAny
 
@@ -227,6 +227,7 @@
             addObserver(obs.observe)
             self.reactor.addSystemEventTrigger(
                 'before', 'shutdown', removeObserver, obs.observe)
+        startLogging(stderr)
         sim = self.createSimulator()
         arrivalPolicy = self.createArrivalPolicy()
         arrivalPolicy.run(sim)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110519/e0ad91f9/attachment-0001.html>


More information about the calendarserver-changes mailing list