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

source_changes at macosforge.org source_changes at macosforge.org
Fri Jul 25 10:59:34 PDT 2014


Revision: 13791
          http://trac.calendarserver.org//changeset/13791
Author:   cdaboo at apple.com
Date:     2014-07-25 10:59:34 -0700 (Fri, 25 Jul 2014)
Log Message:
-----------
Add a new sim profile to simulate users acknowledging alarms.

Modified Paths:
--------------
    CalendarServer/trunk/contrib/performance/loadtest/ampsim.py
    CalendarServer/trunk/contrib/performance/loadtest/clients.plist
    CalendarServer/trunk/contrib/performance/loadtest/ical.py
    CalendarServer/trunk/contrib/performance/loadtest/logger.py
    CalendarServer/trunk/contrib/performance/loadtest/population.py
    CalendarServer/trunk/contrib/performance/loadtest/profiles.py
    CalendarServer/trunk/contrib/performance/loadtest/sim.py
    CalendarServer/trunk/contrib/performance/loadtest/standard-configs/events-only.plist
    CalendarServer/trunk/contrib/performance/loadtest/standard-configs/invites-accepts.plist
    CalendarServer/trunk/contrib/performance/loadtest/standard-configs/invites-only-recurring.plist
    CalendarServer/trunk/contrib/performance/loadtest/standard-configs/invites-only.plist
    CalendarServer/trunk/contrib/performance/loadtest/test_population.py

Added Paths:
-----------
    CalendarServer/trunk/contrib/performance/loadtest/standard-configs/event-updates-only.plist

Modified: CalendarServer/trunk/contrib/performance/loadtest/ampsim.py
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/ampsim.py	2014-07-25 17:55:45 UTC (rev 13790)
+++ CalendarServer/trunk/contrib/performance/loadtest/ampsim.py	2014-07-25 17:59:34 UTC (rev 13791)
@@ -34,7 +34,7 @@
             from twisted.internet import reactor
             from twisted.internet.stdio import StandardIO
 
-            #from contrib.performance.loadtest.ampsim import Worker
+            # from contrib.performance.loadtest.ampsim import Worker
             from contrib.performance.loadtest.sim import LagTrackingReactor
 
             StandardIO(Worker(LagTrackingReactor(reactor)))
@@ -183,7 +183,7 @@
 
     @LogMessage.responder
     def observed(self, event):
-        #from pprint import pformat
-        #self.output.write(pformat(event)+"\n")
+        # from pprint import pformat
+        # self.output.write(pformat(event)+"\n")
         msg(**event)
         return {}

Modified: CalendarServer/trunk/contrib/performance/loadtest/clients.plist
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/clients.plist	2014-07-25 17:55:45 UTC (rev 13790)
+++ CalendarServer/trunk/contrib/performance/loadtest/clients.plist	2014-07-25 17:59:34 UTC (rev 13791)
@@ -170,6 +170,109 @@
 						</dict>
 					</dict>
 
+					<!-- This profile will create a new event, and then periodically update the ACKNOWLEDGED property. -->
+					<dict>
+						<key>class</key>
+						<string>contrib.performance.loadtest.profiles.EventUpdater</string>
+
+						<key>params</key>
+						<dict>
+							<key>enabled</key>
+							<false/>
+
+							<!-- Define the interval (in seconds) at which this profile will use
+								its client to create a new event. -->
+							<key>interval</key>
+							<integer>5</integer>
+
+							<!-- Define how start times (DTSTART) for the randomly generated events
+								will be selected. This is an example of a "Distribution" parameter. The value
+								for most "Distribution" parameters are interchangeable and extensible. -->
+							<key>eventStartDistribution</key>
+							<dict>
+
+								<!-- This distribution is pretty specialized. It produces timestamps
+									in the near future, limited to certain days of the week and certain hours
+									of the day. -->
+								<key>type</key>
+								<string>contrib.performance.stats.WorkDistribution</string>
+
+								<key>params</key>
+								<dict>
+									<!-- These are the days of the week the distribution will use. -->
+									<key>daysOfWeek</key>
+									<array>
+										<string>mon</string>
+										<string>tue</string>
+										<string>wed</string>
+										<string>thu</string>
+										<string>fri</string>
+									</array>
+
+									<!-- The earliest hour of a day at which an event might be scheduled. -->
+									<key>beginHour</key>
+									<integer>8</integer>
+
+									<!-- And the latest hour of a day (at which an event will be scheduled
+										to begin!). -->
+									<key>endHour</key>
+									<integer>16</integer>
+
+									<!-- The timezone in which the event is scheduled. (XXX Does this
+										really work right?) -->
+									<key>tzname</key>
+									<string>America/Los_Angeles</string>
+								</dict>
+							</dict>
+
+							<!-- Define how recurrences are created. -->
+							<key>recurrenceDistribution</key>
+							<dict>
+
+								<!-- This distribution is pretty specialized.  We have a fixed set of
+								     RRULEs defined for this distribution and pick each based on a
+								     weight. -->
+								<key>type</key>
+								<string>contrib.performance.stats.RecurrenceDistribution</string>
+
+								<key>params</key>
+								<dict>
+									<!-- False to disable RRULEs -->
+									<key>allowRecurrence</key>
+									<true/>
+
+									<!-- These are the weights for the specific set of RRULEs. -->
+									<key>weights</key>
+									<dict>
+										<!-- Half of all events will be non-recurring -->
+										<key>none</key>
+										<integer>50</integer>
+										
+										<!-- Daily and weekly are pretty common -->
+										<key>daily</key>
+										<integer>25</integer>
+										<key>weekly</key>
+										<integer>25</integer>
+										
+										<!-- Monthly, yearly, daily & weekly limit not so common -->
+										<key>monthly</key>
+										<integer>0</integer>
+										<key>yearly</key>
+										<integer>0</integer>
+										<key>dailylimit</key>
+										<integer>0</integer>
+										<key>weeklylimit</key>
+										<integer>0</integer>
+										
+										<!-- Work days pretty common -->
+										<key>workdays</key>
+										<integer>0</integer>
+									</dict>
+								</dict>
+							</dict>
+						</dict>
+					</dict>
+
 					<!-- This profile invites some number of new attendees to new events. -->
 					<dict>
 						<key>class</key>

Modified: CalendarServer/trunk/contrib/performance/loadtest/ical.py
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/ical.py	2014-07-25 17:55:45 UTC (rev 13790)
+++ CalendarServer/trunk/contrib/performance/loadtest/ical.py	2014-07-25 17:59:34 UTC (rev 13791)
@@ -291,6 +291,13 @@
         raise NotImplementedError("%r does not implement addInvite" % (self.__class__,))
 
 
+    def changeEvent(self, href, calendar):
+        """
+        Called when a profile needs to change an event (no scheduling).
+        """
+        raise NotImplementedError("%r does not implement changeEvent" % (self.__class__,))
+
+
     def deleteEvent(self, href):
         """
         Called when a profile needs to delete an event.
@@ -472,7 +479,7 @@
         # Allow events to go out into the world.
         self.catalog = {
             "eventChanged": Periodical(),
-            }
+        }
 
 
     def _addDefaultHeaders(self, headers):
@@ -550,9 +557,9 @@
             return parser.getResults()
 
     _CALENDAR_TYPES = set([
-            caldavxml.calendar,
-            caldavxml.schedule_inbox,
-            ])
+        caldavxml.calendar,
+        caldavxml.schedule_inbox,
+    ])
 
     @inlineCallbacks
     def _propfind(self, url, body, depth='0', allowedStatus=(MULTI_STATUS,), method_label=None):
@@ -787,12 +794,12 @@
 
                     changeTag = davxml.sync_token if self.supportSync else csxml.getctag
                     calendars.append(Calendar(
-                            nodeType.tag,
-                            componentTypes,
-                            textProps.get(davxml.displayname, None),
-                            href,
-                            textProps.get(changeTag, None),
-                            ))
+                        nodeType.tag,
+                        componentTypes,
+                        textProps.get(davxml.displayname, None),
+                        href,
+                        textProps.get(changeTag, None),
+                    ))
                     break
         return calendars
 
@@ -1215,8 +1222,10 @@
         """
         Start monitoring for AMP-based push notifications
         """
-        subscribeToIDs(self.ampPushHost, self.ampPushPort, pushKeys,
-            self._receivedPush, self.reactor)
+        subscribeToIDs(
+            self.ampPushHost, self.ampPushPort, pushKeys,
+            self._receivedPush, self.reactor
+        )
 
 
     @inlineCallbacks
@@ -1413,8 +1422,10 @@
             # test account names are all too similar
             # name = attendee.parameterValue('CN').encode("utf-8")
             # prefix = name[:4].lower()
-            prefix = random.choice(["chris", "cyru", "dre", "eric", "morg",
-                "well", "wilfr", "witz"])
+            prefix = random.choice([
+                "chris", "cyru", "dre", "eric", "morg",
+                "well", "wilfr", "witz"
+            ])
 
             email = attendee.value()
             if email.startswith("mailto:"):
@@ -1427,14 +1438,14 @@
             yield self._report(
                 self.principalCollection,
                 self._USER_LIST_PRINCIPAL_PROPERTY_SEARCH % {
-                'displayname': prefix,
-                'email': prefix,
-                'firstname': prefix,
-                'lastname': prefix,
+                    'displayname': prefix,
+                    'email': prefix,
+                    'firstname': prefix,
+                    'lastname': prefix,
                 },
                 depth=None,
                 method_label="REPORT{psearch}",
-           )
+            )
 
             # Now learn about the attendee's availability
             yield self.requestAvailability(
@@ -1455,8 +1466,8 @@
         component.mainComponent().addProperty(newAttendee)
         okCodes = NO_CONTENT
         headers = Headers({
-                'content-type': ['text/calendar'],
-                })
+            'content-type': ['text/calendar'],
+        })
         if event.scheduleTag is not None:
             headers.addRawHeader('if-schedule-tag-match', event.scheduleTag)
             okCodes = (NO_CONTENT, PRECONDITION_FAILED,)
@@ -1503,8 +1514,8 @@
     @inlineCallbacks
     def addEvent(self, href, component, invite=False):
         headers = Headers({
-                'content-type': ['text/calendar'],
-                })
+            'content-type': ['text/calendar'],
+        })
 
         attendees = list(component.mainComponent().properties('ATTENDEE'))
         label_suffix = "small"
@@ -1544,6 +1555,29 @@
         yield self.addEvent(href, component, invite=True)
 
 
+    @inlineCallbacks
+    def changeEvent(self, href):
+
+        event = self._events[href]
+        component = event.component
+
+        # At last, upload the new event definition
+        response = yield self._request(
+            (NO_CONTENT, PRECONDITION_FAILED,),
+            'PUT',
+            self.root + href.encode('utf-8'),
+            Headers({
+                'content-type': ['text/calendar'],
+                'if-match': [event.etag]
+            }),
+            StringProducer(component.getTextWithTimezones(includeTimezones=True)),
+            method_label="PUT{update}"
+        )
+
+        # Finally, re-retrieve the event to update the etag
+        yield self._updateEvent(response, href)
+
+
     def _localUpdateEvent(self, response, href, component):
         headers = response.headers
         etag = headers.getRawHeaders("etag", [None])[0]
@@ -1634,14 +1668,15 @@
                     'originator': [self.email],
                     'recipient': [u', '.join(users).encode('utf-8')]}),
             StringProducer(self._POST_AVAILABILITY % {
-                    'attendees': attendeeStr,
-                    'summary': (u'Availability for %s' % (', '.join(users),)).encode('utf-8'),
-                    'organizer': self.email.encode('utf-8'),
-                    'vfreebusy-uid': str(uuid4()).upper(),
-                    'event-mask': maskStr,
-                    'start': start,
-                    'end': end,
-                    'now': now}),
+                'attendees': attendeeStr,
+                'summary': (u'Availability for %s' % (', '.join(users),)).encode('utf-8'),
+                'organizer': self.email.encode('utf-8'),
+                'vfreebusy-uid': str(uuid4()).upper(),
+                'event-mask': maskStr,
+                'start': start,
+                'end': end,
+                'now': now,
+            }),
             method_label="POST{fb-%s}" % (label_suffix,),
         )
         body = yield readBody(response)
@@ -1999,7 +2034,7 @@
                 url=urlunparse(('', '') + urlparse(event['url'])[2:]),
                 code=event['code'],
                 duration=event['duration'],
-                )
+            )
 
             if event['success']:
                 formatArgs['success'] = self.success

Modified: CalendarServer/trunk/contrib/performance/loadtest/logger.py
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/logger.py	2014-07-25 17:55:45 UTC (rev 13790)
+++ CalendarServer/trunk/contrib/performance/loadtest/logger.py	2014-07-25 17:59:34 UTC (rev 13791)
@@ -65,8 +65,8 @@
                 failure = True
 
         return (operation, count, failed,) + \
-                tuple(thresholds) + \
-                (mean(durations), median(durations), stddev(durations), "FAIL" if failure else "")
+            tuple(thresholds) + \
+            (mean(durations), median(durations), stddev(durations), "FAIL" if failure else "")
 
 
     def _printRow(self, output, formats, values):

Modified: CalendarServer/trunk/contrib/performance/loadtest/population.py
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/population.py	2014-07-25 17:55:45 UTC (rev 13790)
+++ CalendarServer/trunk/contrib/performance/loadtest/population.py	2014-07-25 17:59:34 UTC (rev 13791)
@@ -87,7 +87,10 @@
         Create a new instance of this client type.
         """
         return self.clientType(
-            reactor, serverAddress, principalPathTemplate, serializationPath, userRecord, authInfo, **self.clientParams)
+            reactor, serverAddress, principalPathTemplate,
+            serializationPath, userRecord, authInfo,
+            **self.clientParams
+        )
 
 
 
@@ -252,8 +255,12 @@
                 for profileType in clientType.profileTypes:
                     profile = profileType(reactor, self, client, number)
                     if profile.enabled:
-                        d = profile.run()
-                        d.addErrback(self._profileFailure, profileType, reactor)
+                        d = profile.initialize()
+                        def _run(result):
+                            d2 = profile.run()
+                            d2.addErrback(self._profileFailure, profileType, reactor)
+                            return d2
+                        d.addCallback(_run)
 
         # XXX this status message is prone to be slightly inaccurate, but isn't
         # really used by much anyway.
@@ -276,7 +283,7 @@
         if not self._stopped:
             where = self._dumpLogs(reactor, reason)
             err(reason, "Client stopped with error; recent traffic in %r" % (
-                    where.path,))
+                where.path,))
             if not isinstance(reason, Failure):
                 reason = Failure(reason)
             msg(type="client-failure", reason="%s: %s" % (reason.type, reason.value,))
@@ -286,7 +293,7 @@
         if not self._stopped:
             where = self._dumpLogs(reactor, reason)
             err(reason, "Profile stopped with error; recent traffic in %r" % (
-                    where.path,))
+                where.path,))
 
 
     def _simFailure(self, reason, reactor):
@@ -557,12 +564,15 @@
         output.write("* Details\n")
 
         self.printHeader(output, [
-                (label, width)
-                for (label, width, _ignore_fmt)
-                in self._fields])
-        self.printData(output,
+            (label, width)
+            for (label, width, _ignore_fmt)
+            in self._fields
+        ])
+        self.printData(
+            output,
             [fmt for (label, width, fmt) in self._fields],
-            sorted(self._perMethodTimes.items()))
+            sorted(self._perMethodTimes.items())
+        )
 
     _FAILED_REASON = "Greater than %(cutoff)g%% %(method)s failed"
 
@@ -587,7 +597,7 @@
 
             checks = [
                 (failures, self._fail_cut_off, self._FAILED_REASON),
-                ]
+            ]
 
             for ctr, item in enumerate(self._thresholds):
                 threshold, fail_at = item

Modified: CalendarServer/trunk/contrib/performance/loadtest/profiles.py
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/profiles.py	2014-07-25 17:55:45 UTC (rev 13790)
+++ CalendarServer/trunk/contrib/performance/loadtest/profiles.py	2014-07-25 17:59:34 UTC (rev 13791)
@@ -64,6 +64,15 @@
         pass
 
 
+    def initialize(self):
+        """
+        Called before the profile runs for real. Can be used to initialize client state.
+
+        @return: a L{Deferred} that fires when initialization is done
+        """
+        return succeed(None)
+
+
     def _calendarsOfType(self, calendarType, componentType):
         return [
             cal
@@ -668,6 +677,132 @@
 
 
 
+class EventUpdater(ProfileBase):
+    """
+    A Calendar user who creates a new event, and then updates its alarm.
+    """
+    _eventTemplate = Component.fromString("""\
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//Apple Inc.//iCal 4.0.3//EN
+CALSCALE:GREGORIAN
+BEGIN:VEVENT
+CREATED:20101018T155431Z
+UID:C98AD237-55AD-4F7D-9009-0D355D835822
+DTEND;TZID=America/New_York:20101021T130000
+TRANSP:OPAQUE
+SUMMARY:Simple event
+DTSTART;TZID=America/New_York:20101021T120000
+DTSTAMP:20101018T155438Z
+SEQUENCE:2
+BEGIN:VALARM
+X-WR-ALARMUID:D9D1AC84-F629-4B9D-9B6B-4A6CA9A11FEF
+UID:D9D1AC84-F629-4B9D-9B6B-4A6CA9A11FEF
+DESCRIPTION:Event reminder
+TRIGGER:-PT8M
+ACTION:DISPLAY
+END:VALARM
+END:VEVENT
+END:VCALENDAR
+""".replace("\n", "\r\n"))
+
+    def setParameters(
+        self,
+        enabled=True,
+        interval=25,
+        eventStartDistribution=NearFutureDistribution(),
+        eventDurationDistribution=UniformDiscreteDistribution([
+            15 * 60, 30 * 60,
+            45 * 60, 60 * 60,
+            120 * 60
+        ]),
+        recurrenceDistribution=RecurrenceDistribution(False),
+    ):
+        self.enabled = enabled
+        self._interval = interval
+        self._eventStartDistribution = eventStartDistribution
+        self._eventDurationDistribution = eventDurationDistribution
+        self._recurrenceDistribution = recurrenceDistribution
+
+
+    def initialize(self):
+        """
+        Called before the profile runs for real. Can be used to initialize client state.
+
+        @return: a L{Deferred} that fires when initialization is done
+        """
+        return self._initEvent()
+
+
+    def run(self):
+        self._call = LoopingCall(self._updateEvent)
+        self._call.clock = self._reactor
+        return self._call.start(self._interval)
+
+
+    def _initEvent(self):
+        if not self._client.started:
+            return succeed(None)
+
+        # If it already exists, don't re-create
+        calendar = self._calendarsOfType(caldavxml.calendar, "VEVENT")[0]
+        if calendar.events:
+            events = [event for event in calendar.events.values() if event.url.endswith("event_to_update.ics")]
+            if events:
+                return succeed(None)
+
+        # Copy the template event and fill in some of its fields
+        # to make a new event to create on the calendar.
+        vcalendar = self._eventTemplate.duplicate()
+        vevent = vcalendar.mainComponent()
+        uid = str(uuid4())
+        dtstart = self._eventStartDistribution.sample()
+        dtend = dtstart + Duration(seconds=self._eventDurationDistribution.sample())
+        vevent.replaceProperty(Property("CREATED", DateTime.getNowUTC()))
+        vevent.replaceProperty(Property("DTSTAMP", DateTime.getNowUTC()))
+        vevent.replaceProperty(Property("DTSTART", dtstart))
+        vevent.replaceProperty(Property("DTEND", dtend))
+        vevent.replaceProperty(Property("UID", uid))
+
+        rrule = self._recurrenceDistribution.sample()
+        if rrule is not None:
+            vevent.addProperty(Property(None, None, None, pycalendar=rrule))
+
+        href = '%s%s' % (calendar.url, "event_to_update.ics")
+        d = self._client.addEvent(href, vcalendar)
+        return self._newOperation("create", d)
+
+
+    def _updateEvent(self):
+        """
+        Try to add a new attendee to an event, or perhaps remove an
+        existing attendee from an event.
+
+        @return: C{None} if there are no events to play with,
+            otherwise a L{Deferred} which fires when the attendee
+            change has been made.
+        """
+
+        if not self._client.started:
+            return succeed(None)
+
+        # If it does not exist, try to create it
+        calendar = self._calendarsOfType(caldavxml.calendar, "VEVENT")[0]
+        if not calendar.events:
+            return self._initEvent()
+        events = [event for event in calendar.events.values() if event.url.endswith("event_to_update.ics")]
+        if not events:
+            return self._initEvent()
+        event = events[0]
+
+        # Add/update the ACKNOWLEDGED property
+        component = event.component.mainComponent()
+        component.replaceProperty(Property("ACKNOWLEDGED", DateTime.getNowUTC()))
+        d = self._client.changeEvent(event.url)
+        return self._newOperation("update", d)
+
+
+
 class Tasker(ProfileBase):
     """
     A Calendar user who creates new tasks.

Modified: CalendarServer/trunk/contrib/performance/loadtest/sim.py
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/sim.py	2014-07-25 17:55:45 UTC (rev 13790)
+++ CalendarServer/trunk/contrib/performance/loadtest/sim.py	2014-07-25 17:59:34 UTC (rev 13791)
@@ -331,10 +331,12 @@
                         ClientType(
                             namedAny(clientConfig["software"]),
                             cls._convertParams(clientConfig["params"]),
-                            [ProfileType(
-                                namedAny(profile["class"]),
-                                cls._convertParams(profile["params"]))
-                             for profile in clientConfig["profiles"]]))
+                            [
+                                ProfileType(
+                                    namedAny(profile["class"]),
+                                    cls._convertParams(profile["params"])
+                                ) for profile in clientConfig["profiles"]
+                            ]))
             if not parameters.clients:
                 parameters.addClient(1,
                                      ClientType(OS_X_10_6, {},

Added: CalendarServer/trunk/contrib/performance/loadtest/standard-configs/event-updates-only.plist
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/standard-configs/event-updates-only.plist	                        (rev 0)
+++ CalendarServer/trunk/contrib/performance/loadtest/standard-configs/event-updates-only.plist	2014-07-25 17:59:34 UTC (rev 13791)
@@ -0,0 +1,543 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+    Copyright (c) 2011-2012 Apple Inc. All rights reserved.
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+  -->
+
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+	<dict>
+		<!-- Define the kinds of software and user behavior the load simulation
+			will simulate. -->
+		<key>clients</key>
+
+		<!-- Have as many different kinds of software and user behavior configurations
+			as you want. Each is a dict -->
+		<array>
+
+			<dict>
+
+				<!-- Here is a Lion iCal simulator. -->
+				<key>software</key>
+				<string>contrib.performance.loadtest.ical.OS_X_10_7</string>
+
+				<!-- Arguments to use to initialize the client instance. -->
+				<key>params</key>
+				<dict>
+					<!-- Name that appears in logs. -->
+					<key>title</key>
+					<string>10.7</string>
+
+					<!-- Client can poll the calendar home at some interval. This is 
+						in seconds. -->
+					<key>calendarHomePollInterval</key>
+					<integer>300000</integer>
+
+					<!-- If the server advertises xmpp push, OS X 10.6 can wait for notifications 
+						about calendar home changes instead of polling for them periodically. If 
+						this option is true, then look for the server advertisement for xmpp push 
+						and use it if possible. Still fall back to polling if there is no xmpp push 
+						advertised. -->
+					<key>supportPush</key>
+					<false />
+					<key>supportAmpPush</key>
+					<false />
+				</dict>
+
+				<!-- The profiles define certain types of user behavior on top of the 
+					client software being simulated. -->
+				<key>profiles</key>
+				<array>
+
+					<!-- First an event-creating profile, which will periodically create 
+						new events at a random time on a random calendar. -->
+					<dict>
+						<key>class</key>
+						<string>contrib.performance.loadtest.profiles.Eventer</string>
+
+						<key>params</key>
+						<dict>
+							<key>enabled</key>
+							<false/>
+
+							<!-- Define the interval (in seconds) at which this profile will use 
+								its client to create a new event. -->
+							<key>interval</key>
+							<integer>20</integer>
+
+							<!-- Define how start times (DTSTART) for the randomly generated events 
+								will be selected. This is an example of a "Distribution" parameter. The value 
+								for most "Distribution" parameters are interchangeable and extensible. -->
+							<key>eventStartDistribution</key>
+							<dict>
+
+								<!-- This distribution is pretty specialized. It produces timestamps 
+									in the near future, limited to certain days of the week and certain hours 
+									of the day. -->
+								<key>type</key>
+								<string>contrib.performance.stats.WorkDistribution</string>
+
+								<key>params</key>
+								<dict>
+									<!-- These are the days of the week the distribution will use. -->
+									<key>daysOfWeek</key>
+									<array>
+										<string>mon</string>
+										<string>tue</string>
+										<string>wed</string>
+										<string>thu</string>
+										<string>fri</string>
+									</array>
+
+									<!-- The earliest hour of a day at which an event might be scheduled. -->
+									<key>beginHour</key>
+									<integer>8</integer>
+
+									<!-- And the latest hour of a day (at which an event will be scheduled 
+										to begin!). -->
+									<key>endHour</key>
+									<integer>16</integer>
+
+									<!-- The timezone in which the event is scheduled. (XXX Does this 
+										really work right?) -->
+									<key>tzname</key>
+									<string>America/Los_Angeles</string>
+								</dict>
+							</dict>
+
+							<!-- Define how recurrences are created. -->
+							<key>recurrenceDistribution</key>
+							<dict>
+
+								<!-- This distribution is pretty specialized.  We have a fixed set of
+								     RRULEs defined for this distribution and pick each based on a
+								     weight. -->
+								<key>type</key>
+								<string>contrib.performance.stats.RecurrenceDistribution</string>
+
+								<key>params</key>
+								<dict>
+									<!-- False to disable RRULEs -->
+									<key>allowRecurrence</key>
+									<false/>
+
+									<!-- These are the weights for the specific set of RRULEs. -->
+									<key>weights</key>
+									<dict>
+										<!-- Half of all events will be non-recurring -->
+										<key>none</key>
+										<integer>50</integer>
+										
+										<!-- Daily and weekly are pretty common -->
+										<key>daily</key>
+										<integer>10</integer>
+										<key>weekly</key>
+										<integer>20</integer>
+										
+										<!-- Monthly, yearly, daily & weekly limit not so common -->
+										<key>monthly</key>
+										<integer>2</integer>
+										<key>yearly</key>
+										<integer>1</integer>
+										<key>dailylimit</key>
+										<integer>2</integer>
+										<key>weeklylimit</key>
+										<integer>5</integer>
+										
+										<!-- Work days pretty common -->
+										<key>workdays</key>
+										<integer>10</integer>
+									</dict>
+								</dict>
+							</dict>
+						</dict>
+					</dict>
+
+					<!-- This profile will create a new event, and then periodically update the ACKNOWLEDGED property. -->
+					<dict>
+						<key>class</key>
+						<string>contrib.performance.loadtest.profiles.EventUpdater</string>
+
+						<key>params</key>
+						<dict>
+							<key>enabled</key>
+							<true/>
+
+							<!-- Define the interval (in seconds) at which this profile will use
+								its client to create a new event. -->
+							<key>interval</key>
+							<integer>5</integer>
+
+							<!-- Define how start times (DTSTART) for the randomly generated events
+								will be selected. This is an example of a "Distribution" parameter. The value
+								for most "Distribution" parameters are interchangeable and extensible. -->
+							<key>eventStartDistribution</key>
+							<dict>
+
+								<!-- This distribution is pretty specialized. It produces timestamps
+									in the near future, limited to certain days of the week and certain hours
+									of the day. -->
+								<key>type</key>
+								<string>contrib.performance.stats.WorkDistribution</string>
+
+								<key>params</key>
+								<dict>
+									<!-- These are the days of the week the distribution will use. -->
+									<key>daysOfWeek</key>
+									<array>
+										<string>mon</string>
+										<string>tue</string>
+										<string>wed</string>
+										<string>thu</string>
+										<string>fri</string>
+									</array>
+
+									<!-- The earliest hour of a day at which an event might be scheduled. -->
+									<key>beginHour</key>
+									<integer>8</integer>
+
+									<!-- And the latest hour of a day (at which an event will be scheduled
+										to begin!). -->
+									<key>endHour</key>
+									<integer>16</integer>
+
+									<!-- The timezone in which the event is scheduled. (XXX Does this
+										really work right?) -->
+									<key>tzname</key>
+									<string>America/Los_Angeles</string>
+								</dict>
+							</dict>
+
+							<!-- Define how recurrences are created. -->
+							<key>recurrenceDistribution</key>
+							<dict>
+
+								<!-- This distribution is pretty specialized.  We have a fixed set of
+								     RRULEs defined for this distribution and pick each based on a
+								     weight. -->
+								<key>type</key>
+								<string>contrib.performance.stats.RecurrenceDistribution</string>
+
+								<key>params</key>
+								<dict>
+									<!-- False to disable RRULEs -->
+									<key>allowRecurrence</key>
+									<true/>
+
+									<!-- These are the weights for the specific set of RRULEs. -->
+									<key>weights</key>
+									<dict>
+										<!-- Half of all events will be non-recurring -->
+										<key>none</key>
+										<integer>50</integer>
+										
+										<!-- Daily and weekly are pretty common -->
+										<key>daily</key>
+										<integer>25</integer>
+										<key>weekly</key>
+										<integer>25</integer>
+										
+										<!-- Monthly, yearly, daily & weekly limit not so common -->
+										<key>monthly</key>
+										<integer>0</integer>
+										<key>yearly</key>
+										<integer>0</integer>
+										<key>dailylimit</key>
+										<integer>0</integer>
+										<key>weeklylimit</key>
+										<integer>0</integer>
+										
+										<!-- Work days pretty common -->
+										<key>workdays</key>
+										<integer>0</integer>
+									</dict>
+								</dict>
+							</dict>
+						</dict>
+					</dict>
+
+					<!-- This profile invites some number of new attendees to new events. -->
+					<dict>
+						<key>class</key>
+						<string>contrib.performance.loadtest.profiles.RealisticInviter</string>
+
+						<key>params</key>
+						<dict>
+							<key>enabled</key>
+							<false/>
+
+							<!-- Define the frequency at which new invitations will be sent out. -->
+							<key>sendInvitationDistribution</key>
+							<dict>
+								<key>type</key>
+								<string>contrib.performance.stats.NormalDistribution</string>
+								<key>params</key>
+								<dict>
+									<!-- mu gives the mean of the normal distribution (in seconds). -->
+									<key>mu</key>
+									<integer>10</integer>
+
+									<!-- and sigma gives its standard deviation. -->
+									<key>sigma</key>
+									<integer>5</integer>
+								</dict>
+							</dict>
+
+							<!-- Define the distribution of who will be invited to an event.
+							
+								When inviteeClumping is turned on each invitee is based on a sample of
+								users "close to" the organizer based on account index. If the clumping
+								is too "tight" for the requested number of attendees, then invites for
+								those larger numbers will simply fail (the sim will report that situation).
+								
+								When inviteeClumping is off invitees will be sampled across an entire
+								range of account indexes. In this case the distribution ought to be a
+								UniformIntegerDistribution with min=0 and max set to the number of accounts.
+							-->
+							<key>inviteeDistribution</key>
+							<dict>
+								<key>type</key>
+								<string>contrib.performance.stats.UniformIntegerDistribution</string>
+								<key>params</key>
+								<dict>
+									<!-- The minimum value (inclusive) of the uniform distribution. -->
+									<key>min</key>
+									<integer>0</integer>
+									<!-- The maximum value (exclusive) of the uniform distribution. -->
+									<key>max</key>
+									<integer>99</integer>
+								</dict>
+							</dict>
+
+							<key>inviteeClumping</key>
+							<true/>
+
+							<!-- Define the distribution of how many attendees will be invited to an event.
+							
+								LogNormal is the best fit to observed data.
+
+
+								For LogNormal "mode" is the peak, "mean" is the mean value.	For invites,
+								mode should typically be 1, and mean whatever matches the user behavior.
+								Our typical mean is 6. 							
+							     -->
+							<key>inviteeCountDistribution</key>
+							<dict>
+								<key>type</key>
+								<string>contrib.performance.stats.LogNormalDistribution</string>
+								<key>params</key>
+								<dict>
+									<!-- mode - peak-->
+									<key>mode</key>
+									<integer>1</integer>
+									<!-- mean - average-->
+									<key>median</key>
+									<integer>6</integer>
+									<!-- maximum -->
+									<key>maximum</key>
+									<real>100</real>
+								</dict>
+							</dict>
+
+							<!-- Define how start times (DTSTART) for the randomly generated events 
+								will be selected. This is an example of a "Distribution" parameter. The value 
+								for most "Distribution" parameters are interchangeable and extensible. -->
+							<key>eventStartDistribution</key>
+							<dict>
+
+								<!-- This distribution is pretty specialized. It produces timestamps 
+									in the near future, limited to certain days of the week and certain hours 
+									of the day. -->
+								<key>type</key>
+								<string>contrib.performance.stats.WorkDistribution</string>
+
+								<key>params</key>
+								<dict>
+									<!-- These are the days of the week the distribution will use. -->
+									<key>daysOfWeek</key>
+									<array>
+										<string>mon</string>
+										<string>tue</string>
+										<string>wed</string>
+										<string>thu</string>
+										<string>fri</string>
+									</array>
+
+									<!-- The earliest hour of a day at which an event might be scheduled. -->
+									<key>beginHour</key>
+									<integer>8</integer>
+
+									<!-- And the latest hour of a day (at which an event will be scheduled 
+										to begin!). -->
+									<key>endHour</key>
+									<integer>16</integer>
+
+									<!-- The timezone in which the event is scheduled. (XXX Does this 
+										really work right?) -->
+									<key>tzname</key>
+									<string>America/Los_Angeles</string>
+								</dict>
+							</dict>
+
+							<!-- Define how recurrences are created. -->
+							<key>recurrenceDistribution</key>
+							<dict>
+
+								<!-- This distribution is pretty specialized.  We have a fixed set of
+								     RRULEs defined for this distribution and pick each based on a
+								     weight. -->
+								<key>type</key>
+								<string>contrib.performance.stats.RecurrenceDistribution</string>
+
+								<key>params</key>
+								<dict>
+									<!-- False to disable RRULEs -->
+									<key>allowRecurrence</key>
+									<true/>
+
+									<!-- These are the weights for the specific set of RRULEs. -->
+									<key>weights</key>
+									<dict>
+										<!-- Half of all events will be non-recurring -->
+										<key>none</key>
+										<integer>50</integer>
+										
+										<!-- Daily and weekly are pretty common -->
+										<key>daily</key>
+										<integer>10</integer>
+										<key>weekly</key>
+										<integer>20</integer>
+										
+										<!-- Monthly, yearly, daily & weekly limit not so common -->
+										<key>monthly</key>
+										<integer>2</integer>
+										<key>yearly</key>
+										<integer>1</integer>
+										<key>dailylimit</key>
+										<integer>2</integer>
+										<key>weeklylimit</key>
+										<integer>5</integer>
+										
+										<!-- Work days pretty common -->
+										<key>workdays</key>
+										<integer>10</integer>
+									</dict>
+								</dict>
+							</dict>
+						</dict>
+					</dict>
+
+					<!-- This profile accepts invitations to events, handles cancels, and
+					     handles replies received. -->
+					<dict>
+						<key>class</key>
+						<string>contrib.performance.loadtest.profiles.Accepter</string>
+
+						<key>params</key>
+						<dict>
+							<key>enabled</key>
+							<false/>
+
+							<!-- Define how long to wait after seeing a new invitation before
+								accepting it.
+
+								For LogNormal "mode" is the peak, "median" is the 50% cummulative value
+								(i.e., half of the user have accepted by that time).								
+							-->
+							<key>acceptDelayDistribution</key>
+							<dict>
+								<key>type</key>
+								<string>contrib.performance.stats.LogNormalDistribution</string>
+								<key>params</key>
+								<dict>
+									<!-- mode - peak-->
+									<key>mode</key>
+									<integer>300</integer>
+									<!-- median - 50% done-->
+									<key>median</key>
+									<integer>1800</integer>
+								</dict>
+							</dict>
+						</dict>
+					</dict>
+
+					<!-- A task-creating profile, which will periodically create 
+						new tasks at a random time on a random calendar. -->
+					<dict>
+						<key>class</key>
+						<string>contrib.performance.loadtest.profiles.Tasker</string>
+
+						<key>params</key>
+						<dict>
+							<key>enabled</key>
+							<false/>
+
+							<!-- Define the interval (in seconds) at which this profile will use 
+								its client to create a new task. -->
+							<key>interval</key>
+							<integer>300</integer>
+
+							<!-- Define how due times (DUE) for the randomly generated tasks 
+								will be selected. This is an example of a "Distribution" parameter. The value 
+								for most "Distribution" parameters are interchangeable and extensible. -->
+							<key>taskDueDistribution</key>
+							<dict>
+
+								<!-- This distribution is pretty specialized. It produces timestamps 
+									in the near future, limited to certain days of the week and certain hours 
+									of the day. -->
+								<key>type</key>
+								<string>contrib.performance.stats.WorkDistribution</string>
+
+								<key>params</key>
+								<dict>
+									<!-- These are the days of the week the distribution will use. -->
+									<key>daysOfWeek</key>
+									<array>
+										<string>mon</string>
+										<string>tue</string>
+										<string>wed</string>
+										<string>thu</string>
+										<string>fri</string>
+									</array>
+
+									<!-- The earliest hour of a day at which an event might be scheduled. -->
+									<key>beginHour</key>
+									<integer>8</integer>
+
+									<!-- And the latest hour of a day (at which an event will be scheduled 
+										to begin!). -->
+									<key>endHour</key>
+									<integer>16</integer>
+
+									<!-- The timezone in which the event is scheduled. (XXX Does this 
+										really work right?) -->
+									<key>tzname</key>
+									<string>America/Los_Angeles</string>
+								</dict>
+							</dict>
+						</dict>
+					</dict>
+
+				</array>
+
+				<!-- Determine the frequency at which this client configuration will 
+					appear in the clients which are created by the load tester. -->
+				<key>weight</key>
+				<integer>1</integer>
+			</dict>
+		</array>
+	</dict>
+</plist>

Modified: CalendarServer/trunk/contrib/performance/loadtest/standard-configs/events-only.plist
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/standard-configs/events-only.plist	2014-07-25 17:55:45 UTC (rev 13790)
+++ CalendarServer/trunk/contrib/performance/loadtest/standard-configs/events-only.plist	2014-07-25 17:59:34 UTC (rev 13791)
@@ -165,6 +165,109 @@
 						</dict>
 					</dict>
 
+					<!-- This profile will create a new event, and then periodically update the ACKNOWLEDGED property. -->
+					<dict>
+						<key>class</key>
+						<string>contrib.performance.loadtest.profiles.EventUpdater</string>
+
+						<key>params</key>
+						<dict>
+							<key>enabled</key>
+							<false/>
+
+							<!-- Define the interval (in seconds) at which this profile will use
+								its client to create a new event. -->
+							<key>interval</key>
+							<integer>5</integer>
+
+							<!-- Define how start times (DTSTART) for the randomly generated events
+								will be selected. This is an example of a "Distribution" parameter. The value
+								for most "Distribution" parameters are interchangeable and extensible. -->
+							<key>eventStartDistribution</key>
+							<dict>
+
+								<!-- This distribution is pretty specialized. It produces timestamps
+									in the near future, limited to certain days of the week and certain hours
+									of the day. -->
+								<key>type</key>
+								<string>contrib.performance.stats.WorkDistribution</string>
+
+								<key>params</key>
+								<dict>
+									<!-- These are the days of the week the distribution will use. -->
+									<key>daysOfWeek</key>
+									<array>
+										<string>mon</string>
+										<string>tue</string>
+										<string>wed</string>
+										<string>thu</string>
+										<string>fri</string>
+									</array>
+
+									<!-- The earliest hour of a day at which an event might be scheduled. -->
+									<key>beginHour</key>
+									<integer>8</integer>
+
+									<!-- And the latest hour of a day (at which an event will be scheduled
+										to begin!). -->
+									<key>endHour</key>
+									<integer>16</integer>
+
+									<!-- The timezone in which the event is scheduled. (XXX Does this
+										really work right?) -->
+									<key>tzname</key>
+									<string>America/Los_Angeles</string>
+								</dict>
+							</dict>
+
+							<!-- Define how recurrences are created. -->
+							<key>recurrenceDistribution</key>
+							<dict>
+
+								<!-- This distribution is pretty specialized.  We have a fixed set of
+								     RRULEs defined for this distribution and pick each based on a
+								     weight. -->
+								<key>type</key>
+								<string>contrib.performance.stats.RecurrenceDistribution</string>
+
+								<key>params</key>
+								<dict>
+									<!-- False to disable RRULEs -->
+									<key>allowRecurrence</key>
+									<true/>
+
+									<!-- These are the weights for the specific set of RRULEs. -->
+									<key>weights</key>
+									<dict>
+										<!-- Half of all events will be non-recurring -->
+										<key>none</key>
+										<integer>50</integer>
+										
+										<!-- Daily and weekly are pretty common -->
+										<key>daily</key>
+										<integer>25</integer>
+										<key>weekly</key>
+										<integer>25</integer>
+										
+										<!-- Monthly, yearly, daily & weekly limit not so common -->
+										<key>monthly</key>
+										<integer>0</integer>
+										<key>yearly</key>
+										<integer>0</integer>
+										<key>dailylimit</key>
+										<integer>0</integer>
+										<key>weeklylimit</key>
+										<integer>0</integer>
+										
+										<!-- Work days pretty common -->
+										<key>workdays</key>
+										<integer>0</integer>
+									</dict>
+								</dict>
+							</dict>
+						</dict>
+					</dict>
+
 					<!-- This profile invites some number of new attendees to new events. -->
 					<dict>
 						<key>class</key>

Modified: CalendarServer/trunk/contrib/performance/loadtest/standard-configs/invites-accepts.plist
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/standard-configs/invites-accepts.plist	2014-07-25 17:55:45 UTC (rev 13790)
+++ CalendarServer/trunk/contrib/performance/loadtest/standard-configs/invites-accepts.plist	2014-07-25 17:59:34 UTC (rev 13791)
@@ -165,6 +165,109 @@
 						</dict>
 					</dict>
 
+					<!-- This profile will create a new event, and then periodically update the ACKNOWLEDGED property. -->
+					<dict>
+						<key>class</key>
+						<string>contrib.performance.loadtest.profiles.EventUpdater</string>
+
+						<key>params</key>
+						<dict>
+							<key>enabled</key>
+							<false/>
+
+							<!-- Define the interval (in seconds) at which this profile will use
+								its client to create a new event. -->
+							<key>interval</key>
+							<integer>5</integer>
+
+							<!-- Define how start times (DTSTART) for the randomly generated events
+								will be selected. This is an example of a "Distribution" parameter. The value
+								for most "Distribution" parameters are interchangeable and extensible. -->
+							<key>eventStartDistribution</key>
+							<dict>
+
+								<!-- This distribution is pretty specialized. It produces timestamps
+									in the near future, limited to certain days of the week and certain hours
+									of the day. -->
+								<key>type</key>
+								<string>contrib.performance.stats.WorkDistribution</string>
+
+								<key>params</key>
+								<dict>
+									<!-- These are the days of the week the distribution will use. -->
+									<key>daysOfWeek</key>
+									<array>
+										<string>mon</string>
+										<string>tue</string>
+										<string>wed</string>
+										<string>thu</string>
+										<string>fri</string>
+									</array>
+
+									<!-- The earliest hour of a day at which an event might be scheduled. -->
+									<key>beginHour</key>
+									<integer>8</integer>
+
+									<!-- And the latest hour of a day (at which an event will be scheduled
+										to begin!). -->
+									<key>endHour</key>
+									<integer>16</integer>
+
+									<!-- The timezone in which the event is scheduled. (XXX Does this
+										really work right?) -->
+									<key>tzname</key>
+									<string>America/Los_Angeles</string>
+								</dict>
+							</dict>
+
+							<!-- Define how recurrences are created. -->
+							<key>recurrenceDistribution</key>
+							<dict>
+
+								<!-- This distribution is pretty specialized.  We have a fixed set of
+								     RRULEs defined for this distribution and pick each based on a
+								     weight. -->
+								<key>type</key>
+								<string>contrib.performance.stats.RecurrenceDistribution</string>
+
+								<key>params</key>
+								<dict>
+									<!-- False to disable RRULEs -->
+									<key>allowRecurrence</key>
+									<true/>
+
+									<!-- These are the weights for the specific set of RRULEs. -->
+									<key>weights</key>
+									<dict>
+										<!-- Half of all events will be non-recurring -->
+										<key>none</key>
+										<integer>50</integer>
+										
+										<!-- Daily and weekly are pretty common -->
+										<key>daily</key>
+										<integer>25</integer>
+										<key>weekly</key>
+										<integer>25</integer>
+										
+										<!-- Monthly, yearly, daily & weekly limit not so common -->
+										<key>monthly</key>
+										<integer>0</integer>
+										<key>yearly</key>
+										<integer>0</integer>
+										<key>dailylimit</key>
+										<integer>0</integer>
+										<key>weeklylimit</key>
+										<integer>0</integer>
+										
+										<!-- Work days pretty common -->
+										<key>workdays</key>
+										<integer>0</integer>
+									</dict>
+								</dict>
+							</dict>
+						</dict>
+					</dict>
+
 					<!-- This profile invites some number of new attendees to new events. -->
 					<dict>
 						<key>class</key>

Modified: CalendarServer/trunk/contrib/performance/loadtest/standard-configs/invites-only-recurring.plist
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/standard-configs/invites-only-recurring.plist	2014-07-25 17:55:45 UTC (rev 13790)
+++ CalendarServer/trunk/contrib/performance/loadtest/standard-configs/invites-only-recurring.plist	2014-07-25 17:59:34 UTC (rev 13791)
@@ -165,6 +165,109 @@
 						</dict>
 					</dict>
 
+					<!-- This profile will create a new event, and then periodically update the ACKNOWLEDGED property. -->
+					<dict>
+						<key>class</key>
+						<string>contrib.performance.loadtest.profiles.EventUpdater</string>
+
+						<key>params</key>
+						<dict>
+							<key>enabled</key>
+							<false/>
+
+							<!-- Define the interval (in seconds) at which this profile will use
+								its client to create a new event. -->
+							<key>interval</key>
+							<integer>5</integer>
+
+							<!-- Define how start times (DTSTART) for the randomly generated events
+								will be selected. This is an example of a "Distribution" parameter. The value
+								for most "Distribution" parameters are interchangeable and extensible. -->
+							<key>eventStartDistribution</key>
+							<dict>
+
+								<!-- This distribution is pretty specialized. It produces timestamps
+									in the near future, limited to certain days of the week and certain hours
+									of the day. -->
+								<key>type</key>
+								<string>contrib.performance.stats.WorkDistribution</string>
+
+								<key>params</key>
+								<dict>
+									<!-- These are the days of the week the distribution will use. -->
+									<key>daysOfWeek</key>
+									<array>
+										<string>mon</string>
+										<string>tue</string>
+										<string>wed</string>
+										<string>thu</string>
+										<string>fri</string>
+									</array>
+
+									<!-- The earliest hour of a day at which an event might be scheduled. -->
+									<key>beginHour</key>
+									<integer>8</integer>
+
+									<!-- And the latest hour of a day (at which an event will be scheduled
+										to begin!). -->
+									<key>endHour</key>
+									<integer>16</integer>
+
+									<!-- The timezone in which the event is scheduled. (XXX Does this
+										really work right?) -->
+									<key>tzname</key>
+									<string>America/Los_Angeles</string>
+								</dict>
+							</dict>
+
+							<!-- Define how recurrences are created. -->
+							<key>recurrenceDistribution</key>
+							<dict>
+
+								<!-- This distribution is pretty specialized.  We have a fixed set of
+								     RRULEs defined for this distribution and pick each based on a
+								     weight. -->
+								<key>type</key>
+								<string>contrib.performance.stats.RecurrenceDistribution</string>
+
+								<key>params</key>
+								<dict>
+									<!-- False to disable RRULEs -->
+									<key>allowRecurrence</key>
+									<true/>
+
+									<!-- These are the weights for the specific set of RRULEs. -->
+									<key>weights</key>
+									<dict>
+										<!-- Half of all events will be non-recurring -->
+										<key>none</key>
+										<integer>50</integer>
+										
+										<!-- Daily and weekly are pretty common -->
+										<key>daily</key>
+										<integer>25</integer>
+										<key>weekly</key>
+										<integer>25</integer>
+										
+										<!-- Monthly, yearly, daily & weekly limit not so common -->
+										<key>monthly</key>
+										<integer>0</integer>
+										<key>yearly</key>
+										<integer>0</integer>
+										<key>dailylimit</key>
+										<integer>0</integer>
+										<key>weeklylimit</key>
+										<integer>0</integer>
+										
+										<!-- Work days pretty common -->
+										<key>workdays</key>
+										<integer>0</integer>
+									</dict>
+								</dict>
+							</dict>
+						</dict>
+					</dict>
+
 					<!-- This profile invites some number of new attendees to new events. -->
 					<dict>
 						<key>class</key>

Modified: CalendarServer/trunk/contrib/performance/loadtest/standard-configs/invites-only.plist
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/standard-configs/invites-only.plist	2014-07-25 17:55:45 UTC (rev 13790)
+++ CalendarServer/trunk/contrib/performance/loadtest/standard-configs/invites-only.plist	2014-07-25 17:59:34 UTC (rev 13791)
@@ -165,6 +165,109 @@
 						</dict>
 					</dict>
 
+					<!-- This profile will create a new event, and then periodically update the ACKNOWLEDGED property. -->
+					<dict>
+						<key>class</key>
+						<string>contrib.performance.loadtest.profiles.EventUpdater</string>
+
+						<key>params</key>
+						<dict>
+							<key>enabled</key>
+							<false/>
+
+							<!-- Define the interval (in seconds) at which this profile will use
+								its client to create a new event. -->
+							<key>interval</key>
+							<integer>5</integer>
+
+							<!-- Define how start times (DTSTART) for the randomly generated events
+								will be selected. This is an example of a "Distribution" parameter. The value
+								for most "Distribution" parameters are interchangeable and extensible. -->
+							<key>eventStartDistribution</key>
+							<dict>
+
+								<!-- This distribution is pretty specialized. It produces timestamps
+									in the near future, limited to certain days of the week and certain hours
+									of the day. -->
+								<key>type</key>
+								<string>contrib.performance.stats.WorkDistribution</string>
+
+								<key>params</key>
+								<dict>
+									<!-- These are the days of the week the distribution will use. -->
+									<key>daysOfWeek</key>
+									<array>
+										<string>mon</string>
+										<string>tue</string>
+										<string>wed</string>
+										<string>thu</string>
+										<string>fri</string>
+									</array>
+
+									<!-- The earliest hour of a day at which an event might be scheduled. -->
+									<key>beginHour</key>
+									<integer>8</integer>
+
+									<!-- And the latest hour of a day (at which an event will be scheduled
+										to begin!). -->
+									<key>endHour</key>
+									<integer>16</integer>
+
+									<!-- The timezone in which the event is scheduled. (XXX Does this
+										really work right?) -->
+									<key>tzname</key>
+									<string>America/Los_Angeles</string>
+								</dict>
+							</dict>
+
+							<!-- Define how recurrences are created. -->
+							<key>recurrenceDistribution</key>
+							<dict>
+
+								<!-- This distribution is pretty specialized.  We have a fixed set of
+								     RRULEs defined for this distribution and pick each based on a
+								     weight. -->
+								<key>type</key>
+								<string>contrib.performance.stats.RecurrenceDistribution</string>
+
+								<key>params</key>
+								<dict>
+									<!-- False to disable RRULEs -->
+									<key>allowRecurrence</key>
+									<true/>
+
+									<!-- These are the weights for the specific set of RRULEs. -->
+									<key>weights</key>
+									<dict>
+										<!-- Half of all events will be non-recurring -->
+										<key>none</key>
+										<integer>50</integer>
+										
+										<!-- Daily and weekly are pretty common -->
+										<key>daily</key>
+										<integer>25</integer>
+										<key>weekly</key>
+										<integer>25</integer>
+										
+										<!-- Monthly, yearly, daily & weekly limit not so common -->
+										<key>monthly</key>
+										<integer>0</integer>
+										<key>yearly</key>
+										<integer>0</integer>
+										<key>dailylimit</key>
+										<integer>0</integer>
+										<key>weeklylimit</key>
+										<integer>0</integer>
+										
+										<!-- Work days pretty common -->
+										<key>workdays</key>
+										<integer>0</integer>
+									</dict>
+								</dict>
+							</dict>
+						</dict>
+					</dict>
+
 					<!-- This profile invites some number of new attendees to new events. -->
 					<dict>
 						<key>class</key>

Modified: CalendarServer/trunk/contrib/performance/loadtest/test_population.py
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/test_population.py	2014-07-25 17:55:45 UTC (rev 13790)
+++ CalendarServer/trunk/contrib/performance/loadtest/test_population.py	2014-07-25 17:59:34 UTC (rev 13791)
@@ -36,8 +36,9 @@
         users = ['user01', 'user02', 'user03']
         for user in users:
             logger.observe(dict(
-                    type='response', method='GET', success=True,
-                    duration=1.23, user=user, client_type="test", client_id="1234"))
+                type='response', method='GET', success=True,
+                duration=1.23, user=user, client_type="test", client_id="1234"
+            ))
         self.assertEqual(len(users), logger.countUsers())
 
 
@@ -50,8 +51,9 @@
         clients = ['c01', 'c02', 'c03']
         for client in clients:
             logger.observe(dict(
-                    type='response', method='GET', success=True,
-                    duration=1.23, user="user01", client_type="test", client_id=client))
+                type='response', method='GET', success=True,
+                duration=1.23, user="user01", client_type="test", client_id=client
+            ))
         self.assertEqual(len(clients), logger.countClients())
 
 
@@ -64,7 +66,8 @@
         clients = ['c01', 'c02', 'c03']
         for client in clients:
             logger.observe(dict(
-                    type='client-failure', reason="testing %s" % (client,)))
+                type='client-failure', reason="testing %s" % (client,)
+            ))
         self.assertEqual(len(clients), logger.countClientFailures())
 
 
@@ -77,7 +80,8 @@
         clients = ['c01', 'c02', 'c03']
         for client in clients:
             logger.observe(dict(
-                    type='sim-failure', reason="testing %s" % (client,)))
+                type='sim-failure', reason="testing %s" % (client,)
+            ))
         self.assertEqual(len(clients), logger.countSimFailures())
 
 
@@ -89,8 +93,9 @@
         """
         logger = ReportStatistics()
         logger.observe(dict(
-                type='response', method='GET', success=True,
-                duration=2.5, user='user01', client_type="test", client_id="1234"))
+            type='response', method='GET', success=True,
+            duration=2.5, user='user01', client_type="test", client_id="1234"
+        ))
         self.assertEqual([], logger.failures())
 
 
@@ -102,11 +107,13 @@
         logger = ReportStatistics()
         for _ignore in range(98):
             logger.observe(dict(
-                    type='response', method='GET', success=True,
-                    duration=2.5, user='user01', client_type="test", client_id="1234"))
+                type='response', method='GET', success=True,
+                duration=2.5, user='user01', client_type="test", client_id="1234"
+            ))
         logger.observe(dict(
-                type='response', method='GET', success=False,
-                duration=2.5, user='user01', client_type="test", client_id="1234"))
+            type='response', method='GET', success=False,
+            duration=2.5, user='user01', client_type="test", client_id="1234"
+        ))
         self.assertEqual(
             ["Greater than 1% GET failed"],
             logger.failures())
@@ -121,12 +128,14 @@
         logger = ReportStatistics()
         for _ignore in range(94):
             logger.observe(dict(
-                    type='response', method='GET', success=True,
-                    duration=2.5, user='user01', client_type="test", client_id="1234"))
+                type='response', method='GET', success=True,
+                duration=2.5, user='user01', client_type="test", client_id="1234"
+            ))
         for _ignore in range(5):
             logger.observe(dict(
-                    type='response', method='GET', success=True,
-                    duration=3.5, user='user02', client_type="test", client_id="1234"))
+                type='response', method='GET', success=True,
+                duration=3.5, user='user02', client_type="test", client_id="1234"
+            ))
         self.assertEqual(
             ["Greater than 5% GET exceeded 3 second response time"],
             logger.failures())
@@ -141,11 +150,13 @@
         logger = ReportStatistics()
         for _ignore in range(98):
             logger.observe(dict(
-                    type='response', method='GET', success=True,
-                    duration=2.5, user='user01', client_type="test", client_id="1234"))
+                type='response', method='GET', success=True,
+                duration=2.5, user='user01', client_type="test", client_id="1234"
+            ))
         logger.observe(dict(
-                type='response', method='GET', success=True,
-                duration=5.5, user='user01', client_type="test", client_id="1234"))
+            type='response', method='GET', success=True,
+            duration=5.5, user='user01', client_type="test", client_id="1234"
+        ))
         self.assertEqual(
             ["Greater than 1% GET exceeded 5 second response time"],
             logger.failures())
@@ -158,18 +169,22 @@
         logger = ReportStatistics()
         for _ignore in range(99):
             logger.observe(dict(
-                    type='response', method='GET', success=True,
-                    duration=2.5, user='user01', client_type="test", client_id="1234"))
+                type='response', method='GET', success=True,
+                duration=2.5, user='user01', client_type="test", client_id="1234"
+            ))
             logger.observe(dict(
-                    type='response', method='POST', success=True,
-                    duration=2.5, user='user01', client_type="test", client_id="1234"))
+                type='response', method='POST', success=True,
+                duration=2.5, user='user01', client_type="test", client_id="1234"
+            ))
 
         logger.observe(dict(
-                type='response', method='GET', success=False,
-                duration=2.5, user='user01', client_type="test", client_id="1234"))
+            type='response', method='GET', success=False,
+            duration=2.5, user='user01', client_type="test", client_id="1234"
+        ))
         logger.observe(dict(
-                type='response', method='POST', success=False,
-                duration=2.5, user='user01', client_type="test", client_id="1234"))
+            type='response', method='POST', success=False,
+            duration=2.5, user='user01', client_type="test", client_id="1234"
+        ))
 
         self.assertEqual([], logger.failures())
 
@@ -196,33 +211,41 @@
         # -small below threshold
         logger = ReportStatistics(thresholds=_thresholds)
         logger.observe(dict(
-                type='response', method='PUT{organizer-small}', success=True,
-                duration=0.2, user='user01', client_type="test", client_id="1234"))
+            type='response', method='PUT{organizer-small}', success=True,
+            duration=0.2, user='user01', client_type="test", client_id="1234"
+        ))
         logger.observe(dict(
-                type='response', method='PUT{organizer-small}', success=True,
-                duration=0.2, user='user01', client_type="test", client_id="1234"))
+            type='response', method='PUT{organizer-small}', success=True,
+            duration=0.2, user='user01', client_type="test", client_id="1234"
+        ))
         logger.observe(dict(
-                type='response', method='PUT{organizer-small}', success=True,
-                duration=0.2, user='user01', client_type="test", client_id="1234"))
+            type='response', method='PUT{organizer-small}', success=True,
+            duration=0.2, user='user01', client_type="test", client_id="1234"
+        ))
         logger.observe(dict(
-                type='response', method='PUT{organizer-small}', success=True,
-                duration=0.2, user='user01', client_type="test", client_id="1234"))
+            type='response', method='PUT{organizer-small}', success=True,
+            duration=0.2, user='user01', client_type="test", client_id="1234"
+        ))
         self.assertEqual([], logger.failures())
 
         # -small above 0.5 threshold
         logger = ReportStatistics(thresholds=_thresholds)
         logger.observe(dict(
-                type='response', method='PUT{organizer-small}', success=True,
-                duration=0.2, user='user01', client_type="test", client_id="1234"))
+            type='response', method='PUT{organizer-small}', success=True,
+            duration=0.2, user='user01', client_type="test", client_id="1234"
+        ))
         logger.observe(dict(
-                type='response', method='PUT{organizer-small}', success=True,
-                duration=0.6, user='user01', client_type="test", client_id="1234"))
+            type='response', method='PUT{organizer-small}', success=True,
+            duration=0.6, user='user01', client_type="test", client_id="1234"
+        ))
         logger.observe(dict(
-                type='response', method='PUT{organizer-small}', success=True,
-                duration=0.6, user='user01', client_type="test", client_id="1234"))
+            type='response', method='PUT{organizer-small}', success=True,
+            duration=0.6, user='user01', client_type="test", client_id="1234"
+        ))
         logger.observe(dict(
-                type='response', method='PUT{organizer-small}', success=True,
-                duration=0.6, user='user01', client_type="test", client_id="1234"))
+            type='response', method='PUT{organizer-small}', success=True,
+            duration=0.6, user='user01', client_type="test", client_id="1234"
+        ))
         self.assertEqual(
             ["Greater than 50% PUT{organizer-small} exceeded 0.5 second response time"],
             logger.failures()
@@ -231,17 +254,21 @@
         # -medium below 0.5 threshold
         logger = ReportStatistics(thresholds=_thresholds)
         logger.observe(dict(
-                type='response', method='PUT{organizer-medium}', success=True,
-                duration=0.2, user='user01', client_type="test", client_id="1234"))
+            type='response', method='PUT{organizer-medium}', success=True,
+            duration=0.2, user='user01', client_type="test", client_id="1234"
+        ))
         logger.observe(dict(
-                type='response', method='PUT{organizer-medium}', success=True,
-                duration=0.6, user='user01', client_type="test", client_id="1234"))
+            type='response', method='PUT{organizer-medium}', success=True,
+            duration=0.6, user='user01', client_type="test", client_id="1234"
+        ))
         logger.observe(dict(
-                type='response', method='PUT{organizer-medium}', success=True,
-                duration=0.6, user='user01', client_type="test", client_id="1234"))
+            type='response', method='PUT{organizer-medium}', success=True,
+            duration=0.6, user='user01', client_type="test", client_id="1234"
+        ))
         logger.observe(dict(
-                type='response', method='PUT{organizer-medium}', success=True,
-                duration=0.6, user='user01', client_type="test", client_id="1234"))
+            type='response', method='PUT{organizer-medium}', success=True,
+            duration=0.6, user='user01', client_type="test", client_id="1234"
+        ))
         self.assertEqual(
             [],
             logger.failures()
@@ -250,17 +277,21 @@
         # -medium above 1.0 threshold
         logger = ReportStatistics(thresholds=_thresholds)
         logger.observe(dict(
-                type='response', method='PUT{organizer-medium}', success=True,
-                duration=0.2, user='user01', client_type="test", client_id="1234"))
+            type='response', method='PUT{organizer-medium}', success=True,
+            duration=0.2, user='user01', client_type="test", client_id="1234"
+        ))
         logger.observe(dict(
-                type='response', method='PUT{organizer-medium}', success=True,
-                duration=1.6, user='user01', client_type="test", client_id="1234"))
+            type='response', method='PUT{organizer-medium}', success=True,
+            duration=1.6, user='user01', client_type="test", client_id="1234"
+        ))
         logger.observe(dict(
-                type='response', method='PUT{organizer-medium}', success=True,
-                duration=1.6, user='user01', client_type="test", client_id="1234"))
+            type='response', method='PUT{organizer-medium}', success=True,
+            duration=1.6, user='user01', client_type="test", client_id="1234"
+        ))
         logger.observe(dict(
-                type='response', method='PUT{organizer-medium}', success=True,
-                duration=1.6, user='user01', client_type="test", client_id="1234"))
+            type='response', method='PUT{organizer-medium}', success=True,
+            duration=1.6, user='user01', client_type="test", client_id="1234"
+        ))
         self.assertEqual(
             ["Greater than 50% PUT{organizer-medium} exceeded 1 second response time"],
             logger.failures()
@@ -269,17 +300,21 @@
         # -large below 1.0 threshold
         logger = ReportStatistics(thresholds=_thresholds)
         logger.observe(dict(
-                type='response', method='PUT{organizer-large}', success=True,
-                duration=0.2, user='user01', client_type="test", client_id="1234"))
+            type='response', method='PUT{organizer-large}', success=True,
+            duration=0.2, user='user01', client_type="test", client_id="1234"
+        ))
         logger.observe(dict(
-                type='response', method='PUT{organizer-large}', success=True,
-                duration=1.6, user='user01', client_type="test", client_id="1234"))
+            type='response', method='PUT{organizer-large}', success=True,
+            duration=1.6, user='user01', client_type="test", client_id="1234"
+        ))
         logger.observe(dict(
-                type='response', method='PUT{organizer-large}', success=True,
-                duration=1.6, user='user01', client_type="test", client_id="1234"))
+            type='response', method='PUT{organizer-large}', success=True,
+            duration=1.6, user='user01', client_type="test", client_id="1234"
+        ))
         logger.observe(dict(
-                type='response', method='PUT{organizer-large}', success=True,
-                duration=1.6, user='user01', client_type="test", client_id="1234"))
+            type='response', method='PUT{organizer-large}', success=True,
+            duration=1.6, user='user01', client_type="test", client_id="1234"
+        ))
         self.assertEqual(
             [],
             logger.failures()
@@ -288,17 +323,21 @@
         # -large above 3.0 threshold
         logger = ReportStatistics(thresholds=_thresholds)
         logger.observe(dict(
-                type='response', method='PUT{organizer-large}', success=True,
-                duration=0.2, user='user01', client_type="test", client_id="1234"))
+            type='response', method='PUT{organizer-large}', success=True,
+            duration=0.2, user='user01', client_type="test", client_id="1234"
+        ))
         logger.observe(dict(
-                type='response', method='PUT{organizer-large}', success=True,
-                duration=3.6, user='user01', client_type="test", client_id="1234"))
+            type='response', method='PUT{organizer-large}', success=True,
+            duration=3.6, user='user01', client_type="test", client_id="1234"
+        ))
         logger.observe(dict(
-                type='response', method='PUT{organizer-large}', success=True,
-                duration=3.6, user='user01', client_type="test", client_id="1234"))
+            type='response', method='PUT{organizer-large}', success=True,
+            duration=3.6, user='user01', client_type="test", client_id="1234"
+        ))
         logger.observe(dict(
-                type='response', method='PUT{organizer-large}', success=True,
-                duration=3.6, user='user01', client_type="test", client_id="1234"))
+            type='response', method='PUT{organizer-large}', success=True,
+            duration=3.6, user='user01', client_type="test", client_id="1234"
+        ))
         self.assertEqual(
             ["Greater than 50% PUT{organizer-large} exceeded 3 second response time"],
             logger.failures()
@@ -307,17 +346,21 @@
         # -huge below 10.0 threshold
         logger = ReportStatistics(thresholds=_thresholds)
         logger.observe(dict(
-                type='response', method='PUT{organizer-huge}', success=True,
-                duration=12.0, user='user01', client_type="test", client_id="1234"))
+            type='response', method='PUT{organizer-huge}', success=True,
+            duration=12.0, user='user01', client_type="test", client_id="1234"
+        ))
         logger.observe(dict(
-                type='response', method='PUT{organizer-huge}', success=True,
-                duration=8, user='user01', client_type="test", client_id="1234"))
+            type='response', method='PUT{organizer-huge}', success=True,
+            duration=8, user='user01', client_type="test", client_id="1234"
+        ))
         logger.observe(dict(
-                type='response', method='PUT{organizer-huge}', success=True,
-                duration=11.0, user='user01', client_type="test", client_id="1234"))
+            type='response', method='PUT{organizer-huge}', success=True,
+            duration=11.0, user='user01', client_type="test", client_id="1234"
+        ))
         logger.observe(dict(
-                type='response', method='PUT{organizer-huge}', success=True,
-                duration=9.0, user='user01', client_type="test", client_id="1234"))
+            type='response', method='PUT{organizer-huge}', success=True,
+            duration=9.0, user='user01', client_type="test", client_id="1234"
+        ))
         self.assertEqual(
             [],
             logger.failures()
@@ -326,17 +369,21 @@
         # -huge above 10.0 threshold
         logger = ReportStatistics(thresholds=_thresholds)
         logger.observe(dict(
-                type='response', method='PUT{organizer-huge}', success=True,
-                duration=12.0, user='user01', client_type="test", client_id="1234"))
+            type='response', method='PUT{organizer-huge}', success=True,
+            duration=12.0, user='user01', client_type="test", client_id="1234"
+        ))
         logger.observe(dict(
-                type='response', method='PUT{organizer-huge}', success=True,
-                duration=9.0, user='user01', client_type="test", client_id="1234"))
+            type='response', method='PUT{organizer-huge}', success=True,
+            duration=9.0, user='user01', client_type="test", client_id="1234"
+        ))
         logger.observe(dict(
-                type='response', method='PUT{organizer-huge}', success=True,
-                duration=12.0, user='user01', client_type="test", client_id="1234"))
+            type='response', method='PUT{organizer-huge}', success=True,
+            duration=12.0, user='user01', client_type="test", client_id="1234"
+        ))
         logger.observe(dict(
-                type='response', method='PUT{organizer-huge}', success=True,
-                duration=42.42, user='user01', client_type="test", client_id="1234"))
+            type='response', method='PUT{organizer-huge}', success=True,
+            duration=42.42, user='user01', client_type="test", client_id="1234"
+        ))
         self.assertEqual(
             ["Greater than 50% PUT{organizer-huge} exceeded 10 second response time"],
             logger.failures()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140725/7ef97d65/attachment-0001.html>


More information about the calendarserver-changes mailing list