[CalendarServer-changes] [7583] CalendarServer/trunk/contrib/performance/loadtest/ical.py
source_changes at macosforge.org
source_changes at macosforge.org
Mon Jun 13 12:54:56 PDT 2011
Revision: 7583
http://trac.macosforge.org/projects/calendarserver/changeset/7583
Author: exarkun at twistedmatrix.com
Date: 2011-06-13 12:54:56 -0700 (Mon, 13 Jun 2011)
Log Message:
-----------
Do not mutate the log event dictionary, since it is shared amongst all of the observers of the event :/
Modified Paths:
--------------
CalendarServer/trunk/contrib/performance/loadtest/ical.py
Modified: CalendarServer/trunk/contrib/performance/loadtest/ical.py
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/ical.py 2011-06-13 19:27:10 UTC (rev 7582)
+++ CalendarServer/trunk/contrib/performance/loadtest/ical.py 2011-06-13 19:54:56 UTC (rev 7583)
@@ -749,12 +749,19 @@
def observe(self, event):
if event.get("type") == "response":
- event['url'] = urlunparse(('', '') + urlparse(event['url'])[2:])
+ formatArgs = dict(
+ user=event['user'],
+ method=event['method'],
+ url=urlunparse(('', '') + urlparse(event['url'])[2:]),
+ code=event['code'],
+ duration=event['duration'],
+ )
+
if event['success']:
- event['success'] = self.success
+ formatArgs['success'] = self.success
else:
- event['success'] = self.failure
- print (self.format % event).encode('utf-8')
+ formatArgs['success'] = self.failure
+ print (self.format % formatArgs).encode('utf-8')
def report(self):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110613/5c307724/attachment.html>
More information about the calendarserver-changes
mailing list