<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[13791] CalendarServer/trunk/contrib/performance/loadtest</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.calendarserver.org//changeset/13791">13791</a></dd>
<dt>Author</dt> <dd>cdaboo@apple.com</dd>
<dt>Date</dt> <dd>2014-07-25 10:59:34 -0700 (Fri, 25 Jul 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add a new sim profile to simulate users acknowledging alarms.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#CalendarServertrunkcontribperformanceloadtestampsimpy">CalendarServer/trunk/contrib/performance/loadtest/ampsim.py</a></li>
<li><a href="#CalendarServertrunkcontribperformanceloadtestclientsplist">CalendarServer/trunk/contrib/performance/loadtest/clients.plist</a></li>
<li><a href="#CalendarServertrunkcontribperformanceloadtesticalpy">CalendarServer/trunk/contrib/performance/loadtest/ical.py</a></li>
<li><a href="#CalendarServertrunkcontribperformanceloadtestloggerpy">CalendarServer/trunk/contrib/performance/loadtest/logger.py</a></li>
<li><a href="#CalendarServertrunkcontribperformanceloadtestpopulationpy">CalendarServer/trunk/contrib/performance/loadtest/population.py</a></li>
<li><a href="#CalendarServertrunkcontribperformanceloadtestprofilespy">CalendarServer/trunk/contrib/performance/loadtest/profiles.py</a></li>
<li><a href="#CalendarServertrunkcontribperformanceloadtestsimpy">CalendarServer/trunk/contrib/performance/loadtest/sim.py</a></li>
<li><a href="#CalendarServertrunkcontribperformanceloadteststandardconfigseventsonlyplist">CalendarServer/trunk/contrib/performance/loadtest/standard-configs/events-only.plist</a></li>
<li><a href="#CalendarServertrunkcontribperformanceloadteststandardconfigsinvitesacceptsplist">CalendarServer/trunk/contrib/performance/loadtest/standard-configs/invites-accepts.plist</a></li>
<li><a href="#CalendarServertrunkcontribperformanceloadteststandardconfigsinvitesonlyrecurringplist">CalendarServer/trunk/contrib/performance/loadtest/standard-configs/invites-only-recurring.plist</a></li>
<li><a href="#CalendarServertrunkcontribperformanceloadteststandardconfigsinvitesonlyplist">CalendarServer/trunk/contrib/performance/loadtest/standard-configs/invites-only.plist</a></li>
<li><a href="#CalendarServertrunkcontribperformanceloadtesttest_populationpy">CalendarServer/trunk/contrib/performance/loadtest/test_population.py</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#CalendarServertrunkcontribperformanceloadteststandardconfigseventupdatesonlyplist">CalendarServer/trunk/contrib/performance/loadtest/standard-configs/event-updates-only.plist</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="CalendarServertrunkcontribperformanceloadtestampsimpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/contrib/performance/loadtest/ampsim.py (13790 => 13791)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx">             from twisted.internet import reactor
</span><span class="cx">             from twisted.internet.stdio import StandardIO
</span><span class="cx"> 
</span><del>-            #from contrib.performance.loadtest.ampsim import Worker
</del><ins>+            # from contrib.performance.loadtest.ampsim import Worker
</ins><span class="cx">             from contrib.performance.loadtest.sim import LagTrackingReactor
</span><span class="cx"> 
</span><span class="cx">             StandardIO(Worker(LagTrackingReactor(reactor)))
</span><span class="lines">@@ -183,7 +183,7 @@
</span><span class="cx"> 
</span><span class="cx">     @LogMessage.responder
</span><span class="cx">     def observed(self, event):
</span><del>-        #from pprint import pformat
-        #self.output.write(pformat(event)+&quot;\n&quot;)
</del><ins>+        # from pprint import pformat
+        # self.output.write(pformat(event)+&quot;\n&quot;)
</ins><span class="cx">         msg(**event)
</span><span class="cx">         return {}
</span></span></pre></div>
<a id="CalendarServertrunkcontribperformanceloadtestclientsplist"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/contrib/performance/loadtest/clients.plist (13790 => 13791)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -170,6 +170,109 @@
</span><span class="cx">                                                 &lt;/dict&gt;
</span><span class="cx">                                         &lt;/dict&gt;
</span><span class="cx"> 
</span><ins>+                                        &lt;!-- This profile will create a new event, and then periodically update the ACKNOWLEDGED property. --&gt;
+                                        &lt;dict&gt;
+                                                &lt;key&gt;class&lt;/key&gt;
+                                                &lt;string&gt;contrib.performance.loadtest.profiles.EventUpdater&lt;/string&gt;
+
+                                                &lt;key&gt;params&lt;/key&gt;
+                                                &lt;dict&gt;
+                                                        &lt;key&gt;enabled&lt;/key&gt;
+                                                        &lt;false/&gt;
+
+                                                        &lt;!-- Define the interval (in seconds) at which this profile will use
+                                                                its client to create a new event. --&gt;
+                                                        &lt;key&gt;interval&lt;/key&gt;
+                                                        &lt;integer&gt;5&lt;/integer&gt;
+
+                                                        &lt;!-- Define how start times (DTSTART) for the randomly generated events
+                                                                will be selected. This is an example of a &quot;Distribution&quot; parameter. The value
+                                                                for most &quot;Distribution&quot; parameters are interchangeable and extensible. --&gt;
+                                                        &lt;key&gt;eventStartDistribution&lt;/key&gt;
+                                                        &lt;dict&gt;
+
+                                                                &lt;!-- 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. --&gt;
+                                                                &lt;key&gt;type&lt;/key&gt;
+                                                                &lt;string&gt;contrib.performance.stats.WorkDistribution&lt;/string&gt;
+
+                                                                &lt;key&gt;params&lt;/key&gt;
+                                                                &lt;dict&gt;
+                                                                        &lt;!-- These are the days of the week the distribution will use. --&gt;
+                                                                        &lt;key&gt;daysOfWeek&lt;/key&gt;
+                                                                        &lt;array&gt;
+                                                                                &lt;string&gt;mon&lt;/string&gt;
+                                                                                &lt;string&gt;tue&lt;/string&gt;
+                                                                                &lt;string&gt;wed&lt;/string&gt;
+                                                                                &lt;string&gt;thu&lt;/string&gt;
+                                                                                &lt;string&gt;fri&lt;/string&gt;
+                                                                        &lt;/array&gt;
+
+                                                                        &lt;!-- The earliest hour of a day at which an event might be scheduled. --&gt;
+                                                                        &lt;key&gt;beginHour&lt;/key&gt;
+                                                                        &lt;integer&gt;8&lt;/integer&gt;
+
+                                                                        &lt;!-- And the latest hour of a day (at which an event will be scheduled
+                                                                                to begin!). --&gt;
+                                                                        &lt;key&gt;endHour&lt;/key&gt;
+                                                                        &lt;integer&gt;16&lt;/integer&gt;
+
+                                                                        &lt;!-- The timezone in which the event is scheduled. (XXX Does this
+                                                                                really work right?) --&gt;
+                                                                        &lt;key&gt;tzname&lt;/key&gt;
+                                                                        &lt;string&gt;America/Los_Angeles&lt;/string&gt;
+                                                                &lt;/dict&gt;
+                                                        &lt;/dict&gt;
+
+                                                        &lt;!-- Define how recurrences are created. --&gt;
+                                                        &lt;key&gt;recurrenceDistribution&lt;/key&gt;
+                                                        &lt;dict&gt;
+
+                                                                &lt;!-- This distribution is pretty specialized.  We have a fixed set of
+                                                                     RRULEs defined for this distribution and pick each based on a
+                                                                     weight. --&gt;
+                                                                &lt;key&gt;type&lt;/key&gt;
+                                                                &lt;string&gt;contrib.performance.stats.RecurrenceDistribution&lt;/string&gt;
+
+                                                                &lt;key&gt;params&lt;/key&gt;
+                                                                &lt;dict&gt;
+                                                                        &lt;!-- False to disable RRULEs --&gt;
+                                                                        &lt;key&gt;allowRecurrence&lt;/key&gt;
+                                                                        &lt;true/&gt;
+
+                                                                        &lt;!-- These are the weights for the specific set of RRULEs. --&gt;
+                                                                        &lt;key&gt;weights&lt;/key&gt;
+                                                                        &lt;dict&gt;
+                                                                                &lt;!-- Half of all events will be non-recurring --&gt;
+                                                                                &lt;key&gt;none&lt;/key&gt;
+                                                                                &lt;integer&gt;50&lt;/integer&gt;
+                                                                                
+                                                                                &lt;!-- Daily and weekly are pretty common --&gt;
+                                                                                &lt;key&gt;daily&lt;/key&gt;
+                                                                                &lt;integer&gt;25&lt;/integer&gt;
+                                                                                &lt;key&gt;weekly&lt;/key&gt;
+                                                                                &lt;integer&gt;25&lt;/integer&gt;
+                                                                                
+                                                                                &lt;!-- Monthly, yearly, daily &amp; weekly limit not so common --&gt;
+                                                                                &lt;key&gt;monthly&lt;/key&gt;
+                                                                                &lt;integer&gt;0&lt;/integer&gt;
+                                                                                &lt;key&gt;yearly&lt;/key&gt;
+                                                                                &lt;integer&gt;0&lt;/integer&gt;
+                                                                                &lt;key&gt;dailylimit&lt;/key&gt;
+                                                                                &lt;integer&gt;0&lt;/integer&gt;
+                                                                                &lt;key&gt;weeklylimit&lt;/key&gt;
+                                                                                &lt;integer&gt;0&lt;/integer&gt;
+                                                                                
+                                                                                &lt;!-- Work days pretty common --&gt;
+                                                                                &lt;key&gt;workdays&lt;/key&gt;
+                                                                                &lt;integer&gt;0&lt;/integer&gt;
+                                                                        &lt;/dict&gt;
+                                                                &lt;/dict&gt;
+                                                        &lt;/dict&gt;
+                                                &lt;/dict&gt;
+                                        &lt;/dict&gt;
+
</ins><span class="cx">                                         &lt;!-- This profile invites some number of new attendees to new events. --&gt;
</span><span class="cx">                                         &lt;dict&gt;
</span><span class="cx">                                                 &lt;key&gt;class&lt;/key&gt;
</span></span></pre></div>
<a id="CalendarServertrunkcontribperformanceloadtesticalpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/contrib/performance/loadtest/ical.py (13790 => 13791)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -291,6 +291,13 @@
</span><span class="cx">         raise NotImplementedError(&quot;%r does not implement addInvite&quot; % (self.__class__,))
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+    def changeEvent(self, href, calendar):
+        &quot;&quot;&quot;
+        Called when a profile needs to change an event (no scheduling).
+        &quot;&quot;&quot;
+        raise NotImplementedError(&quot;%r does not implement changeEvent&quot; % (self.__class__,))
+
+
</ins><span class="cx">     def deleteEvent(self, href):
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx">         Called when a profile needs to delete an event.
</span><span class="lines">@@ -472,7 +479,7 @@
</span><span class="cx">         # Allow events to go out into the world.
</span><span class="cx">         self.catalog = {
</span><span class="cx">             &quot;eventChanged&quot;: Periodical(),
</span><del>-            }
</del><ins>+        }
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def _addDefaultHeaders(self, headers):
</span><span class="lines">@@ -550,9 +557,9 @@
</span><span class="cx">             return parser.getResults()
</span><span class="cx"> 
</span><span class="cx">     _CALENDAR_TYPES = set([
</span><del>-            caldavxml.calendar,
-            caldavxml.schedule_inbox,
-            ])
</del><ins>+        caldavxml.calendar,
+        caldavxml.schedule_inbox,
+    ])
</ins><span class="cx"> 
</span><span class="cx">     @inlineCallbacks
</span><span class="cx">     def _propfind(self, url, body, depth='0', allowedStatus=(MULTI_STATUS,), method_label=None):
</span><span class="lines">@@ -787,12 +794,12 @@
</span><span class="cx"> 
</span><span class="cx">                     changeTag = davxml.sync_token if self.supportSync else csxml.getctag
</span><span class="cx">                     calendars.append(Calendar(
</span><del>-                            nodeType.tag,
-                            componentTypes,
-                            textProps.get(davxml.displayname, None),
-                            href,
-                            textProps.get(changeTag, None),
-                            ))
</del><ins>+                        nodeType.tag,
+                        componentTypes,
+                        textProps.get(davxml.displayname, None),
+                        href,
+                        textProps.get(changeTag, None),
+                    ))
</ins><span class="cx">                     break
</span><span class="cx">         return calendars
</span><span class="cx"> 
</span><span class="lines">@@ -1215,8 +1222,10 @@
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx">         Start monitoring for AMP-based push notifications
</span><span class="cx">         &quot;&quot;&quot;
</span><del>-        subscribeToIDs(self.ampPushHost, self.ampPushPort, pushKeys,
-            self._receivedPush, self.reactor)
</del><ins>+        subscribeToIDs(
+            self.ampPushHost, self.ampPushPort, pushKeys,
+            self._receivedPush, self.reactor
+        )
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     @inlineCallbacks
</span><span class="lines">@@ -1413,8 +1422,10 @@
</span><span class="cx">             # test account names are all too similar
</span><span class="cx">             # name = attendee.parameterValue('CN').encode(&quot;utf-8&quot;)
</span><span class="cx">             # prefix = name[:4].lower()
</span><del>-            prefix = random.choice([&quot;chris&quot;, &quot;cyru&quot;, &quot;dre&quot;, &quot;eric&quot;, &quot;morg&quot;,
-                &quot;well&quot;, &quot;wilfr&quot;, &quot;witz&quot;])
</del><ins>+            prefix = random.choice([
+                &quot;chris&quot;, &quot;cyru&quot;, &quot;dre&quot;, &quot;eric&quot;, &quot;morg&quot;,
+                &quot;well&quot;, &quot;wilfr&quot;, &quot;witz&quot;
+            ])
</ins><span class="cx"> 
</span><span class="cx">             email = attendee.value()
</span><span class="cx">             if email.startswith(&quot;mailto:&quot;):
</span><span class="lines">@@ -1427,14 +1438,14 @@
</span><span class="cx">             yield self._report(
</span><span class="cx">                 self.principalCollection,
</span><span class="cx">                 self._USER_LIST_PRINCIPAL_PROPERTY_SEARCH % {
</span><del>-                'displayname': prefix,
-                'email': prefix,
-                'firstname': prefix,
-                'lastname': prefix,
</del><ins>+                    'displayname': prefix,
+                    'email': prefix,
+                    'firstname': prefix,
+                    'lastname': prefix,
</ins><span class="cx">                 },
</span><span class="cx">                 depth=None,
</span><span class="cx">                 method_label=&quot;REPORT{psearch}&quot;,
</span><del>-           )
</del><ins>+            )
</ins><span class="cx"> 
</span><span class="cx">             # Now learn about the attendee's availability
</span><span class="cx">             yield self.requestAvailability(
</span><span class="lines">@@ -1455,8 +1466,8 @@
</span><span class="cx">         component.mainComponent().addProperty(newAttendee)
</span><span class="cx">         okCodes = NO_CONTENT
</span><span class="cx">         headers = Headers({
</span><del>-                'content-type': ['text/calendar'],
-                })
</del><ins>+            'content-type': ['text/calendar'],
+        })
</ins><span class="cx">         if event.scheduleTag is not None:
</span><span class="cx">             headers.addRawHeader('if-schedule-tag-match', event.scheduleTag)
</span><span class="cx">             okCodes = (NO_CONTENT, PRECONDITION_FAILED,)
</span><span class="lines">@@ -1503,8 +1514,8 @@
</span><span class="cx">     @inlineCallbacks
</span><span class="cx">     def addEvent(self, href, component, invite=False):
</span><span class="cx">         headers = Headers({
</span><del>-                'content-type': ['text/calendar'],
-                })
</del><ins>+            'content-type': ['text/calendar'],
+        })
</ins><span class="cx"> 
</span><span class="cx">         attendees = list(component.mainComponent().properties('ATTENDEE'))
</span><span class="cx">         label_suffix = &quot;small&quot;
</span><span class="lines">@@ -1544,6 +1555,29 @@
</span><span class="cx">         yield self.addEvent(href, component, invite=True)
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+    @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=&quot;PUT{update}&quot;
+        )
+
+        # Finally, re-retrieve the event to update the etag
+        yield self._updateEvent(response, href)
+
+
</ins><span class="cx">     def _localUpdateEvent(self, response, href, component):
</span><span class="cx">         headers = response.headers
</span><span class="cx">         etag = headers.getRawHeaders(&quot;etag&quot;, [None])[0]
</span><span class="lines">@@ -1634,14 +1668,15 @@
</span><span class="cx">                     'originator': [self.email],
</span><span class="cx">                     'recipient': [u', '.join(users).encode('utf-8')]}),
</span><span class="cx">             StringProducer(self._POST_AVAILABILITY % {
</span><del>-                    '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}),
</del><ins>+                '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,
+            }),
</ins><span class="cx">             method_label=&quot;POST{fb-%s}&quot; % (label_suffix,),
</span><span class="cx">         )
</span><span class="cx">         body = yield readBody(response)
</span><span class="lines">@@ -1999,7 +2034,7 @@
</span><span class="cx">                 url=urlunparse(('', '') + urlparse(event['url'])[2:]),
</span><span class="cx">                 code=event['code'],
</span><span class="cx">                 duration=event['duration'],
</span><del>-                )
</del><ins>+            )
</ins><span class="cx"> 
</span><span class="cx">             if event['success']:
</span><span class="cx">                 formatArgs['success'] = self.success
</span></span></pre></div>
<a id="CalendarServertrunkcontribperformanceloadtestloggerpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/contrib/performance/loadtest/logger.py (13790 => 13791)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -65,8 +65,8 @@
</span><span class="cx">                 failure = True
</span><span class="cx"> 
</span><span class="cx">         return (operation, count, failed,) + \
</span><del>-                tuple(thresholds) + \
-                (mean(durations), median(durations), stddev(durations), &quot;FAIL&quot; if failure else &quot;&quot;)
</del><ins>+            tuple(thresholds) + \
+            (mean(durations), median(durations), stddev(durations), &quot;FAIL&quot; if failure else &quot;&quot;)
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def _printRow(self, output, formats, values):
</span></span></pre></div>
<a id="CalendarServertrunkcontribperformanceloadtestpopulationpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/contrib/performance/loadtest/population.py (13790 => 13791)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -87,7 +87,10 @@
</span><span class="cx">         Create a new instance of this client type.
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx">         return self.clientType(
</span><del>-            reactor, serverAddress, principalPathTemplate, serializationPath, userRecord, authInfo, **self.clientParams)
</del><ins>+            reactor, serverAddress, principalPathTemplate,
+            serializationPath, userRecord, authInfo,
+            **self.clientParams
+        )
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -252,8 +255,12 @@
</span><span class="cx">                 for profileType in clientType.profileTypes:
</span><span class="cx">                     profile = profileType(reactor, self, client, number)
</span><span class="cx">                     if profile.enabled:
</span><del>-                        d = profile.run()
-                        d.addErrback(self._profileFailure, profileType, reactor)
</del><ins>+                        d = profile.initialize()
+                        def _run(result):
+                            d2 = profile.run()
+                            d2.addErrback(self._profileFailure, profileType, reactor)
+                            return d2
+                        d.addCallback(_run)
</ins><span class="cx"> 
</span><span class="cx">         # XXX this status message is prone to be slightly inaccurate, but isn't
</span><span class="cx">         # really used by much anyway.
</span><span class="lines">@@ -276,7 +283,7 @@
</span><span class="cx">         if not self._stopped:
</span><span class="cx">             where = self._dumpLogs(reactor, reason)
</span><span class="cx">             err(reason, &quot;Client stopped with error; recent traffic in %r&quot; % (
</span><del>-                    where.path,))
</del><ins>+                where.path,))
</ins><span class="cx">             if not isinstance(reason, Failure):
</span><span class="cx">                 reason = Failure(reason)
</span><span class="cx">             msg(type=&quot;client-failure&quot;, reason=&quot;%s: %s&quot; % (reason.type, reason.value,))
</span><span class="lines">@@ -286,7 +293,7 @@
</span><span class="cx">         if not self._stopped:
</span><span class="cx">             where = self._dumpLogs(reactor, reason)
</span><span class="cx">             err(reason, &quot;Profile stopped with error; recent traffic in %r&quot; % (
</span><del>-                    where.path,))
</del><ins>+                where.path,))
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def _simFailure(self, reason, reactor):
</span><span class="lines">@@ -557,12 +564,15 @@
</span><span class="cx">         output.write(&quot;* Details\n&quot;)
</span><span class="cx"> 
</span><span class="cx">         self.printHeader(output, [
</span><del>-                (label, width)
-                for (label, width, _ignore_fmt)
-                in self._fields])
-        self.printData(output,
</del><ins>+            (label, width)
+            for (label, width, _ignore_fmt)
+            in self._fields
+        ])
+        self.printData(
+            output,
</ins><span class="cx">             [fmt for (label, width, fmt) in self._fields],
</span><del>-            sorted(self._perMethodTimes.items()))
</del><ins>+            sorted(self._perMethodTimes.items())
+        )
</ins><span class="cx"> 
</span><span class="cx">     _FAILED_REASON = &quot;Greater than %(cutoff)g%% %(method)s failed&quot;
</span><span class="cx"> 
</span><span class="lines">@@ -587,7 +597,7 @@
</span><span class="cx"> 
</span><span class="cx">             checks = [
</span><span class="cx">                 (failures, self._fail_cut_off, self._FAILED_REASON),
</span><del>-                ]
</del><ins>+            ]
</ins><span class="cx"> 
</span><span class="cx">             for ctr, item in enumerate(self._thresholds):
</span><span class="cx">                 threshold, fail_at = item
</span></span></pre></div>
<a id="CalendarServertrunkcontribperformanceloadtestprofilespy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/contrib/performance/loadtest/profiles.py (13790 => 13791)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -64,6 +64,15 @@
</span><span class="cx">         pass
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+    def initialize(self):
+        &quot;&quot;&quot;
+        Called before the profile runs for real. Can be used to initialize client state.
+
+        @return: a L{Deferred} that fires when initialization is done
+        &quot;&quot;&quot;
+        return succeed(None)
+
+
</ins><span class="cx">     def _calendarsOfType(self, calendarType, componentType):
</span><span class="cx">         return [
</span><span class="cx">             cal
</span><span class="lines">@@ -668,6 +677,132 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+class EventUpdater(ProfileBase):
+    &quot;&quot;&quot;
+    A Calendar user who creates a new event, and then updates its alarm.
+    &quot;&quot;&quot;
+    _eventTemplate = Component.fromString(&quot;&quot;&quot;\
+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
+&quot;&quot;&quot;.replace(&quot;\n&quot;, &quot;\r\n&quot;))
+
+    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):
+        &quot;&quot;&quot;
+        Called before the profile runs for real. Can be used to initialize client state.
+
+        @return: a L{Deferred} that fires when initialization is done
+        &quot;&quot;&quot;
+        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, &quot;VEVENT&quot;)[0]
+        if calendar.events:
+            events = [event for event in calendar.events.values() if event.url.endswith(&quot;event_to_update.ics&quot;)]
+            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(&quot;CREATED&quot;, DateTime.getNowUTC()))
+        vevent.replaceProperty(Property(&quot;DTSTAMP&quot;, DateTime.getNowUTC()))
+        vevent.replaceProperty(Property(&quot;DTSTART&quot;, dtstart))
+        vevent.replaceProperty(Property(&quot;DTEND&quot;, dtend))
+        vevent.replaceProperty(Property(&quot;UID&quot;, uid))
+
+        rrule = self._recurrenceDistribution.sample()
+        if rrule is not None:
+            vevent.addProperty(Property(None, None, None, pycalendar=rrule))
+
+        href = '%s%s' % (calendar.url, &quot;event_to_update.ics&quot;)
+        d = self._client.addEvent(href, vcalendar)
+        return self._newOperation(&quot;create&quot;, d)
+
+
+    def _updateEvent(self):
+        &quot;&quot;&quot;
+        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.
+        &quot;&quot;&quot;
+
+        if not self._client.started:
+            return succeed(None)
+
+        # If it does not exist, try to create it
+        calendar = self._calendarsOfType(caldavxml.calendar, &quot;VEVENT&quot;)[0]
+        if not calendar.events:
+            return self._initEvent()
+        events = [event for event in calendar.events.values() if event.url.endswith(&quot;event_to_update.ics&quot;)]
+        if not events:
+            return self._initEvent()
+        event = events[0]
+
+        # Add/update the ACKNOWLEDGED property
+        component = event.component.mainComponent()
+        component.replaceProperty(Property(&quot;ACKNOWLEDGED&quot;, DateTime.getNowUTC()))
+        d = self._client.changeEvent(event.url)
+        return self._newOperation(&quot;update&quot;, d)
+
+
+
</ins><span class="cx"> class Tasker(ProfileBase):
</span><span class="cx">     &quot;&quot;&quot;
</span><span class="cx">     A Calendar user who creates new tasks.
</span></span></pre></div>
<a id="CalendarServertrunkcontribperformanceloadtestsimpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/contrib/performance/loadtest/sim.py (13790 => 13791)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -331,10 +331,12 @@
</span><span class="cx">                         ClientType(
</span><span class="cx">                             namedAny(clientConfig[&quot;software&quot;]),
</span><span class="cx">                             cls._convertParams(clientConfig[&quot;params&quot;]),
</span><del>-                            [ProfileType(
-                                namedAny(profile[&quot;class&quot;]),
-                                cls._convertParams(profile[&quot;params&quot;]))
-                             for profile in clientConfig[&quot;profiles&quot;]]))
</del><ins>+                            [
+                                ProfileType(
+                                    namedAny(profile[&quot;class&quot;]),
+                                    cls._convertParams(profile[&quot;params&quot;])
+                                ) for profile in clientConfig[&quot;profiles&quot;]
+                            ]))
</ins><span class="cx">             if not parameters.clients:
</span><span class="cx">                 parameters.addClient(1,
</span><span class="cx">                                      ClientType(OS_X_10_6, {},
</span></span></pre></div>
<a id="CalendarServertrunkcontribperformanceloadteststandardconfigseventupdatesonlyplist"></a>
<div class="addfile"><h4>Added: CalendarServer/trunk/contrib/performance/loadtest/standard-configs/event-updates-only.plist (0 => 13791)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,543 @@
</span><ins>+&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
+
+&lt;!--
+    Copyright (c) 2011-2012 Apple Inc. All rights reserved.
+
+    Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
+    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 &quot;AS IS&quot; 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.
+  --&gt;
+
+&lt;!DOCTYPE plist PUBLIC &quot;-//Apple//DTD PLIST 1.0//EN&quot; &quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt;
+&lt;plist version=&quot;1.0&quot;&gt;
+        &lt;dict&gt;
+                &lt;!-- Define the kinds of software and user behavior the load simulation
+                        will simulate. --&gt;
+                &lt;key&gt;clients&lt;/key&gt;
+
+                &lt;!-- Have as many different kinds of software and user behavior configurations
+                        as you want. Each is a dict --&gt;
+                &lt;array&gt;
+
+                        &lt;dict&gt;
+
+                                &lt;!-- Here is a Lion iCal simulator. --&gt;
+                                &lt;key&gt;software&lt;/key&gt;
+                                &lt;string&gt;contrib.performance.loadtest.ical.OS_X_10_7&lt;/string&gt;
+
+                                &lt;!-- Arguments to use to initialize the client instance. --&gt;
+                                &lt;key&gt;params&lt;/key&gt;
+                                &lt;dict&gt;
+                                        &lt;!-- Name that appears in logs. --&gt;
+                                        &lt;key&gt;title&lt;/key&gt;
+                                        &lt;string&gt;10.7&lt;/string&gt;
+
+                                        &lt;!-- Client can poll the calendar home at some interval. This is 
+                                                in seconds. --&gt;
+                                        &lt;key&gt;calendarHomePollInterval&lt;/key&gt;
+                                        &lt;integer&gt;300000&lt;/integer&gt;
+
+                                        &lt;!-- 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. --&gt;
+                                        &lt;key&gt;supportPush&lt;/key&gt;
+                                        &lt;false /&gt;
+                                        &lt;key&gt;supportAmpPush&lt;/key&gt;
+                                        &lt;false /&gt;
+                                &lt;/dict&gt;
+
+                                &lt;!-- The profiles define certain types of user behavior on top of the 
+                                        client software being simulated. --&gt;
+                                &lt;key&gt;profiles&lt;/key&gt;
+                                &lt;array&gt;
+
+                                        &lt;!-- First an event-creating profile, which will periodically create 
+                                                new events at a random time on a random calendar. --&gt;
+                                        &lt;dict&gt;
+                                                &lt;key&gt;class&lt;/key&gt;
+                                                &lt;string&gt;contrib.performance.loadtest.profiles.Eventer&lt;/string&gt;
+
+                                                &lt;key&gt;params&lt;/key&gt;
+                                                &lt;dict&gt;
+                                                        &lt;key&gt;enabled&lt;/key&gt;
+                                                        &lt;false/&gt;
+
+                                                        &lt;!-- Define the interval (in seconds) at which this profile will use 
+                                                                its client to create a new event. --&gt;
+                                                        &lt;key&gt;interval&lt;/key&gt;
+                                                        &lt;integer&gt;20&lt;/integer&gt;
+
+                                                        &lt;!-- Define how start times (DTSTART) for the randomly generated events 
+                                                                will be selected. This is an example of a &quot;Distribution&quot; parameter. The value 
+                                                                for most &quot;Distribution&quot; parameters are interchangeable and extensible. --&gt;
+                                                        &lt;key&gt;eventStartDistribution&lt;/key&gt;
+                                                        &lt;dict&gt;
+
+                                                                &lt;!-- 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. --&gt;
+                                                                &lt;key&gt;type&lt;/key&gt;
+                                                                &lt;string&gt;contrib.performance.stats.WorkDistribution&lt;/string&gt;
+
+                                                                &lt;key&gt;params&lt;/key&gt;
+                                                                &lt;dict&gt;
+                                                                        &lt;!-- These are the days of the week the distribution will use. --&gt;
+                                                                        &lt;key&gt;daysOfWeek&lt;/key&gt;
+                                                                        &lt;array&gt;
+                                                                                &lt;string&gt;mon&lt;/string&gt;
+                                                                                &lt;string&gt;tue&lt;/string&gt;
+                                                                                &lt;string&gt;wed&lt;/string&gt;
+                                                                                &lt;string&gt;thu&lt;/string&gt;
+                                                                                &lt;string&gt;fri&lt;/string&gt;
+                                                                        &lt;/array&gt;
+
+                                                                        &lt;!-- The earliest hour of a day at which an event might be scheduled. --&gt;
+                                                                        &lt;key&gt;beginHour&lt;/key&gt;
+                                                                        &lt;integer&gt;8&lt;/integer&gt;
+
+                                                                        &lt;!-- And the latest hour of a day (at which an event will be scheduled 
+                                                                                to begin!). --&gt;
+                                                                        &lt;key&gt;endHour&lt;/key&gt;
+                                                                        &lt;integer&gt;16&lt;/integer&gt;
+
+                                                                        &lt;!-- The timezone in which the event is scheduled. (XXX Does this 
+                                                                                really work right?) --&gt;
+                                                                        &lt;key&gt;tzname&lt;/key&gt;
+                                                                        &lt;string&gt;America/Los_Angeles&lt;/string&gt;
+                                                                &lt;/dict&gt;
+                                                        &lt;/dict&gt;
+
+                                                        &lt;!-- Define how recurrences are created. --&gt;
+                                                        &lt;key&gt;recurrenceDistribution&lt;/key&gt;
+                                                        &lt;dict&gt;
+
+                                                                &lt;!-- This distribution is pretty specialized.  We have a fixed set of
+                                                                     RRULEs defined for this distribution and pick each based on a
+                                                                     weight. --&gt;
+                                                                &lt;key&gt;type&lt;/key&gt;
+                                                                &lt;string&gt;contrib.performance.stats.RecurrenceDistribution&lt;/string&gt;
+
+                                                                &lt;key&gt;params&lt;/key&gt;
+                                                                &lt;dict&gt;
+                                                                        &lt;!-- False to disable RRULEs --&gt;
+                                                                        &lt;key&gt;allowRecurrence&lt;/key&gt;
+                                                                        &lt;false/&gt;
+
+                                                                        &lt;!-- These are the weights for the specific set of RRULEs. --&gt;
+                                                                        &lt;key&gt;weights&lt;/key&gt;
+                                                                        &lt;dict&gt;
+                                                                                &lt;!-- Half of all events will be non-recurring --&gt;
+                                                                                &lt;key&gt;none&lt;/key&gt;
+                                                                                &lt;integer&gt;50&lt;/integer&gt;
+                                                                                
+                                                                                &lt;!-- Daily and weekly are pretty common --&gt;
+                                                                                &lt;key&gt;daily&lt;/key&gt;
+                                                                                &lt;integer&gt;10&lt;/integer&gt;
+                                                                                &lt;key&gt;weekly&lt;/key&gt;
+                                                                                &lt;integer&gt;20&lt;/integer&gt;
+                                                                                
+                                                                                &lt;!-- Monthly, yearly, daily &amp; weekly limit not so common --&gt;
+                                                                                &lt;key&gt;monthly&lt;/key&gt;
+                                                                                &lt;integer&gt;2&lt;/integer&gt;
+                                                                                &lt;key&gt;yearly&lt;/key&gt;
+                                                                                &lt;integer&gt;1&lt;/integer&gt;
+                                                                                &lt;key&gt;dailylimit&lt;/key&gt;
+                                                                                &lt;integer&gt;2&lt;/integer&gt;
+                                                                                &lt;key&gt;weeklylimit&lt;/key&gt;
+                                                                                &lt;integer&gt;5&lt;/integer&gt;
+                                                                                
+                                                                                &lt;!-- Work days pretty common --&gt;
+                                                                                &lt;key&gt;workdays&lt;/key&gt;
+                                                                                &lt;integer&gt;10&lt;/integer&gt;
+                                                                        &lt;/dict&gt;
+                                                                &lt;/dict&gt;
+                                                        &lt;/dict&gt;
+                                                &lt;/dict&gt;
+                                        &lt;/dict&gt;
+
+                                        &lt;!-- This profile will create a new event, and then periodically update the ACKNOWLEDGED property. --&gt;
+                                        &lt;dict&gt;
+                                                &lt;key&gt;class&lt;/key&gt;
+                                                &lt;string&gt;contrib.performance.loadtest.profiles.EventUpdater&lt;/string&gt;
+
+                                                &lt;key&gt;params&lt;/key&gt;
+                                                &lt;dict&gt;
+                                                        &lt;key&gt;enabled&lt;/key&gt;
+                                                        &lt;true/&gt;
+
+                                                        &lt;!-- Define the interval (in seconds) at which this profile will use
+                                                                its client to create a new event. --&gt;
+                                                        &lt;key&gt;interval&lt;/key&gt;
+                                                        &lt;integer&gt;5&lt;/integer&gt;
+
+                                                        &lt;!-- Define how start times (DTSTART) for the randomly generated events
+                                                                will be selected. This is an example of a &quot;Distribution&quot; parameter. The value
+                                                                for most &quot;Distribution&quot; parameters are interchangeable and extensible. --&gt;
+                                                        &lt;key&gt;eventStartDistribution&lt;/key&gt;
+                                                        &lt;dict&gt;
+
+                                                                &lt;!-- 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. --&gt;
+                                                                &lt;key&gt;type&lt;/key&gt;
+                                                                &lt;string&gt;contrib.performance.stats.WorkDistribution&lt;/string&gt;
+
+                                                                &lt;key&gt;params&lt;/key&gt;
+                                                                &lt;dict&gt;
+                                                                        &lt;!-- These are the days of the week the distribution will use. --&gt;
+                                                                        &lt;key&gt;daysOfWeek&lt;/key&gt;
+                                                                        &lt;array&gt;
+                                                                                &lt;string&gt;mon&lt;/string&gt;
+                                                                                &lt;string&gt;tue&lt;/string&gt;
+                                                                                &lt;string&gt;wed&lt;/string&gt;
+                                                                                &lt;string&gt;thu&lt;/string&gt;
+                                                                                &lt;string&gt;fri&lt;/string&gt;
+                                                                        &lt;/array&gt;
+
+                                                                        &lt;!-- The earliest hour of a day at which an event might be scheduled. --&gt;
+                                                                        &lt;key&gt;beginHour&lt;/key&gt;
+                                                                        &lt;integer&gt;8&lt;/integer&gt;
+
+                                                                        &lt;!-- And the latest hour of a day (at which an event will be scheduled
+                                                                                to begin!). --&gt;
+                                                                        &lt;key&gt;endHour&lt;/key&gt;
+                                                                        &lt;integer&gt;16&lt;/integer&gt;
+
+                                                                        &lt;!-- The timezone in which the event is scheduled. (XXX Does this
+                                                                                really work right?) --&gt;
+                                                                        &lt;key&gt;tzname&lt;/key&gt;
+                                                                        &lt;string&gt;America/Los_Angeles&lt;/string&gt;
+                                                                &lt;/dict&gt;
+                                                        &lt;/dict&gt;
+
+                                                        &lt;!-- Define how recurrences are created. --&gt;
+                                                        &lt;key&gt;recurrenceDistribution&lt;/key&gt;
+                                                        &lt;dict&gt;
+
+                                                                &lt;!-- This distribution is pretty specialized.  We have a fixed set of
+                                                                     RRULEs defined for this distribution and pick each based on a
+                                                                     weight. --&gt;
+                                                                &lt;key&gt;type&lt;/key&gt;
+                                                                &lt;string&gt;contrib.performance.stats.RecurrenceDistribution&lt;/string&gt;
+
+                                                                &lt;key&gt;params&lt;/key&gt;
+                                                                &lt;dict&gt;
+                                                                        &lt;!-- False to disable RRULEs --&gt;
+                                                                        &lt;key&gt;allowRecurrence&lt;/key&gt;
+                                                                        &lt;true/&gt;
+
+                                                                        &lt;!-- These are the weights for the specific set of RRULEs. --&gt;
+                                                                        &lt;key&gt;weights&lt;/key&gt;
+                                                                        &lt;dict&gt;
+                                                                                &lt;!-- Half of all events will be non-recurring --&gt;
+                                                                                &lt;key&gt;none&lt;/key&gt;
+                                                                                &lt;integer&gt;50&lt;/integer&gt;
+                                                                                
+                                                                                &lt;!-- Daily and weekly are pretty common --&gt;
+                                                                                &lt;key&gt;daily&lt;/key&gt;
+                                                                                &lt;integer&gt;25&lt;/integer&gt;
+                                                                                &lt;key&gt;weekly&lt;/key&gt;
+                                                                                &lt;integer&gt;25&lt;/integer&gt;
+                                                                                
+                                                                                &lt;!-- Monthly, yearly, daily &amp; weekly limit not so common --&gt;
+                                                                                &lt;key&gt;monthly&lt;/key&gt;
+                                                                                &lt;integer&gt;0&lt;/integer&gt;
+                                                                                &lt;key&gt;yearly&lt;/key&gt;
+                                                                                &lt;integer&gt;0&lt;/integer&gt;
+                                                                                &lt;key&gt;dailylimit&lt;/key&gt;
+                                                                                &lt;integer&gt;0&lt;/integer&gt;
+                                                                                &lt;key&gt;weeklylimit&lt;/key&gt;
+                                                                                &lt;integer&gt;0&lt;/integer&gt;
+                                                                                
+                                                                                &lt;!-- Work days pretty common --&gt;
+                                                                                &lt;key&gt;workdays&lt;/key&gt;
+                                                                                &lt;integer&gt;0&lt;/integer&gt;
+                                                                        &lt;/dict&gt;
+                                                                &lt;/dict&gt;
+                                                        &lt;/dict&gt;
+                                                &lt;/dict&gt;
+                                        &lt;/dict&gt;
+
+                                        &lt;!-- This profile invites some number of new attendees to new events. --&gt;
+                                        &lt;dict&gt;
+                                                &lt;key&gt;class&lt;/key&gt;
+                                                &lt;string&gt;contrib.performance.loadtest.profiles.RealisticInviter&lt;/string&gt;
+
+                                                &lt;key&gt;params&lt;/key&gt;
+                                                &lt;dict&gt;
+                                                        &lt;key&gt;enabled&lt;/key&gt;
+                                                        &lt;false/&gt;
+
+                                                        &lt;!-- Define the frequency at which new invitations will be sent out. --&gt;
+                                                        &lt;key&gt;sendInvitationDistribution&lt;/key&gt;
+                                                        &lt;dict&gt;
+                                                                &lt;key&gt;type&lt;/key&gt;
+                                                                &lt;string&gt;contrib.performance.stats.NormalDistribution&lt;/string&gt;
+                                                                &lt;key&gt;params&lt;/key&gt;
+                                                                &lt;dict&gt;
+                                                                        &lt;!-- mu gives the mean of the normal distribution (in seconds). --&gt;
+                                                                        &lt;key&gt;mu&lt;/key&gt;
+                                                                        &lt;integer&gt;10&lt;/integer&gt;
+
+                                                                        &lt;!-- and sigma gives its standard deviation. --&gt;
+                                                                        &lt;key&gt;sigma&lt;/key&gt;
+                                                                        &lt;integer&gt;5&lt;/integer&gt;
+                                                                &lt;/dict&gt;
+                                                        &lt;/dict&gt;
+
+                                                        &lt;!-- 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 &quot;close to&quot; the organizer based on account index. If the clumping
+                                                                is too &quot;tight&quot; 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.
+                                                        --&gt;
+                                                        &lt;key&gt;inviteeDistribution&lt;/key&gt;
+                                                        &lt;dict&gt;
+                                                                &lt;key&gt;type&lt;/key&gt;
+                                                                &lt;string&gt;contrib.performance.stats.UniformIntegerDistribution&lt;/string&gt;
+                                                                &lt;key&gt;params&lt;/key&gt;
+                                                                &lt;dict&gt;
+                                                                        &lt;!-- The minimum value (inclusive) of the uniform distribution. --&gt;
+                                                                        &lt;key&gt;min&lt;/key&gt;
+                                                                        &lt;integer&gt;0&lt;/integer&gt;
+                                                                        &lt;!-- The maximum value (exclusive) of the uniform distribution. --&gt;
+                                                                        &lt;key&gt;max&lt;/key&gt;
+                                                                        &lt;integer&gt;99&lt;/integer&gt;
+                                                                &lt;/dict&gt;
+                                                        &lt;/dict&gt;
+
+                                                        &lt;key&gt;inviteeClumping&lt;/key&gt;
+                                                        &lt;true/&gt;
+
+                                                        &lt;!-- Define the distribution of how many attendees will be invited to an event.
+                                                        
+                                                                LogNormal is the best fit to observed data.
+
+
+                                                                For LogNormal &quot;mode&quot; is the peak, &quot;mean&quot; is the mean value.        For invites,
+                                                                mode should typically be 1, and mean whatever matches the user behavior.
+                                                                Our typical mean is 6.                                                         
+                                                             --&gt;
+                                                        &lt;key&gt;inviteeCountDistribution&lt;/key&gt;
+                                                        &lt;dict&gt;
+                                                                &lt;key&gt;type&lt;/key&gt;
+                                                                &lt;string&gt;contrib.performance.stats.LogNormalDistribution&lt;/string&gt;
+                                                                &lt;key&gt;params&lt;/key&gt;
+                                                                &lt;dict&gt;
+                                                                        &lt;!-- mode - peak--&gt;
+                                                                        &lt;key&gt;mode&lt;/key&gt;
+                                                                        &lt;integer&gt;1&lt;/integer&gt;
+                                                                        &lt;!-- mean - average--&gt;
+                                                                        &lt;key&gt;median&lt;/key&gt;
+                                                                        &lt;integer&gt;6&lt;/integer&gt;
+                                                                        &lt;!-- maximum --&gt;
+                                                                        &lt;key&gt;maximum&lt;/key&gt;
+                                                                        &lt;real&gt;100&lt;/real&gt;
+                                                                &lt;/dict&gt;
+                                                        &lt;/dict&gt;
+
+                                                        &lt;!-- Define how start times (DTSTART) for the randomly generated events 
+                                                                will be selected. This is an example of a &quot;Distribution&quot; parameter. The value 
+                                                                for most &quot;Distribution&quot; parameters are interchangeable and extensible. --&gt;
+                                                        &lt;key&gt;eventStartDistribution&lt;/key&gt;
+                                                        &lt;dict&gt;
+
+                                                                &lt;!-- 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. --&gt;
+                                                                &lt;key&gt;type&lt;/key&gt;
+                                                                &lt;string&gt;contrib.performance.stats.WorkDistribution&lt;/string&gt;
+
+                                                                &lt;key&gt;params&lt;/key&gt;
+                                                                &lt;dict&gt;
+                                                                        &lt;!-- These are the days of the week the distribution will use. --&gt;
+                                                                        &lt;key&gt;daysOfWeek&lt;/key&gt;
+                                                                        &lt;array&gt;
+                                                                                &lt;string&gt;mon&lt;/string&gt;
+                                                                                &lt;string&gt;tue&lt;/string&gt;
+                                                                                &lt;string&gt;wed&lt;/string&gt;
+                                                                                &lt;string&gt;thu&lt;/string&gt;
+                                                                                &lt;string&gt;fri&lt;/string&gt;
+                                                                        &lt;/array&gt;
+
+                                                                        &lt;!-- The earliest hour of a day at which an event might be scheduled. --&gt;
+                                                                        &lt;key&gt;beginHour&lt;/key&gt;
+                                                                        &lt;integer&gt;8&lt;/integer&gt;
+
+                                                                        &lt;!-- And the latest hour of a day (at which an event will be scheduled 
+                                                                                to begin!). --&gt;
+                                                                        &lt;key&gt;endHour&lt;/key&gt;
+                                                                        &lt;integer&gt;16&lt;/integer&gt;
+
+                                                                        &lt;!-- The timezone in which the event is scheduled. (XXX Does this 
+                                                                                really work right?) --&gt;
+                                                                        &lt;key&gt;tzname&lt;/key&gt;
+                                                                        &lt;string&gt;America/Los_Angeles&lt;/string&gt;
+                                                                &lt;/dict&gt;
+                                                        &lt;/dict&gt;
+
+                                                        &lt;!-- Define how recurrences are created. --&gt;
+                                                        &lt;key&gt;recurrenceDistribution&lt;/key&gt;
+                                                        &lt;dict&gt;
+
+                                                                &lt;!-- This distribution is pretty specialized.  We have a fixed set of
+                                                                     RRULEs defined for this distribution and pick each based on a
+                                                                     weight. --&gt;
+                                                                &lt;key&gt;type&lt;/key&gt;
+                                                                &lt;string&gt;contrib.performance.stats.RecurrenceDistribution&lt;/string&gt;
+
+                                                                &lt;key&gt;params&lt;/key&gt;
+                                                                &lt;dict&gt;
+                                                                        &lt;!-- False to disable RRULEs --&gt;
+                                                                        &lt;key&gt;allowRecurrence&lt;/key&gt;
+                                                                        &lt;true/&gt;
+
+                                                                        &lt;!-- These are the weights for the specific set of RRULEs. --&gt;
+                                                                        &lt;key&gt;weights&lt;/key&gt;
+                                                                        &lt;dict&gt;
+                                                                                &lt;!-- Half of all events will be non-recurring --&gt;
+                                                                                &lt;key&gt;none&lt;/key&gt;
+                                                                                &lt;integer&gt;50&lt;/integer&gt;
+                                                                                
+                                                                                &lt;!-- Daily and weekly are pretty common --&gt;
+                                                                                &lt;key&gt;daily&lt;/key&gt;
+                                                                                &lt;integer&gt;10&lt;/integer&gt;
+                                                                                &lt;key&gt;weekly&lt;/key&gt;
+                                                                                &lt;integer&gt;20&lt;/integer&gt;
+                                                                                
+                                                                                &lt;!-- Monthly, yearly, daily &amp; weekly limit not so common --&gt;
+                                                                                &lt;key&gt;monthly&lt;/key&gt;
+                                                                                &lt;integer&gt;2&lt;/integer&gt;
+                                                                                &lt;key&gt;yearly&lt;/key&gt;
+                                                                                &lt;integer&gt;1&lt;/integer&gt;
+                                                                                &lt;key&gt;dailylimit&lt;/key&gt;
+                                                                                &lt;integer&gt;2&lt;/integer&gt;
+                                                                                &lt;key&gt;weeklylimit&lt;/key&gt;
+                                                                                &lt;integer&gt;5&lt;/integer&gt;
+                                                                                
+                                                                                &lt;!-- Work days pretty common --&gt;
+                                                                                &lt;key&gt;workdays&lt;/key&gt;
+                                                                                &lt;integer&gt;10&lt;/integer&gt;
+                                                                        &lt;/dict&gt;
+                                                                &lt;/dict&gt;
+                                                        &lt;/dict&gt;
+                                                &lt;/dict&gt;
+                                        &lt;/dict&gt;
+
+                                        &lt;!-- This profile accepts invitations to events, handles cancels, and
+                                             handles replies received. --&gt;
+                                        &lt;dict&gt;
+                                                &lt;key&gt;class&lt;/key&gt;
+                                                &lt;string&gt;contrib.performance.loadtest.profiles.Accepter&lt;/string&gt;
+
+                                                &lt;key&gt;params&lt;/key&gt;
+                                                &lt;dict&gt;
+                                                        &lt;key&gt;enabled&lt;/key&gt;
+                                                        &lt;false/&gt;
+
+                                                        &lt;!-- Define how long to wait after seeing a new invitation before
+                                                                accepting it.
+
+                                                                For LogNormal &quot;mode&quot; is the peak, &quot;median&quot; is the 50% cummulative value
+                                                                (i.e., half of the user have accepted by that time).                                                                
+                                                        --&gt;
+                                                        &lt;key&gt;acceptDelayDistribution&lt;/key&gt;
+                                                        &lt;dict&gt;
+                                                                &lt;key&gt;type&lt;/key&gt;
+                                                                &lt;string&gt;contrib.performance.stats.LogNormalDistribution&lt;/string&gt;
+                                                                &lt;key&gt;params&lt;/key&gt;
+                                                                &lt;dict&gt;
+                                                                        &lt;!-- mode - peak--&gt;
+                                                                        &lt;key&gt;mode&lt;/key&gt;
+                                                                        &lt;integer&gt;300&lt;/integer&gt;
+                                                                        &lt;!-- median - 50% done--&gt;
+                                                                        &lt;key&gt;median&lt;/key&gt;
+                                                                        &lt;integer&gt;1800&lt;/integer&gt;
+                                                                &lt;/dict&gt;
+                                                        &lt;/dict&gt;
+                                                &lt;/dict&gt;
+                                        &lt;/dict&gt;
+
+                                        &lt;!-- A task-creating profile, which will periodically create 
+                                                new tasks at a random time on a random calendar. --&gt;
+                                        &lt;dict&gt;
+                                                &lt;key&gt;class&lt;/key&gt;
+                                                &lt;string&gt;contrib.performance.loadtest.profiles.Tasker&lt;/string&gt;
+
+                                                &lt;key&gt;params&lt;/key&gt;
+                                                &lt;dict&gt;
+                                                        &lt;key&gt;enabled&lt;/key&gt;
+                                                        &lt;false/&gt;
+
+                                                        &lt;!-- Define the interval (in seconds) at which this profile will use 
+                                                                its client to create a new task. --&gt;
+                                                        &lt;key&gt;interval&lt;/key&gt;
+                                                        &lt;integer&gt;300&lt;/integer&gt;
+
+                                                        &lt;!-- Define how due times (DUE) for the randomly generated tasks 
+                                                                will be selected. This is an example of a &quot;Distribution&quot; parameter. The value 
+                                                                for most &quot;Distribution&quot; parameters are interchangeable and extensible. --&gt;
+                                                        &lt;key&gt;taskDueDistribution&lt;/key&gt;
+                                                        &lt;dict&gt;
+
+                                                                &lt;!-- 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. --&gt;
+                                                                &lt;key&gt;type&lt;/key&gt;
+                                                                &lt;string&gt;contrib.performance.stats.WorkDistribution&lt;/string&gt;
+
+                                                                &lt;key&gt;params&lt;/key&gt;
+                                                                &lt;dict&gt;
+                                                                        &lt;!-- These are the days of the week the distribution will use. --&gt;
+                                                                        &lt;key&gt;daysOfWeek&lt;/key&gt;
+                                                                        &lt;array&gt;
+                                                                                &lt;string&gt;mon&lt;/string&gt;
+                                                                                &lt;string&gt;tue&lt;/string&gt;
+                                                                                &lt;string&gt;wed&lt;/string&gt;
+                                                                                &lt;string&gt;thu&lt;/string&gt;
+                                                                                &lt;string&gt;fri&lt;/string&gt;
+                                                                        &lt;/array&gt;
+
+                                                                        &lt;!-- The earliest hour of a day at which an event might be scheduled. --&gt;
+                                                                        &lt;key&gt;beginHour&lt;/key&gt;
+                                                                        &lt;integer&gt;8&lt;/integer&gt;
+
+                                                                        &lt;!-- And the latest hour of a day (at which an event will be scheduled 
+                                                                                to begin!). --&gt;
+                                                                        &lt;key&gt;endHour&lt;/key&gt;
+                                                                        &lt;integer&gt;16&lt;/integer&gt;
+
+                                                                        &lt;!-- The timezone in which the event is scheduled. (XXX Does this 
+                                                                                really work right?) --&gt;
+                                                                        &lt;key&gt;tzname&lt;/key&gt;
+                                                                        &lt;string&gt;America/Los_Angeles&lt;/string&gt;
+                                                                &lt;/dict&gt;
+                                                        &lt;/dict&gt;
+                                                &lt;/dict&gt;
+                                        &lt;/dict&gt;
+
+                                &lt;/array&gt;
+
+                                &lt;!-- Determine the frequency at which this client configuration will 
+                                        appear in the clients which are created by the load tester. --&gt;
+                                &lt;key&gt;weight&lt;/key&gt;
+                                &lt;integer&gt;1&lt;/integer&gt;
+                        &lt;/dict&gt;
+                &lt;/array&gt;
+        &lt;/dict&gt;
+&lt;/plist&gt;
</ins></span></pre></div>
<a id="CalendarServertrunkcontribperformanceloadteststandardconfigseventsonlyplist"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/contrib/performance/loadtest/standard-configs/events-only.plist (13790 => 13791)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -165,6 +165,109 @@
</span><span class="cx">                                                 &lt;/dict&gt;
</span><span class="cx">                                         &lt;/dict&gt;
</span><span class="cx"> 
</span><ins>+                                        &lt;!-- This profile will create a new event, and then periodically update the ACKNOWLEDGED property. --&gt;
+                                        &lt;dict&gt;
+                                                &lt;key&gt;class&lt;/key&gt;
+                                                &lt;string&gt;contrib.performance.loadtest.profiles.EventUpdater&lt;/string&gt;
+
+                                                &lt;key&gt;params&lt;/key&gt;
+                                                &lt;dict&gt;
+                                                        &lt;key&gt;enabled&lt;/key&gt;
+                                                        &lt;false/&gt;
+
+                                                        &lt;!-- Define the interval (in seconds) at which this profile will use
+                                                                its client to create a new event. --&gt;
+                                                        &lt;key&gt;interval&lt;/key&gt;
+                                                        &lt;integer&gt;5&lt;/integer&gt;
+
+                                                        &lt;!-- Define how start times (DTSTART) for the randomly generated events
+                                                                will be selected. This is an example of a &quot;Distribution&quot; parameter. The value
+                                                                for most &quot;Distribution&quot; parameters are interchangeable and extensible. --&gt;
+                                                        &lt;key&gt;eventStartDistribution&lt;/key&gt;
+                                                        &lt;dict&gt;
+
+                                                                &lt;!-- 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. --&gt;
+                                                                &lt;key&gt;type&lt;/key&gt;
+                                                                &lt;string&gt;contrib.performance.stats.WorkDistribution&lt;/string&gt;
+
+                                                                &lt;key&gt;params&lt;/key&gt;
+                                                                &lt;dict&gt;
+                                                                        &lt;!-- These are the days of the week the distribution will use. --&gt;
+                                                                        &lt;key&gt;daysOfWeek&lt;/key&gt;
+                                                                        &lt;array&gt;
+                                                                                &lt;string&gt;mon&lt;/string&gt;
+                                                                                &lt;string&gt;tue&lt;/string&gt;
+                                                                                &lt;string&gt;wed&lt;/string&gt;
+                                                                                &lt;string&gt;thu&lt;/string&gt;
+                                                                                &lt;string&gt;fri&lt;/string&gt;
+                                                                        &lt;/array&gt;
+
+                                                                        &lt;!-- The earliest hour of a day at which an event might be scheduled. --&gt;
+                                                                        &lt;key&gt;beginHour&lt;/key&gt;
+                                                                        &lt;integer&gt;8&lt;/integer&gt;
+
+                                                                        &lt;!-- And the latest hour of a day (at which an event will be scheduled
+                                                                                to begin!). --&gt;
+                                                                        &lt;key&gt;endHour&lt;/key&gt;
+                                                                        &lt;integer&gt;16&lt;/integer&gt;
+
+                                                                        &lt;!-- The timezone in which the event is scheduled. (XXX Does this
+                                                                                really work right?) --&gt;
+                                                                        &lt;key&gt;tzname&lt;/key&gt;
+                                                                        &lt;string&gt;America/Los_Angeles&lt;/string&gt;
+                                                                &lt;/dict&gt;
+                                                        &lt;/dict&gt;
+
+                                                        &lt;!-- Define how recurrences are created. --&gt;
+                                                        &lt;key&gt;recurrenceDistribution&lt;/key&gt;
+                                                        &lt;dict&gt;
+
+                                                                &lt;!-- This distribution is pretty specialized.  We have a fixed set of
+                                                                     RRULEs defined for this distribution and pick each based on a
+                                                                     weight. --&gt;
+                                                                &lt;key&gt;type&lt;/key&gt;
+                                                                &lt;string&gt;contrib.performance.stats.RecurrenceDistribution&lt;/string&gt;
+
+                                                                &lt;key&gt;params&lt;/key&gt;
+                                                                &lt;dict&gt;
+                                                                        &lt;!-- False to disable RRULEs --&gt;
+                                                                        &lt;key&gt;allowRecurrence&lt;/key&gt;
+                                                                        &lt;true/&gt;
+
+                                                                        &lt;!-- These are the weights for the specific set of RRULEs. --&gt;
+                                                                        &lt;key&gt;weights&lt;/key&gt;
+                                                                        &lt;dict&gt;
+                                                                                &lt;!-- Half of all events will be non-recurring --&gt;
+                                                                                &lt;key&gt;none&lt;/key&gt;
+                                                                                &lt;integer&gt;50&lt;/integer&gt;
+                                                                                
+                                                                                &lt;!-- Daily and weekly are pretty common --&gt;
+                                                                                &lt;key&gt;daily&lt;/key&gt;
+                                                                                &lt;integer&gt;25&lt;/integer&gt;
+                                                                                &lt;key&gt;weekly&lt;/key&gt;
+                                                                                &lt;integer&gt;25&lt;/integer&gt;
+                                                                                
+                                                                                &lt;!-- Monthly, yearly, daily &amp; weekly limit not so common --&gt;
+                                                                                &lt;key&gt;monthly&lt;/key&gt;
+                                                                                &lt;integer&gt;0&lt;/integer&gt;
+                                                                                &lt;key&gt;yearly&lt;/key&gt;
+                                                                                &lt;integer&gt;0&lt;/integer&gt;
+                                                                                &lt;key&gt;dailylimit&lt;/key&gt;
+                                                                                &lt;integer&gt;0&lt;/integer&gt;
+                                                                                &lt;key&gt;weeklylimit&lt;/key&gt;
+                                                                                &lt;integer&gt;0&lt;/integer&gt;
+                                                                                
+                                                                                &lt;!-- Work days pretty common --&gt;
+                                                                                &lt;key&gt;workdays&lt;/key&gt;
+                                                                                &lt;integer&gt;0&lt;/integer&gt;
+                                                                        &lt;/dict&gt;
+                                                                &lt;/dict&gt;
+                                                        &lt;/dict&gt;
+                                                &lt;/dict&gt;
+                                        &lt;/dict&gt;
+
</ins><span class="cx">                                         &lt;!-- This profile invites some number of new attendees to new events. --&gt;
</span><span class="cx">                                         &lt;dict&gt;
</span><span class="cx">                                                 &lt;key&gt;class&lt;/key&gt;
</span></span></pre></div>
<a id="CalendarServertrunkcontribperformanceloadteststandardconfigsinvitesacceptsplist"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/contrib/performance/loadtest/standard-configs/invites-accepts.plist (13790 => 13791)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -165,6 +165,109 @@
</span><span class="cx">                                                 &lt;/dict&gt;
</span><span class="cx">                                         &lt;/dict&gt;
</span><span class="cx"> 
</span><ins>+                                        &lt;!-- This profile will create a new event, and then periodically update the ACKNOWLEDGED property. --&gt;
+                                        &lt;dict&gt;
+                                                &lt;key&gt;class&lt;/key&gt;
+                                                &lt;string&gt;contrib.performance.loadtest.profiles.EventUpdater&lt;/string&gt;
+
+                                                &lt;key&gt;params&lt;/key&gt;
+                                                &lt;dict&gt;
+                                                        &lt;key&gt;enabled&lt;/key&gt;
+                                                        &lt;false/&gt;
+
+                                                        &lt;!-- Define the interval (in seconds) at which this profile will use
+                                                                its client to create a new event. --&gt;
+                                                        &lt;key&gt;interval&lt;/key&gt;
+                                                        &lt;integer&gt;5&lt;/integer&gt;
+
+                                                        &lt;!-- Define how start times (DTSTART) for the randomly generated events
+                                                                will be selected. This is an example of a &quot;Distribution&quot; parameter. The value
+                                                                for most &quot;Distribution&quot; parameters are interchangeable and extensible. --&gt;
+                                                        &lt;key&gt;eventStartDistribution&lt;/key&gt;
+                                                        &lt;dict&gt;
+
+                                                                &lt;!-- 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. --&gt;
+                                                                &lt;key&gt;type&lt;/key&gt;
+                                                                &lt;string&gt;contrib.performance.stats.WorkDistribution&lt;/string&gt;
+
+                                                                &lt;key&gt;params&lt;/key&gt;
+                                                                &lt;dict&gt;
+                                                                        &lt;!-- These are the days of the week the distribution will use. --&gt;
+                                                                        &lt;key&gt;daysOfWeek&lt;/key&gt;
+                                                                        &lt;array&gt;
+                                                                                &lt;string&gt;mon&lt;/string&gt;
+                                                                                &lt;string&gt;tue&lt;/string&gt;
+                                                                                &lt;string&gt;wed&lt;/string&gt;
+                                                                                &lt;string&gt;thu&lt;/string&gt;
+                                                                                &lt;string&gt;fri&lt;/string&gt;
+                                                                        &lt;/array&gt;
+
+                                                                        &lt;!-- The earliest hour of a day at which an event might be scheduled. --&gt;
+                                                                        &lt;key&gt;beginHour&lt;/key&gt;
+                                                                        &lt;integer&gt;8&lt;/integer&gt;
+
+                                                                        &lt;!-- And the latest hour of a day (at which an event will be scheduled
+                                                                                to begin!). --&gt;
+                                                                        &lt;key&gt;endHour&lt;/key&gt;
+                                                                        &lt;integer&gt;16&lt;/integer&gt;
+
+                                                                        &lt;!-- The timezone in which the event is scheduled. (XXX Does this
+                                                                                really work right?) --&gt;
+                                                                        &lt;key&gt;tzname&lt;/key&gt;
+                                                                        &lt;string&gt;America/Los_Angeles&lt;/string&gt;
+                                                                &lt;/dict&gt;
+                                                        &lt;/dict&gt;
+
+                                                        &lt;!-- Define how recurrences are created. --&gt;
+                                                        &lt;key&gt;recurrenceDistribution&lt;/key&gt;
+                                                        &lt;dict&gt;
+
+                                                                &lt;!-- This distribution is pretty specialized.  We have a fixed set of
+                                                                     RRULEs defined for this distribution and pick each based on a
+                                                                     weight. --&gt;
+                                                                &lt;key&gt;type&lt;/key&gt;
+                                                                &lt;string&gt;contrib.performance.stats.RecurrenceDistribution&lt;/string&gt;
+
+                                                                &lt;key&gt;params&lt;/key&gt;
+                                                                &lt;dict&gt;
+                                                                        &lt;!-- False to disable RRULEs --&gt;
+                                                                        &lt;key&gt;allowRecurrence&lt;/key&gt;
+                                                                        &lt;true/&gt;
+
+                                                                        &lt;!-- These are the weights for the specific set of RRULEs. --&gt;
+                                                                        &lt;key&gt;weights&lt;/key&gt;
+                                                                        &lt;dict&gt;
+                                                                                &lt;!-- Half of all events will be non-recurring --&gt;
+                                                                                &lt;key&gt;none&lt;/key&gt;
+                                                                                &lt;integer&gt;50&lt;/integer&gt;
+                                                                                
+                                                                                &lt;!-- Daily and weekly are pretty common --&gt;
+                                                                                &lt;key&gt;daily&lt;/key&gt;
+                                                                                &lt;integer&gt;25&lt;/integer&gt;
+                                                                                &lt;key&gt;weekly&lt;/key&gt;
+                                                                                &lt;integer&gt;25&lt;/integer&gt;
+                                                                                
+                                                                                &lt;!-- Monthly, yearly, daily &amp; weekly limit not so common --&gt;
+                                                                                &lt;key&gt;monthly&lt;/key&gt;
+                                                                                &lt;integer&gt;0&lt;/integer&gt;
+                                                                                &lt;key&gt;yearly&lt;/key&gt;
+                                                                                &lt;integer&gt;0&lt;/integer&gt;
+                                                                                &lt;key&gt;dailylimit&lt;/key&gt;
+                                                                                &lt;integer&gt;0&lt;/integer&gt;
+                                                                                &lt;key&gt;weeklylimit&lt;/key&gt;
+                                                                                &lt;integer&gt;0&lt;/integer&gt;
+                                                                                
+                                                                                &lt;!-- Work days pretty common --&gt;
+                                                                                &lt;key&gt;workdays&lt;/key&gt;
+                                                                                &lt;integer&gt;0&lt;/integer&gt;
+                                                                        &lt;/dict&gt;
+                                                                &lt;/dict&gt;
+                                                        &lt;/dict&gt;
+                                                &lt;/dict&gt;
+                                        &lt;/dict&gt;
+
</ins><span class="cx">                                         &lt;!-- This profile invites some number of new attendees to new events. --&gt;
</span><span class="cx">                                         &lt;dict&gt;
</span><span class="cx">                                                 &lt;key&gt;class&lt;/key&gt;
</span></span></pre></div>
<a id="CalendarServertrunkcontribperformanceloadteststandardconfigsinvitesonlyrecurringplist"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/contrib/performance/loadtest/standard-configs/invites-only-recurring.plist (13790 => 13791)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -165,6 +165,109 @@
</span><span class="cx">                                                 &lt;/dict&gt;
</span><span class="cx">                                         &lt;/dict&gt;
</span><span class="cx"> 
</span><ins>+                                        &lt;!-- This profile will create a new event, and then periodically update the ACKNOWLEDGED property. --&gt;
+                                        &lt;dict&gt;
+                                                &lt;key&gt;class&lt;/key&gt;
+                                                &lt;string&gt;contrib.performance.loadtest.profiles.EventUpdater&lt;/string&gt;
+
+                                                &lt;key&gt;params&lt;/key&gt;
+                                                &lt;dict&gt;
+                                                        &lt;key&gt;enabled&lt;/key&gt;
+                                                        &lt;false/&gt;
+
+                                                        &lt;!-- Define the interval (in seconds) at which this profile will use
+                                                                its client to create a new event. --&gt;
+                                                        &lt;key&gt;interval&lt;/key&gt;
+                                                        &lt;integer&gt;5&lt;/integer&gt;
+
+                                                        &lt;!-- Define how start times (DTSTART) for the randomly generated events
+                                                                will be selected. This is an example of a &quot;Distribution&quot; parameter. The value
+                                                                for most &quot;Distribution&quot; parameters are interchangeable and extensible. --&gt;
+                                                        &lt;key&gt;eventStartDistribution&lt;/key&gt;
+                                                        &lt;dict&gt;
+
+                                                                &lt;!-- 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. --&gt;
+                                                                &lt;key&gt;type&lt;/key&gt;
+                                                                &lt;string&gt;contrib.performance.stats.WorkDistribution&lt;/string&gt;
+
+                                                                &lt;key&gt;params&lt;/key&gt;
+                                                                &lt;dict&gt;
+                                                                        &lt;!-- These are the days of the week the distribution will use. --&gt;
+                                                                        &lt;key&gt;daysOfWeek&lt;/key&gt;
+                                                                        &lt;array&gt;
+                                                                                &lt;string&gt;mon&lt;/string&gt;
+                                                                                &lt;string&gt;tue&lt;/string&gt;
+                                                                                &lt;string&gt;wed&lt;/string&gt;
+                                                                                &lt;string&gt;thu&lt;/string&gt;
+                                                                                &lt;string&gt;fri&lt;/string&gt;
+                                                                        &lt;/array&gt;
+
+                                                                        &lt;!-- The earliest hour of a day at which an event might be scheduled. --&gt;
+                                                                        &lt;key&gt;beginHour&lt;/key&gt;
+                                                                        &lt;integer&gt;8&lt;/integer&gt;
+
+                                                                        &lt;!-- And the latest hour of a day (at which an event will be scheduled
+                                                                                to begin!). --&gt;
+                                                                        &lt;key&gt;endHour&lt;/key&gt;
+                                                                        &lt;integer&gt;16&lt;/integer&gt;
+
+                                                                        &lt;!-- The timezone in which the event is scheduled. (XXX Does this
+                                                                                really work right?) --&gt;
+                                                                        &lt;key&gt;tzname&lt;/key&gt;
+                                                                        &lt;string&gt;America/Los_Angeles&lt;/string&gt;
+                                                                &lt;/dict&gt;
+                                                        &lt;/dict&gt;
+
+                                                        &lt;!-- Define how recurrences are created. --&gt;
+                                                        &lt;key&gt;recurrenceDistribution&lt;/key&gt;
+                                                        &lt;dict&gt;
+
+                                                                &lt;!-- This distribution is pretty specialized.  We have a fixed set of
+                                                                     RRULEs defined for this distribution and pick each based on a
+                                                                     weight. --&gt;
+                                                                &lt;key&gt;type&lt;/key&gt;
+                                                                &lt;string&gt;contrib.performance.stats.RecurrenceDistribution&lt;/string&gt;
+
+                                                                &lt;key&gt;params&lt;/key&gt;
+                                                                &lt;dict&gt;
+                                                                        &lt;!-- False to disable RRULEs --&gt;
+                                                                        &lt;key&gt;allowRecurrence&lt;/key&gt;
+                                                                        &lt;true/&gt;
+
+                                                                        &lt;!-- These are the weights for the specific set of RRULEs. --&gt;
+                                                                        &lt;key&gt;weights&lt;/key&gt;
+                                                                        &lt;dict&gt;
+                                                                                &lt;!-- Half of all events will be non-recurring --&gt;
+                                                                                &lt;key&gt;none&lt;/key&gt;
+                                                                                &lt;integer&gt;50&lt;/integer&gt;
+                                                                                
+                                                                                &lt;!-- Daily and weekly are pretty common --&gt;
+                                                                                &lt;key&gt;daily&lt;/key&gt;
+                                                                                &lt;integer&gt;25&lt;/integer&gt;
+                                                                                &lt;key&gt;weekly&lt;/key&gt;
+                                                                                &lt;integer&gt;25&lt;/integer&gt;
+                                                                                
+                                                                                &lt;!-- Monthly, yearly, daily &amp; weekly limit not so common --&gt;
+                                                                                &lt;key&gt;monthly&lt;/key&gt;
+                                                                                &lt;integer&gt;0&lt;/integer&gt;
+                                                                                &lt;key&gt;yearly&lt;/key&gt;
+                                                                                &lt;integer&gt;0&lt;/integer&gt;
+                                                                                &lt;key&gt;dailylimit&lt;/key&gt;
+                                                                                &lt;integer&gt;0&lt;/integer&gt;
+                                                                                &lt;key&gt;weeklylimit&lt;/key&gt;
+                                                                                &lt;integer&gt;0&lt;/integer&gt;
+                                                                                
+                                                                                &lt;!-- Work days pretty common --&gt;
+                                                                                &lt;key&gt;workdays&lt;/key&gt;
+                                                                                &lt;integer&gt;0&lt;/integer&gt;
+                                                                        &lt;/dict&gt;
+                                                                &lt;/dict&gt;
+                                                        &lt;/dict&gt;
+                                                &lt;/dict&gt;
+                                        &lt;/dict&gt;
+
</ins><span class="cx">                                         &lt;!-- This profile invites some number of new attendees to new events. --&gt;
</span><span class="cx">                                         &lt;dict&gt;
</span><span class="cx">                                                 &lt;key&gt;class&lt;/key&gt;
</span></span></pre></div>
<a id="CalendarServertrunkcontribperformanceloadteststandardconfigsinvitesonlyplist"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/contrib/performance/loadtest/standard-configs/invites-only.plist (13790 => 13791)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -165,6 +165,109 @@
</span><span class="cx">                                                 &lt;/dict&gt;
</span><span class="cx">                                         &lt;/dict&gt;
</span><span class="cx"> 
</span><ins>+                                        &lt;!-- This profile will create a new event, and then periodically update the ACKNOWLEDGED property. --&gt;
+                                        &lt;dict&gt;
+                                                &lt;key&gt;class&lt;/key&gt;
+                                                &lt;string&gt;contrib.performance.loadtest.profiles.EventUpdater&lt;/string&gt;
+
+                                                &lt;key&gt;params&lt;/key&gt;
+                                                &lt;dict&gt;
+                                                        &lt;key&gt;enabled&lt;/key&gt;
+                                                        &lt;false/&gt;
+
+                                                        &lt;!-- Define the interval (in seconds) at which this profile will use
+                                                                its client to create a new event. --&gt;
+                                                        &lt;key&gt;interval&lt;/key&gt;
+                                                        &lt;integer&gt;5&lt;/integer&gt;
+
+                                                        &lt;!-- Define how start times (DTSTART) for the randomly generated events
+                                                                will be selected. This is an example of a &quot;Distribution&quot; parameter. The value
+                                                                for most &quot;Distribution&quot; parameters are interchangeable and extensible. --&gt;
+                                                        &lt;key&gt;eventStartDistribution&lt;/key&gt;
+                                                        &lt;dict&gt;
+
+                                                                &lt;!-- 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. --&gt;
+                                                                &lt;key&gt;type&lt;/key&gt;
+                                                                &lt;string&gt;contrib.performance.stats.WorkDistribution&lt;/string&gt;
+
+                                                                &lt;key&gt;params&lt;/key&gt;
+                                                                &lt;dict&gt;
+                                                                        &lt;!-- These are the days of the week the distribution will use. --&gt;
+                                                                        &lt;key&gt;daysOfWeek&lt;/key&gt;
+                                                                        &lt;array&gt;
+                                                                                &lt;string&gt;mon&lt;/string&gt;
+                                                                                &lt;string&gt;tue&lt;/string&gt;
+                                                                                &lt;string&gt;wed&lt;/string&gt;
+                                                                                &lt;string&gt;thu&lt;/string&gt;
+                                                                                &lt;string&gt;fri&lt;/string&gt;
+                                                                        &lt;/array&gt;
+
+                                                                        &lt;!-- The earliest hour of a day at which an event might be scheduled. --&gt;
+                                                                        &lt;key&gt;beginHour&lt;/key&gt;
+                                                                        &lt;integer&gt;8&lt;/integer&gt;
+
+                                                                        &lt;!-- And the latest hour of a day (at which an event will be scheduled
+                                                                                to begin!). --&gt;
+                                                                        &lt;key&gt;endHour&lt;/key&gt;
+                                                                        &lt;integer&gt;16&lt;/integer&gt;
+
+                                                                        &lt;!-- The timezone in which the event is scheduled. (XXX Does this
+                                                                                really work right?) --&gt;
+                                                                        &lt;key&gt;tzname&lt;/key&gt;
+                                                                        &lt;string&gt;America/Los_Angeles&lt;/string&gt;
+                                                                &lt;/dict&gt;
+                                                        &lt;/dict&gt;
+
+                                                        &lt;!-- Define how recurrences are created. --&gt;
+                                                        &lt;key&gt;recurrenceDistribution&lt;/key&gt;
+                                                        &lt;dict&gt;
+
+                                                                &lt;!-- This distribution is pretty specialized.  We have a fixed set of
+                                                                     RRULEs defined for this distribution and pick each based on a
+                                                                     weight. --&gt;
+                                                                &lt;key&gt;type&lt;/key&gt;
+                                                                &lt;string&gt;contrib.performance.stats.RecurrenceDistribution&lt;/string&gt;
+
+                                                                &lt;key&gt;params&lt;/key&gt;
+                                                                &lt;dict&gt;
+                                                                        &lt;!-- False to disable RRULEs --&gt;
+                                                                        &lt;key&gt;allowRecurrence&lt;/key&gt;
+                                                                        &lt;true/&gt;
+
+                                                                        &lt;!-- These are the weights for the specific set of RRULEs. --&gt;
+                                                                        &lt;key&gt;weights&lt;/key&gt;
+                                                                        &lt;dict&gt;
+                                                                                &lt;!-- Half of all events will be non-recurring --&gt;
+                                                                                &lt;key&gt;none&lt;/key&gt;
+                                                                                &lt;integer&gt;50&lt;/integer&gt;
+                                                                                
+                                                                                &lt;!-- Daily and weekly are pretty common --&gt;
+                                                                                &lt;key&gt;daily&lt;/key&gt;
+                                                                                &lt;integer&gt;25&lt;/integer&gt;
+                                                                                &lt;key&gt;weekly&lt;/key&gt;
+                                                                                &lt;integer&gt;25&lt;/integer&gt;
+                                                                                
+                                                                                &lt;!-- Monthly, yearly, daily &amp; weekly limit not so common --&gt;
+                                                                                &lt;key&gt;monthly&lt;/key&gt;
+                                                                                &lt;integer&gt;0&lt;/integer&gt;
+                                                                                &lt;key&gt;yearly&lt;/key&gt;
+                                                                                &lt;integer&gt;0&lt;/integer&gt;
+                                                                                &lt;key&gt;dailylimit&lt;/key&gt;
+                                                                                &lt;integer&gt;0&lt;/integer&gt;
+                                                                                &lt;key&gt;weeklylimit&lt;/key&gt;
+                                                                                &lt;integer&gt;0&lt;/integer&gt;
+                                                                                
+                                                                                &lt;!-- Work days pretty common --&gt;
+                                                                                &lt;key&gt;workdays&lt;/key&gt;
+                                                                                &lt;integer&gt;0&lt;/integer&gt;
+                                                                        &lt;/dict&gt;
+                                                                &lt;/dict&gt;
+                                                        &lt;/dict&gt;
+                                                &lt;/dict&gt;
+                                        &lt;/dict&gt;
+
</ins><span class="cx">                                         &lt;!-- This profile invites some number of new attendees to new events. --&gt;
</span><span class="cx">                                         &lt;dict&gt;
</span><span class="cx">                                                 &lt;key&gt;class&lt;/key&gt;
</span></span></pre></div>
<a id="CalendarServertrunkcontribperformanceloadtesttest_populationpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/contrib/performance/loadtest/test_population.py (13790 => 13791)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -36,8 +36,9 @@
</span><span class="cx">         users = ['user01', 'user02', 'user03']
</span><span class="cx">         for user in users:
</span><span class="cx">             logger.observe(dict(
</span><del>-                    type='response', method='GET', success=True,
-                    duration=1.23, user=user, client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+                type='response', method='GET', success=True,
+                duration=1.23, user=user, client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+            ))
</ins><span class="cx">         self.assertEqual(len(users), logger.countUsers())
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -50,8 +51,9 @@
</span><span class="cx">         clients = ['c01', 'c02', 'c03']
</span><span class="cx">         for client in clients:
</span><span class="cx">             logger.observe(dict(
</span><del>-                    type='response', method='GET', success=True,
-                    duration=1.23, user=&quot;user01&quot;, client_type=&quot;test&quot;, client_id=client))
</del><ins>+                type='response', method='GET', success=True,
+                duration=1.23, user=&quot;user01&quot;, client_type=&quot;test&quot;, client_id=client
+            ))
</ins><span class="cx">         self.assertEqual(len(clients), logger.countClients())
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -64,7 +66,8 @@
</span><span class="cx">         clients = ['c01', 'c02', 'c03']
</span><span class="cx">         for client in clients:
</span><span class="cx">             logger.observe(dict(
</span><del>-                    type='client-failure', reason=&quot;testing %s&quot; % (client,)))
</del><ins>+                type='client-failure', reason=&quot;testing %s&quot; % (client,)
+            ))
</ins><span class="cx">         self.assertEqual(len(clients), logger.countClientFailures())
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -77,7 +80,8 @@
</span><span class="cx">         clients = ['c01', 'c02', 'c03']
</span><span class="cx">         for client in clients:
</span><span class="cx">             logger.observe(dict(
</span><del>-                    type='sim-failure', reason=&quot;testing %s&quot; % (client,)))
</del><ins>+                type='sim-failure', reason=&quot;testing %s&quot; % (client,)
+            ))
</ins><span class="cx">         self.assertEqual(len(clients), logger.countSimFailures())
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -89,8 +93,9 @@
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx">         logger = ReportStatistics()
</span><span class="cx">         logger.observe(dict(
</span><del>-                type='response', method='GET', success=True,
-                duration=2.5, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+            type='response', method='GET', success=True,
+            duration=2.5, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+        ))
</ins><span class="cx">         self.assertEqual([], logger.failures())
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -102,11 +107,13 @@
</span><span class="cx">         logger = ReportStatistics()
</span><span class="cx">         for _ignore in range(98):
</span><span class="cx">             logger.observe(dict(
</span><del>-                    type='response', method='GET', success=True,
-                    duration=2.5, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+                type='response', method='GET', success=True,
+                duration=2.5, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+            ))
</ins><span class="cx">         logger.observe(dict(
</span><del>-                type='response', method='GET', success=False,
-                duration=2.5, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+            type='response', method='GET', success=False,
+            duration=2.5, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+        ))
</ins><span class="cx">         self.assertEqual(
</span><span class="cx">             [&quot;Greater than 1% GET failed&quot;],
</span><span class="cx">             logger.failures())
</span><span class="lines">@@ -121,12 +128,14 @@
</span><span class="cx">         logger = ReportStatistics()
</span><span class="cx">         for _ignore in range(94):
</span><span class="cx">             logger.observe(dict(
</span><del>-                    type='response', method='GET', success=True,
-                    duration=2.5, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+                type='response', method='GET', success=True,
+                duration=2.5, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+            ))
</ins><span class="cx">         for _ignore in range(5):
</span><span class="cx">             logger.observe(dict(
</span><del>-                    type='response', method='GET', success=True,
-                    duration=3.5, user='user02', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+                type='response', method='GET', success=True,
+                duration=3.5, user='user02', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+            ))
</ins><span class="cx">         self.assertEqual(
</span><span class="cx">             [&quot;Greater than 5% GET exceeded 3 second response time&quot;],
</span><span class="cx">             logger.failures())
</span><span class="lines">@@ -141,11 +150,13 @@
</span><span class="cx">         logger = ReportStatistics()
</span><span class="cx">         for _ignore in range(98):
</span><span class="cx">             logger.observe(dict(
</span><del>-                    type='response', method='GET', success=True,
-                    duration=2.5, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+                type='response', method='GET', success=True,
+                duration=2.5, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+            ))
</ins><span class="cx">         logger.observe(dict(
</span><del>-                type='response', method='GET', success=True,
-                duration=5.5, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+            type='response', method='GET', success=True,
+            duration=5.5, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+        ))
</ins><span class="cx">         self.assertEqual(
</span><span class="cx">             [&quot;Greater than 1% GET exceeded 5 second response time&quot;],
</span><span class="cx">             logger.failures())
</span><span class="lines">@@ -158,18 +169,22 @@
</span><span class="cx">         logger = ReportStatistics()
</span><span class="cx">         for _ignore in range(99):
</span><span class="cx">             logger.observe(dict(
</span><del>-                    type='response', method='GET', success=True,
-                    duration=2.5, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+                type='response', method='GET', success=True,
+                duration=2.5, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+            ))
</ins><span class="cx">             logger.observe(dict(
</span><del>-                    type='response', method='POST', success=True,
-                    duration=2.5, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+                type='response', method='POST', success=True,
+                duration=2.5, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+            ))
</ins><span class="cx"> 
</span><span class="cx">         logger.observe(dict(
</span><del>-                type='response', method='GET', success=False,
-                duration=2.5, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+            type='response', method='GET', success=False,
+            duration=2.5, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+        ))
</ins><span class="cx">         logger.observe(dict(
</span><del>-                type='response', method='POST', success=False,
-                duration=2.5, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+            type='response', method='POST', success=False,
+            duration=2.5, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+        ))
</ins><span class="cx"> 
</span><span class="cx">         self.assertEqual([], logger.failures())
</span><span class="cx"> 
</span><span class="lines">@@ -196,33 +211,41 @@
</span><span class="cx">         # -small below threshold
</span><span class="cx">         logger = ReportStatistics(thresholds=_thresholds)
</span><span class="cx">         logger.observe(dict(
</span><del>-                type='response', method='PUT{organizer-small}', success=True,
-                duration=0.2, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+            type='response', method='PUT{organizer-small}', success=True,
+            duration=0.2, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+        ))
</ins><span class="cx">         logger.observe(dict(
</span><del>-                type='response', method='PUT{organizer-small}', success=True,
-                duration=0.2, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+            type='response', method='PUT{organizer-small}', success=True,
+            duration=0.2, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+        ))
</ins><span class="cx">         logger.observe(dict(
</span><del>-                type='response', method='PUT{organizer-small}', success=True,
-                duration=0.2, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+            type='response', method='PUT{organizer-small}', success=True,
+            duration=0.2, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+        ))
</ins><span class="cx">         logger.observe(dict(
</span><del>-                type='response', method='PUT{organizer-small}', success=True,
-                duration=0.2, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+            type='response', method='PUT{organizer-small}', success=True,
+            duration=0.2, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+        ))
</ins><span class="cx">         self.assertEqual([], logger.failures())
</span><span class="cx"> 
</span><span class="cx">         # -small above 0.5 threshold
</span><span class="cx">         logger = ReportStatistics(thresholds=_thresholds)
</span><span class="cx">         logger.observe(dict(
</span><del>-                type='response', method='PUT{organizer-small}', success=True,
-                duration=0.2, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+            type='response', method='PUT{organizer-small}', success=True,
+            duration=0.2, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+        ))
</ins><span class="cx">         logger.observe(dict(
</span><del>-                type='response', method='PUT{organizer-small}', success=True,
-                duration=0.6, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+            type='response', method='PUT{organizer-small}', success=True,
+            duration=0.6, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+        ))
</ins><span class="cx">         logger.observe(dict(
</span><del>-                type='response', method='PUT{organizer-small}', success=True,
-                duration=0.6, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+            type='response', method='PUT{organizer-small}', success=True,
+            duration=0.6, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+        ))
</ins><span class="cx">         logger.observe(dict(
</span><del>-                type='response', method='PUT{organizer-small}', success=True,
-                duration=0.6, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+            type='response', method='PUT{organizer-small}', success=True,
+            duration=0.6, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+        ))
</ins><span class="cx">         self.assertEqual(
</span><span class="cx">             [&quot;Greater than 50% PUT{organizer-small} exceeded 0.5 second response time&quot;],
</span><span class="cx">             logger.failures()
</span><span class="lines">@@ -231,17 +254,21 @@
</span><span class="cx">         # -medium below 0.5 threshold
</span><span class="cx">         logger = ReportStatistics(thresholds=_thresholds)
</span><span class="cx">         logger.observe(dict(
</span><del>-                type='response', method='PUT{organizer-medium}', success=True,
-                duration=0.2, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+            type='response', method='PUT{organizer-medium}', success=True,
+            duration=0.2, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+        ))
</ins><span class="cx">         logger.observe(dict(
</span><del>-                type='response', method='PUT{organizer-medium}', success=True,
-                duration=0.6, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+            type='response', method='PUT{organizer-medium}', success=True,
+            duration=0.6, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+        ))
</ins><span class="cx">         logger.observe(dict(
</span><del>-                type='response', method='PUT{organizer-medium}', success=True,
-                duration=0.6, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+            type='response', method='PUT{organizer-medium}', success=True,
+            duration=0.6, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+        ))
</ins><span class="cx">         logger.observe(dict(
</span><del>-                type='response', method='PUT{organizer-medium}', success=True,
-                duration=0.6, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+            type='response', method='PUT{organizer-medium}', success=True,
+            duration=0.6, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+        ))
</ins><span class="cx">         self.assertEqual(
</span><span class="cx">             [],
</span><span class="cx">             logger.failures()
</span><span class="lines">@@ -250,17 +277,21 @@
</span><span class="cx">         # -medium above 1.0 threshold
</span><span class="cx">         logger = ReportStatistics(thresholds=_thresholds)
</span><span class="cx">         logger.observe(dict(
</span><del>-                type='response', method='PUT{organizer-medium}', success=True,
-                duration=0.2, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+            type='response', method='PUT{organizer-medium}', success=True,
+            duration=0.2, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+        ))
</ins><span class="cx">         logger.observe(dict(
</span><del>-                type='response', method='PUT{organizer-medium}', success=True,
-                duration=1.6, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+            type='response', method='PUT{organizer-medium}', success=True,
+            duration=1.6, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+        ))
</ins><span class="cx">         logger.observe(dict(
</span><del>-                type='response', method='PUT{organizer-medium}', success=True,
-                duration=1.6, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+            type='response', method='PUT{organizer-medium}', success=True,
+            duration=1.6, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+        ))
</ins><span class="cx">         logger.observe(dict(
</span><del>-                type='response', method='PUT{organizer-medium}', success=True,
-                duration=1.6, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+            type='response', method='PUT{organizer-medium}', success=True,
+            duration=1.6, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+        ))
</ins><span class="cx">         self.assertEqual(
</span><span class="cx">             [&quot;Greater than 50% PUT{organizer-medium} exceeded 1 second response time&quot;],
</span><span class="cx">             logger.failures()
</span><span class="lines">@@ -269,17 +300,21 @@
</span><span class="cx">         # -large below 1.0 threshold
</span><span class="cx">         logger = ReportStatistics(thresholds=_thresholds)
</span><span class="cx">         logger.observe(dict(
</span><del>-                type='response', method='PUT{organizer-large}', success=True,
-                duration=0.2, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+            type='response', method='PUT{organizer-large}', success=True,
+            duration=0.2, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+        ))
</ins><span class="cx">         logger.observe(dict(
</span><del>-                type='response', method='PUT{organizer-large}', success=True,
-                duration=1.6, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+            type='response', method='PUT{organizer-large}', success=True,
+            duration=1.6, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+        ))
</ins><span class="cx">         logger.observe(dict(
</span><del>-                type='response', method='PUT{organizer-large}', success=True,
-                duration=1.6, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+            type='response', method='PUT{organizer-large}', success=True,
+            duration=1.6, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+        ))
</ins><span class="cx">         logger.observe(dict(
</span><del>-                type='response', method='PUT{organizer-large}', success=True,
-                duration=1.6, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+            type='response', method='PUT{organizer-large}', success=True,
+            duration=1.6, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+        ))
</ins><span class="cx">         self.assertEqual(
</span><span class="cx">             [],
</span><span class="cx">             logger.failures()
</span><span class="lines">@@ -288,17 +323,21 @@
</span><span class="cx">         # -large above 3.0 threshold
</span><span class="cx">         logger = ReportStatistics(thresholds=_thresholds)
</span><span class="cx">         logger.observe(dict(
</span><del>-                type='response', method='PUT{organizer-large}', success=True,
-                duration=0.2, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+            type='response', method='PUT{organizer-large}', success=True,
+            duration=0.2, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+        ))
</ins><span class="cx">         logger.observe(dict(
</span><del>-                type='response', method='PUT{organizer-large}', success=True,
-                duration=3.6, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+            type='response', method='PUT{organizer-large}', success=True,
+            duration=3.6, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+        ))
</ins><span class="cx">         logger.observe(dict(
</span><del>-                type='response', method='PUT{organizer-large}', success=True,
-                duration=3.6, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+            type='response', method='PUT{organizer-large}', success=True,
+            duration=3.6, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+        ))
</ins><span class="cx">         logger.observe(dict(
</span><del>-                type='response', method='PUT{organizer-large}', success=True,
-                duration=3.6, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+            type='response', method='PUT{organizer-large}', success=True,
+            duration=3.6, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+        ))
</ins><span class="cx">         self.assertEqual(
</span><span class="cx">             [&quot;Greater than 50% PUT{organizer-large} exceeded 3 second response time&quot;],
</span><span class="cx">             logger.failures()
</span><span class="lines">@@ -307,17 +346,21 @@
</span><span class="cx">         # -huge below 10.0 threshold
</span><span class="cx">         logger = ReportStatistics(thresholds=_thresholds)
</span><span class="cx">         logger.observe(dict(
</span><del>-                type='response', method='PUT{organizer-huge}', success=True,
-                duration=12.0, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+            type='response', method='PUT{organizer-huge}', success=True,
+            duration=12.0, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+        ))
</ins><span class="cx">         logger.observe(dict(
</span><del>-                type='response', method='PUT{organizer-huge}', success=True,
-                duration=8, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+            type='response', method='PUT{organizer-huge}', success=True,
+            duration=8, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+        ))
</ins><span class="cx">         logger.observe(dict(
</span><del>-                type='response', method='PUT{organizer-huge}', success=True,
-                duration=11.0, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+            type='response', method='PUT{organizer-huge}', success=True,
+            duration=11.0, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+        ))
</ins><span class="cx">         logger.observe(dict(
</span><del>-                type='response', method='PUT{organizer-huge}', success=True,
-                duration=9.0, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+            type='response', method='PUT{organizer-huge}', success=True,
+            duration=9.0, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+        ))
</ins><span class="cx">         self.assertEqual(
</span><span class="cx">             [],
</span><span class="cx">             logger.failures()
</span><span class="lines">@@ -326,17 +369,21 @@
</span><span class="cx">         # -huge above 10.0 threshold
</span><span class="cx">         logger = ReportStatistics(thresholds=_thresholds)
</span><span class="cx">         logger.observe(dict(
</span><del>-                type='response', method='PUT{organizer-huge}', success=True,
-                duration=12.0, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+            type='response', method='PUT{organizer-huge}', success=True,
+            duration=12.0, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+        ))
</ins><span class="cx">         logger.observe(dict(
</span><del>-                type='response', method='PUT{organizer-huge}', success=True,
-                duration=9.0, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+            type='response', method='PUT{organizer-huge}', success=True,
+            duration=9.0, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+        ))
</ins><span class="cx">         logger.observe(dict(
</span><del>-                type='response', method='PUT{organizer-huge}', success=True,
-                duration=12.0, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+            type='response', method='PUT{organizer-huge}', success=True,
+            duration=12.0, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+        ))
</ins><span class="cx">         logger.observe(dict(
</span><del>-                type='response', method='PUT{organizer-huge}', success=True,
-                duration=42.42, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;))
</del><ins>+            type='response', method='PUT{organizer-huge}', success=True,
+            duration=42.42, user='user01', client_type=&quot;test&quot;, client_id=&quot;1234&quot;
+        ))
</ins><span class="cx">         self.assertEqual(
</span><span class="cx">             [&quot;Greater than 50% PUT{organizer-huge} exceeded 10 second response time&quot;],
</span><span class="cx">             logger.failures()
</span></span></pre>
</div>
</div>

</body>
</html>