[CalendarServer-changes] [11838] CalendarServer/trunk/contrib/performance/sqlusage/sqlusage.py
source_changes at macosforge.org
source_changes at macosforge.org
Wed Mar 12 11:21:58 PDT 2014
Revision: 11838
http://trac.calendarserver.org//changeset/11838
Author: cdaboo at apple.com
Date: 2013-10-28 16:58:05 -0700 (Mon, 28 Oct 2013)
Log Message:
-----------
Do better warm-up before each test.
Modified Paths:
--------------
CalendarServer/trunk/contrib/performance/sqlusage/sqlusage.py
Modified: CalendarServer/trunk/contrib/performance/sqlusage/sqlusage.py
===================================================================
--- CalendarServer/trunk/contrib/performance/sqlusage/sqlusage.py 2013-10-28 23:57:35 UTC (rev 11837)
+++ CalendarServer/trunk/contrib/performance/sqlusage/sqlusage.py 2013-10-28 23:58:05 UTC (rev 11838)
@@ -127,11 +127,17 @@
]
self.requestLabels = [request.label for request in requests]
- # Warm-up server by doing calendar home and calendar propfinds
- props = (davxml.resourcetype,)
- for session in sessions:
- session.getPropertiesOnHierarchy(URL(path=session.homeHref), props)
- session.getPropertiesOnHierarchy(URL(path=session.calendarHref), props)
+ def _warmUp():
+ # Warm-up server by doing calendar home and child collection propfinds.
+ # Do this twice because the very first time might provision DB objects and
+ # blow any DB cache - the second time will warm the DB cache.
+ props = (davxml.resourcetype,)
+ for _ignore in range(2):
+ for session in sessions:
+ session.getPropertiesOnHierarchy(URL(path=session.homeHref), props)
+ session.getPropertiesOnHierarchy(URL(path=session.calendarHref), props)
+ session.getPropertiesOnHierarchy(URL(path=session.inboxHref), props)
+ session.getPropertiesOnHierarchy(URL(path=session.notificationHref), props)
# Now loop over sets of events
for count in event_counts:
@@ -140,6 +146,7 @@
result = {}
for request in requests:
print(" Test = %s" % (request.label,))
+ _warmUp()
result[request.label] = request.execute(count)
self.results[count] = result
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140312/4106b1bb/attachment.html>
More information about the calendarserver-changes
mailing list