[CalendarServer-changes] [15656] CalendarServer/trunk/contrib/performance/loadtest
source_changes at macosforge.org
source_changes at macosforge.org
Fri Jun 3 17:34:43 PDT 2016
Revision: 15656
http://trac.calendarserver.org//changeset/15656
Author: sagen at apple.com
Date: 2016-06-03 17:34:42 -0700 (Fri, 03 Jun 2016)
Log Message:
-----------
Sim sends a configurable number of unauthenticated requests
Modified Paths:
--------------
CalendarServer/trunk/contrib/performance/loadtest/clients.plist
CalendarServer/trunk/contrib/performance/loadtest/ical.py
Added Paths:
-----------
CalendarServer/trunk/contrib/performance/loadtest/request-data/OS_X_10_11/poll_inbox_propfind.request
Modified: CalendarServer/trunk/contrib/performance/loadtest/clients.plist
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/clients.plist 2016-06-03 20:38:13 UTC (rev 15655)
+++ CalendarServer/trunk/contrib/performance/loadtest/clients.plist 2016-06-04 00:34:42 UTC (rev 15656)
@@ -55,6 +55,10 @@
<key>supportAmpPush</key>
<true/>
+
+ <key>unauthenticatedPercentage</key>
+ <integer>27</integer>
+
</dict>
<!-- The profiles define certain types of user behavior on top of the
@@ -798,6 +802,10 @@
<key>supportAmpPush</key>
<true/>
+
+ <key>unauthenticatedPercentage</key>
+ <integer>27</integer>
+
</dict>
<!-- The profiles define certain types of user behavior on top of the
Modified: CalendarServer/trunk/contrib/performance/loadtest/ical.py
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/ical.py 2016-06-03 20:38:13 UTC (rev 15655)
+++ CalendarServer/trunk/contrib/performance/loadtest/ical.py 2016-06-04 00:34:42 UTC (rev 15656)
@@ -494,6 +494,7 @@
_POLL_CALENDAR_SYNC_REPORT = None
_POLL_NOTIFICATION_PROPFIND = None
_POLL_NOTIFICATION_PROPFIND_D1 = None
+ _POLL_INBOX_PROPFIND = None
_NOTIFICATION_SYNC_REPORT = None
_CALENDARHOME_SYNC_REPORT = None
@@ -518,6 +519,7 @@
calendarHomePollInterval=None,
supportPush=True,
supportAmpPush=True,
+ unauthenticatedPercentage=30,
):
self._client_id = str(uuid4())
@@ -530,8 +532,9 @@
self.reactor,
contextFactory=_DeprecatedToCurrentPolicyForHTTPS(WebClientContextFactory()),
)
- agent = ContentDecoderAgent(agent, [("gzip", GzipDecoder)])
- self.agent = AuthHandlerAgent(agent, auth)
+ self.noAuthAgent = ContentDecoderAgent(agent, [("gzip", GzipDecoder)])
+ self.agent = AuthHandlerAgent(self.noAuthAgent, auth)
+ self.unauthenticatedPercentage = unauthenticatedPercentage
self.server = server
self.principalPathTemplate = principalPathTemplate
@@ -636,6 +639,13 @@
client_id=self._client_id,
)
+ choice = random.randint(1, 100)
+ if choice < self.unauthenticatedPercentage:
+ # First send an unauthenticated request
+ response = yield self.noAuthAgent.request(method, url, headers, body)
+ yield readBody(response)
+
+
before = self.reactor.seconds()
response = yield self.agent.request(method, url, headers, body)
@@ -1523,6 +1533,9 @@
yield self._updateCalendar(self._calendars[cal.url], newToken)
self._calendars[cal.url].invitees = cal.invitees
+ if self._instanceNumber == 0 and cal.name == "inbox":
+ yield self._inboxPropfind()
+
# Clean out previously seen collections that are no longer on the server
currentCalendarUris = [c.url for c in calendars]
for previouslySeenCalendarUri in self._calendars.keys():
@@ -1622,6 +1635,20 @@
@inlineCallbacks
+ def _inboxPropfind(self):
+ for cal in self._calendars.itervalues():
+ if cal.name == "inbox":
+ inboxURL = cal.url
+ yield self._propfind(
+ inboxURL,
+ self._POLL_INBOX_PROPFIND,
+ depth='1',
+ method_label="PROPFIND{inbox}",
+ )
+ break
+
+
+ @inlineCallbacks
def _principalExpand(self, principalURL):
result = yield self._report(
principalURL,
@@ -2508,6 +2535,7 @@
_POLL_CALENDAR_SYNC_REPORT = loadRequestBody('OS_X_10_7', 'poll_calendar_sync')
_POLL_NOTIFICATION_PROPFIND = loadRequestBody(_LOAD_PATH, 'poll_calendar_propfind')
_POLL_NOTIFICATION_PROPFIND_D1 = loadRequestBody(_LOAD_PATH, 'poll_notification_depth1_propfind')
+ _POLL_INBOX_PROPFIND = loadRequestBody(_LOAD_PATH, 'poll_inbox_propfind')
_NOTIFICATION_SYNC_REPORT = loadRequestBody(_LOAD_PATH, 'notification_sync')
_CALENDARHOME_SYNC_REPORT = loadRequestBody(_LOAD_PATH, 'poll_calendarhome_sync')
Added: CalendarServer/trunk/contrib/performance/loadtest/request-data/OS_X_10_11/poll_inbox_propfind.request
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/request-data/OS_X_10_11/poll_inbox_propfind.request (rev 0)
+++ CalendarServer/trunk/contrib/performance/loadtest/request-data/OS_X_10_11/poll_inbox_propfind.request 2016-06-04 00:34:42 UTC (rev 15656)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<A:propfind xmlns:A="DAV:">
+ <A:prop>
+ <A:getcontenttype/>
+ <A:getetag/>
+ </A:prop>
+</A:propfind>
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20160603/2e4d0dbb/attachment.html>
More information about the calendarserver-changes
mailing list