<!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)+"\n")
</del><ins>+ # from pprint import pformat
+ # self.output.write(pformat(event)+"\n")
</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">                                                 </dict>
</span><span class="cx">                                         </dict>
</span><span class="cx">
</span><ins>+                                        <!-- This profile will create a new event, and then periodically update the ACKNOWLEDGED property. -->
+                                        <dict>
+                                                <key>class</key>
+                                                <string>contrib.performance.loadtest.profiles.EventUpdater</string>
+
+                                                <key>params</key>
+                                                <dict>
+                                                        <key>enabled</key>
+                                                        <false/>
+
+                                                        <!-- Define the interval (in seconds) at which this profile will use
+                                                                its client to create a new event. -->
+                                                        <key>interval</key>
+                                                        <integer>5</integer>
+
+                                                        <!-- Define how start times (DTSTART) for the randomly generated events
+                                                                will be selected. This is an example of a "Distribution" parameter. The value
+                                                                for most "Distribution" parameters are interchangeable and extensible. -->
+                                                        <key>eventStartDistribution</key>
+                                                        <dict>
+
+                                                                <!-- This distribution is pretty specialized. It produces timestamps
+                                                                        in the near future, limited to certain days of the week and certain hours
+                                                                        of the day. -->
+                                                                <key>type</key>
+                                                                <string>contrib.performance.stats.WorkDistribution</string>
+
+                                                                <key>params</key>
+                                                                <dict>
+                                                                        <!-- These are the days of the week the distribution will use. -->
+                                                                        <key>daysOfWeek</key>
+                                                                        <array>
+                                                                                <string>mon</string>
+                                                                                <string>tue</string>
+                                                                                <string>wed</string>
+                                                                                <string>thu</string>
+                                                                                <string>fri</string>
+                                                                        </array>
+
+                                                                        <!-- The earliest hour of a day at which an event might be scheduled. -->
+                                                                        <key>beginHour</key>
+                                                                        <integer>8</integer>
+
+                                                                        <!-- And the latest hour of a day (at which an event will be scheduled
+                                                                                to begin!). -->
+                                                                        <key>endHour</key>
+                                                                        <integer>16</integer>
+
+                                                                        <!-- The timezone in which the event is scheduled. (XXX Does this
+                                                                                really work right?) -->
+                                                                        <key>tzname</key>
+                                                                        <string>America/Los_Angeles</string>
+                                                                </dict>
+                                                        </dict>
+
+                                                        <!-- Define how recurrences are created. -->
+                                                        <key>recurrenceDistribution</key>
+                                                        <dict>
+
+                                                                <!-- This distribution is pretty specialized. We have a fixed set of
+                                                                 RRULEs defined for this distribution and pick each based on a
+                                                                 weight. -->
+                                                                <key>type</key>
+                                                                <string>contrib.performance.stats.RecurrenceDistribution</string>
+
+                                                                <key>params</key>
+                                                                <dict>
+                                                                        <!-- False to disable RRULEs -->
+                                                                        <key>allowRecurrence</key>
+                                                                        <true/>
+
+                                                                        <!-- These are the weights for the specific set of RRULEs. -->
+                                                                        <key>weights</key>
+                                                                        <dict>
+                                                                                <!-- Half of all events will be non-recurring -->
+                                                                                <key>none</key>
+                                                                                <integer>50</integer>
+                                                                                
+                                                                                <!-- Daily and weekly are pretty common -->
+                                                                                <key>daily</key>
+                                                                                <integer>25</integer>
+                                                                                <key>weekly</key>
+                                                                                <integer>25</integer>
+                                                                                
+                                                                                <!-- Monthly, yearly, daily & weekly limit not so common -->
+                                                                                <key>monthly</key>
+                                                                                <integer>0</integer>
+                                                                                <key>yearly</key>
+                                                                                <integer>0</integer>
+                                                                                <key>dailylimit</key>
+                                                                                <integer>0</integer>
+                                                                                <key>weeklylimit</key>
+                                                                                <integer>0</integer>
+                                                                                
+                                                                                <!-- Work days pretty common -->
+                                                                                <key>workdays</key>
+                                                                                <integer>0</integer>
+                                                                        </dict>
+                                                                </dict>
+                                                        </dict>
+                                                </dict>
+                                        </dict>
+
</ins><span class="cx">                                         <!-- This profile invites some number of new attendees to new events. -->
</span><span class="cx">                                         <dict>
</span><span class="cx">                                                 <key>class</key>
</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("%r does not implement addInvite" % (self.__class__,))
</span><span class="cx">
</span><span class="cx">
</span><ins>+ def changeEvent(self, href, calendar):
+ """
+ Called when a profile needs to change an event (no scheduling).
+ """
+ raise NotImplementedError("%r does not implement changeEvent" % (self.__class__,))
+
+
</ins><span class="cx"> def deleteEvent(self, href):
</span><span class="cx"> """
</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"> "eventChanged": 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"> """
</span><span class="cx"> Start monitoring for AMP-based push notifications
</span><span class="cx"> """
</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("utf-8")
</span><span class="cx"> # prefix = name[:4].lower()
</span><del>- prefix = random.choice(["chris", "cyru", "dre", "eric", "morg",
- "well", "wilfr", "witz"])
</del><ins>+ prefix = random.choice([
+ "chris", "cyru", "dre", "eric", "morg",
+ "well", "wilfr", "witz"
+ ])
</ins><span class="cx">
</span><span class="cx"> email = attendee.value()
</span><span class="cx"> if email.startswith("mailto:"):
</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="REPORT{psearch}",
</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 = "small"
</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="PUT{update}"
+ )
+
+ # 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("etag", [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="POST{fb-%s}" % (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), "FAIL" if failure else "")
</del><ins>+ tuple(thresholds) + \
+ (mean(durations), median(durations), stddev(durations), "FAIL" if failure else "")
</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"> """
</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, "Client stopped with error; recent traffic in %r" % (
</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="client-failure", reason="%s: %s" % (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, "Profile stopped with error; recent traffic in %r" % (
</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("* Details\n")
</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 = "Greater than %(cutoff)g%% %(method)s failed"
</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):
+ """
+ Called before the profile runs for real. Can be used to initialize client state.
+
+ @return: a L{Deferred} that fires when initialization is done
+ """
+ return succeed(None)
+
+
</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):
+ """
+ A Calendar user who creates a new event, and then updates its alarm.
+ """
+ _eventTemplate = Component.fromString("""\
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//Apple Inc.//iCal 4.0.3//EN
+CALSCALE:GREGORIAN
+BEGIN:VEVENT
+CREATED:20101018T155431Z
+UID:C98AD237-55AD-4F7D-9009-0D355D835822
+DTEND;TZID=America/New_York:20101021T130000
+TRANSP:OPAQUE
+SUMMARY:Simple event
+DTSTART;TZID=America/New_York:20101021T120000
+DTSTAMP:20101018T155438Z
+SEQUENCE:2
+BEGIN:VALARM
+X-WR-ALARMUID:D9D1AC84-F629-4B9D-9B6B-4A6CA9A11FEF
+UID:D9D1AC84-F629-4B9D-9B6B-4A6CA9A11FEF
+DESCRIPTION:Event reminder
+TRIGGER:-PT8M
+ACTION:DISPLAY
+END:VALARM
+END:VEVENT
+END:VCALENDAR
+""".replace("\n", "\r\n"))
+
+ def setParameters(
+ self,
+ enabled=True,
+ interval=25,
+ eventStartDistribution=NearFutureDistribution(),
+ eventDurationDistribution=UniformDiscreteDistribution([
+ 15 * 60, 30 * 60,
+ 45 * 60, 60 * 60,
+ 120 * 60
+ ]),
+ recurrenceDistribution=RecurrenceDistribution(False),
+ ):
+ self.enabled = enabled
+ self._interval = interval
+ self._eventStartDistribution = eventStartDistribution
+ self._eventDurationDistribution = eventDurationDistribution
+ self._recurrenceDistribution = recurrenceDistribution
+
+
+ def initialize(self):
+ """
+ Called before the profile runs for real. Can be used to initialize client state.
+
+ @return: a L{Deferred} that fires when initialization is done
+ """
+ return self._initEvent()
+
+
+ def run(self):
+ self._call = LoopingCall(self._updateEvent)
+ self._call.clock = self._reactor
+ return self._call.start(self._interval)
+
+
+ def _initEvent(self):
+ if not self._client.started:
+ return succeed(None)
+
+ # If it already exists, don't re-create
+ calendar = self._calendarsOfType(caldavxml.calendar, "VEVENT")[0]
+ if calendar.events:
+ events = [event for event in calendar.events.values() if event.url.endswith("event_to_update.ics")]
+ if events:
+ return succeed(None)
+
+ # Copy the template event and fill in some of its fields
+ # to make a new event to create on the calendar.
+ vcalendar = self._eventTemplate.duplicate()
+ vevent = vcalendar.mainComponent()
+ uid = str(uuid4())
+ dtstart = self._eventStartDistribution.sample()
+ dtend = dtstart + Duration(seconds=self._eventDurationDistribution.sample())
+ vevent.replaceProperty(Property("CREATED", DateTime.getNowUTC()))
+ vevent.replaceProperty(Property("DTSTAMP", DateTime.getNowUTC()))
+ vevent.replaceProperty(Property("DTSTART", dtstart))
+ vevent.replaceProperty(Property("DTEND", dtend))
+ vevent.replaceProperty(Property("UID", uid))
+
+ rrule = self._recurrenceDistribution.sample()
+ if rrule is not None:
+ vevent.addProperty(Property(None, None, None, pycalendar=rrule))
+
+ href = '%s%s' % (calendar.url, "event_to_update.ics")
+ d = self._client.addEvent(href, vcalendar)
+ return self._newOperation("create", d)
+
+
+ def _updateEvent(self):
+ """
+ Try to add a new attendee to an event, or perhaps remove an
+ existing attendee from an event.
+
+ @return: C{None} if there are no events to play with,
+ otherwise a L{Deferred} which fires when the attendee
+ change has been made.
+ """
+
+ if not self._client.started:
+ return succeed(None)
+
+ # If it does not exist, try to create it
+ calendar = self._calendarsOfType(caldavxml.calendar, "VEVENT")[0]
+ if not calendar.events:
+ return self._initEvent()
+ events = [event for event in calendar.events.values() if event.url.endswith("event_to_update.ics")]
+ if not events:
+ return self._initEvent()
+ event = events[0]
+
+ # Add/update the ACKNOWLEDGED property
+ component = event.component.mainComponent()
+ component.replaceProperty(Property("ACKNOWLEDGED", DateTime.getNowUTC()))
+ d = self._client.changeEvent(event.url)
+ return self._newOperation("update", d)
+
+
+
</ins><span class="cx"> class Tasker(ProfileBase):
</span><span class="cx"> """
</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["software"]),
</span><span class="cx"> cls._convertParams(clientConfig["params"]),
</span><del>- [ProfileType(
- namedAny(profile["class"]),
- cls._convertParams(profile["params"]))
- for profile in clientConfig["profiles"]]))
</del><ins>+ [
+ ProfileType(
+ namedAny(profile["class"]),
+ cls._convertParams(profile["params"])
+ ) for profile in clientConfig["profiles"]
+ ]))
</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>+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ Copyright (c) 2011-2012 Apple Inc. All rights reserved.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+        <dict>
+                <!-- Define the kinds of software and user behavior the load simulation
+                        will simulate. -->
+                <key>clients</key>
+
+                <!-- Have as many different kinds of software and user behavior configurations
+                        as you want. Each is a dict -->
+                <array>
+
+                        <dict>
+
+                                <!-- Here is a Lion iCal simulator. -->
+                                <key>software</key>
+                                <string>contrib.performance.loadtest.ical.OS_X_10_7</string>
+
+                                <!-- Arguments to use to initialize the client instance. -->
+                                <key>params</key>
+                                <dict>
+                                        <!-- Name that appears in logs. -->
+                                        <key>title</key>
+                                        <string>10.7</string>
+
+                                        <!-- Client can poll the calendar home at some interval. This is
+                                                in seconds. -->
+                                        <key>calendarHomePollInterval</key>
+                                        <integer>300000</integer>
+
+                                        <!-- If the server advertises xmpp push, OS X 10.6 can wait for notifications
+                                                about calendar home changes instead of polling for them periodically. If
+                                                this option is true, then look for the server advertisement for xmpp push
+                                                and use it if possible. Still fall back to polling if there is no xmpp push
+                                                advertised. -->
+                                        <key>supportPush</key>
+                                        <false />
+                                        <key>supportAmpPush</key>
+                                        <false />
+                                </dict>
+
+                                <!-- The profiles define certain types of user behavior on top of the
+                                        client software being simulated. -->
+                                <key>profiles</key>
+                                <array>
+
+                                        <!-- First an event-creating profile, which will periodically create
+                                                new events at a random time on a random calendar. -->
+                                        <dict>
+                                                <key>class</key>
+                                                <string>contrib.performance.loadtest.profiles.Eventer</string>
+
+                                                <key>params</key>
+                                                <dict>
+                                                        <key>enabled</key>
+                                                        <false/>
+
+                                                        <!-- Define the interval (in seconds) at which this profile will use
+                                                                its client to create a new event. -->
+                                                        <key>interval</key>
+                                                        <integer>20</integer>
+
+                                                        <!-- Define how start times (DTSTART) for the randomly generated events
+                                                                will be selected. This is an example of a "Distribution" parameter. The value
+                                                                for most "Distribution" parameters are interchangeable and extensible. -->
+                                                        <key>eventStartDistribution</key>
+                                                        <dict>
+
+                                                                <!-- This distribution is pretty specialized. It produces timestamps
+                                                                        in the near future, limited to certain days of the week and certain hours
+                                                                        of the day. -->
+                                                                <key>type</key>
+                                                                <string>contrib.performance.stats.WorkDistribution</string>
+
+                                                                <key>params</key>
+                                                                <dict>
+                                                                        <!-- These are the days of the week the distribution will use. -->
+                                                                        <key>daysOfWeek</key>
+                                                                        <array>
+                                                                                <string>mon</string>
+                                                                                <string>tue</string>
+                                                                                <string>wed</string>
+                                                                                <string>thu</string>
+                                                                                <string>fri</string>
+                                                                        </array>
+
+                                                                        <!-- The earliest hour of a day at which an event might be scheduled. -->
+                                                                        <key>beginHour</key>
+                                                                        <integer>8</integer>
+
+                                                                        <!-- And the latest hour of a day (at which an event will be scheduled
+                                                                                to begin!). -->
+                                                                        <key>endHour</key>
+                                                                        <integer>16</integer>
+
+                                                                        <!-- The timezone in which the event is scheduled. (XXX Does this
+                                                                                really work right?) -->
+                                                                        <key>tzname</key>
+                                                                        <string>America/Los_Angeles</string>
+                                                                </dict>
+                                                        </dict>
+
+                                                        <!-- Define how recurrences are created. -->
+                                                        <key>recurrenceDistribution</key>
+                                                        <dict>
+
+                                                                <!-- This distribution is pretty specialized. We have a fixed set of
+                                                                 RRULEs defined for this distribution and pick each based on a
+                                                                 weight. -->
+                                                                <key>type</key>
+                                                                <string>contrib.performance.stats.RecurrenceDistribution</string>
+
+                                                                <key>params</key>
+                                                                <dict>
+                                                                        <!-- False to disable RRULEs -->
+                                                                        <key>allowRecurrence</key>
+                                                                        <false/>
+
+                                                                        <!-- These are the weights for the specific set of RRULEs. -->
+                                                                        <key>weights</key>
+                                                                        <dict>
+                                                                                <!-- Half of all events will be non-recurring -->
+                                                                                <key>none</key>
+                                                                                <integer>50</integer>
+                                                                                
+                                                                                <!-- Daily and weekly are pretty common -->
+                                                                                <key>daily</key>
+                                                                                <integer>10</integer>
+                                                                                <key>weekly</key>
+                                                                                <integer>20</integer>
+                                                                                
+                                                                                <!-- Monthly, yearly, daily & weekly limit not so common -->
+                                                                                <key>monthly</key>
+                                                                                <integer>2</integer>
+                                                                                <key>yearly</key>
+                                                                                <integer>1</integer>
+                                                                                <key>dailylimit</key>
+                                                                                <integer>2</integer>
+                                                                                <key>weeklylimit</key>
+                                                                                <integer>5</integer>
+                                                                                
+                                                                                <!-- Work days pretty common -->
+                                                                                <key>workdays</key>
+                                                                                <integer>10</integer>
+                                                                        </dict>
+                                                                </dict>
+                                                        </dict>
+                                                </dict>
+                                        </dict>
+
+                                        <!-- This profile will create a new event, and then periodically update the ACKNOWLEDGED property. -->
+                                        <dict>
+                                                <key>class</key>
+                                                <string>contrib.performance.loadtest.profiles.EventUpdater</string>
+
+                                                <key>params</key>
+                                                <dict>
+                                                        <key>enabled</key>
+                                                        <true/>
+
+                                                        <!-- Define the interval (in seconds) at which this profile will use
+                                                                its client to create a new event. -->
+                                                        <key>interval</key>
+                                                        <integer>5</integer>
+
+                                                        <!-- Define how start times (DTSTART) for the randomly generated events
+                                                                will be selected. This is an example of a "Distribution" parameter. The value
+                                                                for most "Distribution" parameters are interchangeable and extensible. -->
+                                                        <key>eventStartDistribution</key>
+                                                        <dict>
+
+                                                                <!-- This distribution is pretty specialized. It produces timestamps
+                                                                        in the near future, limited to certain days of the week and certain hours
+                                                                        of the day. -->
+                                                                <key>type</key>
+                                                                <string>contrib.performance.stats.WorkDistribution</string>
+
+                                                                <key>params</key>
+                                                                <dict>
+                                                                        <!-- These are the days of the week the distribution will use. -->
+                                                                        <key>daysOfWeek</key>
+                                                                        <array>
+                                                                                <string>mon</string>
+                                                                                <string>tue</string>
+                                                                                <string>wed</string>
+                                                                                <string>thu</string>
+                                                                                <string>fri</string>
+                                                                        </array>
+
+                                                                        <!-- The earliest hour of a day at which an event might be scheduled. -->
+                                                                        <key>beginHour</key>
+                                                                        <integer>8</integer>
+
+                                                                        <!-- And the latest hour of a day (at which an event will be scheduled
+                                                                                to begin!). -->
+                                                                        <key>endHour</key>
+                                                                        <integer>16</integer>
+
+                                                                        <!-- The timezone in which the event is scheduled. (XXX Does this
+                                                                                really work right?) -->
+                                                                        <key>tzname</key>
+                                                                        <string>America/Los_Angeles</string>
+                                                                </dict>
+                                                        </dict>
+
+                                                        <!-- Define how recurrences are created. -->
+                                                        <key>recurrenceDistribution</key>
+                                                        <dict>
+
+                                                                <!-- This distribution is pretty specialized. We have a fixed set of
+                                                                 RRULEs defined for this distribution and pick each based on a
+                                                                 weight. -->
+                                                                <key>type</key>
+                                                                <string>contrib.performance.stats.RecurrenceDistribution</string>
+
+                                                                <key>params</key>
+                                                                <dict>
+                                                                        <!-- False to disable RRULEs -->
+                                                                        <key>allowRecurrence</key>
+                                                                        <true/>
+
+                                                                        <!-- These are the weights for the specific set of RRULEs. -->
+                                                                        <key>weights</key>
+                                                                        <dict>
+                                                                                <!-- Half of all events will be non-recurring -->
+                                                                                <key>none</key>
+                                                                                <integer>50</integer>
+                                                                                
+                                                                                <!-- Daily and weekly are pretty common -->
+                                                                                <key>daily</key>
+                                                                                <integer>25</integer>
+                                                                                <key>weekly</key>
+                                                                                <integer>25</integer>
+                                                                                
+                                                                                <!-- Monthly, yearly, daily & weekly limit not so common -->
+                                                                                <key>monthly</key>
+                                                                                <integer>0</integer>
+                                                                                <key>yearly</key>
+                                                                                <integer>0</integer>
+                                                                                <key>dailylimit</key>
+                                                                                <integer>0</integer>
+                                                                                <key>weeklylimit</key>
+                                                                                <integer>0</integer>
+                                                                                
+                                                                                <!-- Work days pretty common -->
+                                                                                <key>workdays</key>
+                                                                                <integer>0</integer>
+                                                                        </dict>
+                                                                </dict>
+                                                        </dict>
+                                                </dict>
+                                        </dict>
+
+                                        <!-- This profile invites some number of new attendees to new events. -->
+                                        <dict>
+                                                <key>class</key>
+                                                <string>contrib.performance.loadtest.profiles.RealisticInviter</string>
+
+                                                <key>params</key>
+                                                <dict>
+                                                        <key>enabled</key>
+                                                        <false/>
+
+                                                        <!-- Define the frequency at which new invitations will be sent out. -->
+                                                        <key>sendInvitationDistribution</key>
+                                                        <dict>
+                                                                <key>type</key>
+                                                                <string>contrib.performance.stats.NormalDistribution</string>
+                                                                <key>params</key>
+                                                                <dict>
+                                                                        <!-- mu gives the mean of the normal distribution (in seconds). -->
+                                                                        <key>mu</key>
+                                                                        <integer>10</integer>
+
+                                                                        <!-- and sigma gives its standard deviation. -->
+                                                                        <key>sigma</key>
+                                                                        <integer>5</integer>
+                                                                </dict>
+                                                        </dict>
+
+                                                        <!-- Define the distribution of who will be invited to an event.
+                                                        
+                                                                When inviteeClumping is turned on each invitee is based on a sample of
+                                                                users "close to" the organizer based on account index. If the clumping
+                                                                is too "tight" for the requested number of attendees, then invites for
+                                                                those larger numbers will simply fail (the sim will report that situation).
+                                                                
+                                                                When inviteeClumping is off invitees will be sampled across an entire
+                                                                range of account indexes. In this case the distribution ought to be a
+                                                                UniformIntegerDistribution with min=0 and max set to the number of accounts.
+                                                        -->
+                                                        <key>inviteeDistribution</key>
+                                                        <dict>
+                                                                <key>type</key>
+                                                                <string>contrib.performance.stats.UniformIntegerDistribution</string>
+                                                                <key>params</key>
+                                                                <dict>
+                                                                        <!-- The minimum value (inclusive) of the uniform distribution. -->
+                                                                        <key>min</key>
+                                                                        <integer>0</integer>
+                                                                        <!-- The maximum value (exclusive) of the uniform distribution. -->
+                                                                        <key>max</key>
+                                                                        <integer>99</integer>
+                                                                </dict>
+                                                        </dict>
+
+                                                        <key>inviteeClumping</key>
+                                                        <true/>
+
+                                                        <!-- Define the distribution of how many attendees will be invited to an event.
+                                                        
+                                                                LogNormal is the best fit to observed data.
+
+
+                                                                For LogNormal "mode" is the peak, "mean" is the mean value.        For invites,
+                                                                mode should typically be 1, and mean whatever matches the user behavior.
+                                                                Our typical mean is 6.                                                         
+                                                         -->
+                                                        <key>inviteeCountDistribution</key>
+                                                        <dict>
+                                                                <key>type</key>
+                                                                <string>contrib.performance.stats.LogNormalDistribution</string>
+                                                                <key>params</key>
+                                                                <dict>
+                                                                        <!-- mode - peak-->
+                                                                        <key>mode</key>
+                                                                        <integer>1</integer>
+                                                                        <!-- mean - average-->
+                                                                        <key>median</key>
+                                                                        <integer>6</integer>
+                                                                        <!-- maximum -->
+                                                                        <key>maximum</key>
+                                                                        <real>100</real>
+                                                                </dict>
+                                                        </dict>
+
+                                                        <!-- Define how start times (DTSTART) for the randomly generated events
+                                                                will be selected. This is an example of a "Distribution" parameter. The value
+                                                                for most "Distribution" parameters are interchangeable and extensible. -->
+                                                        <key>eventStartDistribution</key>
+                                                        <dict>
+
+                                                                <!-- This distribution is pretty specialized. It produces timestamps
+                                                                        in the near future, limited to certain days of the week and certain hours
+                                                                        of the day. -->
+                                                                <key>type</key>
+                                                                <string>contrib.performance.stats.WorkDistribution</string>
+
+                                                                <key>params</key>
+                                                                <dict>
+                                                                        <!-- These are the days of the week the distribution will use. -->
+                                                                        <key>daysOfWeek</key>
+                                                                        <array>
+                                                                                <string>mon</string>
+                                                                                <string>tue</string>
+                                                                                <string>wed</string>
+                                                                                <string>thu</string>
+                                                                                <string>fri</string>
+                                                                        </array>
+
+                                                                        <!-- The earliest hour of a day at which an event might be scheduled. -->
+                                                                        <key>beginHour</key>
+                                                                        <integer>8</integer>
+
+                                                                        <!-- And the latest hour of a day (at which an event will be scheduled
+                                                                                to begin!). -->
+                                                                        <key>endHour</key>
+                                                                        <integer>16</integer>
+
+                                                                        <!-- The timezone in which the event is scheduled. (XXX Does this
+                                                                                really work right?) -->
+                                                                        <key>tzname</key>
+                                                                        <string>America/Los_Angeles</string>
+                                                                </dict>
+                                                        </dict>
+
+                                                        <!-- Define how recurrences are created. -->
+                                                        <key>recurrenceDistribution</key>
+                                                        <dict>
+
+                                                                <!-- This distribution is pretty specialized. We have a fixed set of
+                                                                 RRULEs defined for this distribution and pick each based on a
+                                                                 weight. -->
+                                                                <key>type</key>
+                                                                <string>contrib.performance.stats.RecurrenceDistribution</string>
+
+                                                                <key>params</key>
+                                                                <dict>
+                                                                        <!-- False to disable RRULEs -->
+                                                                        <key>allowRecurrence</key>
+                                                                        <true/>
+
+                                                                        <!-- These are the weights for the specific set of RRULEs. -->
+                                                                        <key>weights</key>
+                                                                        <dict>
+                                                                                <!-- Half of all events will be non-recurring -->
+                                                                                <key>none</key>
+                                                                                <integer>50</integer>
+                                                                                
+                                                                                <!-- Daily and weekly are pretty common -->
+                                                                                <key>daily</key>
+                                                                                <integer>10</integer>
+                                                                                <key>weekly</key>
+                                                                                <integer>20</integer>
+                                                                                
+                                                                                <!-- Monthly, yearly, daily & weekly limit not so common -->
+                                                                                <key>monthly</key>
+                                                                                <integer>2</integer>
+                                                                                <key>yearly</key>
+                                                                                <integer>1</integer>
+                                                                                <key>dailylimit</key>
+                                                                                <integer>2</integer>
+                                                                                <key>weeklylimit</key>
+                                                                                <integer>5</integer>
+                                                                                
+                                                                                <!-- Work days pretty common -->
+                                                                                <key>workdays</key>
+                                                                                <integer>10</integer>
+                                                                        </dict>
+                                                                </dict>
+                                                        </dict>
+                                                </dict>
+                                        </dict>
+
+                                        <!-- This profile accepts invitations to events, handles cancels, and
+                                         handles replies received. -->
+                                        <dict>
+                                                <key>class</key>
+                                                <string>contrib.performance.loadtest.profiles.Accepter</string>
+
+                                                <key>params</key>
+                                                <dict>
+                                                        <key>enabled</key>
+                                                        <false/>
+
+                                                        <!-- Define how long to wait after seeing a new invitation before
+                                                                accepting it.
+
+                                                                For LogNormal "mode" is the peak, "median" is the 50% cummulative value
+                                                                (i.e., half of the user have accepted by that time).                                                                
+                                                        -->
+                                                        <key>acceptDelayDistribution</key>
+                                                        <dict>
+                                                                <key>type</key>
+                                                                <string>contrib.performance.stats.LogNormalDistribution</string>
+                                                                <key>params</key>
+                                                                <dict>
+                                                                        <!-- mode - peak-->
+                                                                        <key>mode</key>
+                                                                        <integer>300</integer>
+                                                                        <!-- median - 50% done-->
+                                                                        <key>median</key>
+                                                                        <integer>1800</integer>
+                                                                </dict>
+                                                        </dict>
+                                                </dict>
+                                        </dict>
+
+                                        <!-- A task-creating profile, which will periodically create
+                                                new tasks at a random time on a random calendar. -->
+                                        <dict>
+                                                <key>class</key>
+                                                <string>contrib.performance.loadtest.profiles.Tasker</string>
+
+                                                <key>params</key>
+                                                <dict>
+                                                        <key>enabled</key>
+                                                        <false/>
+
+                                                        <!-- Define the interval (in seconds) at which this profile will use
+                                                                its client to create a new task. -->
+                                                        <key>interval</key>
+                                                        <integer>300</integer>
+
+                                                        <!-- Define how due times (DUE) for the randomly generated tasks
+                                                                will be selected. This is an example of a "Distribution" parameter. The value
+                                                                for most "Distribution" parameters are interchangeable and extensible. -->
+                                                        <key>taskDueDistribution</key>
+                                                        <dict>
+
+                                                                <!-- This distribution is pretty specialized. It produces timestamps
+                                                                        in the near future, limited to certain days of the week and certain hours
+                                                                        of the day. -->
+                                                                <key>type</key>
+                                                                <string>contrib.performance.stats.WorkDistribution</string>
+
+                                                                <key>params</key>
+                                                                <dict>
+                                                                        <!-- These are the days of the week the distribution will use. -->
+                                                                        <key>daysOfWeek</key>
+                                                                        <array>
+                                                                                <string>mon</string>
+                                                                                <string>tue</string>
+                                                                                <string>wed</string>
+                                                                                <string>thu</string>
+                                                                                <string>fri</string>
+                                                                        </array>
+
+                                                                        <!-- The earliest hour of a day at which an event might be scheduled. -->
+                                                                        <key>beginHour</key>
+                                                                        <integer>8</integer>
+
+                                                                        <!-- And the latest hour of a day (at which an event will be scheduled
+                                                                                to begin!). -->
+                                                                        <key>endHour</key>
+                                                                        <integer>16</integer>
+
+                                                                        <!-- The timezone in which the event is scheduled. (XXX Does this
+                                                                                really work right?) -->
+                                                                        <key>tzname</key>
+                                                                        <string>America/Los_Angeles</string>
+                                                                </dict>
+                                                        </dict>
+                                                </dict>
+                                        </dict>
+
+                                </array>
+
+                                <!-- Determine the frequency at which this client configuration will
+                                        appear in the clients which are created by the load tester. -->
+                                <key>weight</key>
+                                <integer>1</integer>
+                        </dict>
+                </array>
+        </dict>
+</plist>
</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">                                                 </dict>
</span><span class="cx">                                         </dict>
</span><span class="cx">
</span><ins>+                                        <!-- This profile will create a new event, and then periodically update the ACKNOWLEDGED property. -->
+                                        <dict>
+                                                <key>class</key>
+                                                <string>contrib.performance.loadtest.profiles.EventUpdater</string>
+
+                                                <key>params</key>
+                                                <dict>
+                                                        <key>enabled</key>
+                                                        <false/>
+
+                                                        <!-- Define the interval (in seconds) at which this profile will use
+                                                                its client to create a new event. -->
+                                                        <key>interval</key>
+                                                        <integer>5</integer>
+
+                                                        <!-- Define how start times (DTSTART) for the randomly generated events
+                                                                will be selected. This is an example of a "Distribution" parameter. The value
+                                                                for most "Distribution" parameters are interchangeable and extensible. -->
+                                                        <key>eventStartDistribution</key>
+                                                        <dict>
+
+                                                                <!-- This distribution is pretty specialized. It produces timestamps
+                                                                        in the near future, limited to certain days of the week and certain hours
+                                                                        of the day. -->
+                                                                <key>type</key>
+                                                                <string>contrib.performance.stats.WorkDistribution</string>
+
+                                                                <key>params</key>
+                                                                <dict>
+                                                                        <!-- These are the days of the week the distribution will use. -->
+                                                                        <key>daysOfWeek</key>
+                                                                        <array>
+                                                                                <string>mon</string>
+                                                                                <string>tue</string>
+                                                                                <string>wed</string>
+                                                                                <string>thu</string>
+                                                                                <string>fri</string>
+                                                                        </array>
+
+                                                                        <!-- The earliest hour of a day at which an event might be scheduled. -->
+                                                                        <key>beginHour</key>
+                                                                        <integer>8</integer>
+
+                                                                        <!-- And the latest hour of a day (at which an event will be scheduled
+                                                                                to begin!). -->
+                                                                        <key>endHour</key>
+                                                                        <integer>16</integer>
+
+                                                                        <!-- The timezone in which the event is scheduled. (XXX Does this
+                                                                                really work right?) -->
+                                                                        <key>tzname</key>
+                                                                        <string>America/Los_Angeles</string>
+                                                                </dict>
+                                                        </dict>
+
+                                                        <!-- Define how recurrences are created. -->
+                                                        <key>recurrenceDistribution</key>
+                                                        <dict>
+
+                                                                <!-- This distribution is pretty specialized. We have a fixed set of
+                                                                 RRULEs defined for this distribution and pick each based on a
+                                                                 weight. -->
+                                                                <key>type</key>
+                                                                <string>contrib.performance.stats.RecurrenceDistribution</string>
+
+                                                                <key>params</key>
+                                                                <dict>
+                                                                        <!-- False to disable RRULEs -->
+                                                                        <key>allowRecurrence</key>
+                                                                        <true/>
+
+                                                                        <!-- These are the weights for the specific set of RRULEs. -->
+                                                                        <key>weights</key>
+                                                                        <dict>
+                                                                                <!-- Half of all events will be non-recurring -->
+                                                                                <key>none</key>
+                                                                                <integer>50</integer>
+                                                                                
+                                                                                <!-- Daily and weekly are pretty common -->
+                                                                                <key>daily</key>
+                                                                                <integer>25</integer>
+                                                                                <key>weekly</key>
+                                                                                <integer>25</integer>
+                                                                                
+                                                                                <!-- Monthly, yearly, daily & weekly limit not so common -->
+                                                                                <key>monthly</key>
+                                                                                <integer>0</integer>
+                                                                                <key>yearly</key>
+                                                                                <integer>0</integer>
+                                                                                <key>dailylimit</key>
+                                                                                <integer>0</integer>
+                                                                                <key>weeklylimit</key>
+                                                                                <integer>0</integer>
+                                                                                
+                                                                                <!-- Work days pretty common -->
+                                                                                <key>workdays</key>
+                                                                                <integer>0</integer>
+                                                                        </dict>
+                                                                </dict>
+                                                        </dict>
+                                                </dict>
+                                        </dict>
+
</ins><span class="cx">                                         <!-- This profile invites some number of new attendees to new events. -->
</span><span class="cx">                                         <dict>
</span><span class="cx">                                                 <key>class</key>
</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">                                                 </dict>
</span><span class="cx">                                         </dict>
</span><span class="cx">
</span><ins>+                                        <!-- This profile will create a new event, and then periodically update the ACKNOWLEDGED property. -->
+                                        <dict>
+                                                <key>class</key>
+                                                <string>contrib.performance.loadtest.profiles.EventUpdater</string>
+
+                                                <key>params</key>
+                                                <dict>
+                                                        <key>enabled</key>
+                                                        <false/>
+
+                                                        <!-- Define the interval (in seconds) at which this profile will use
+                                                                its client to create a new event. -->
+                                                        <key>interval</key>
+                                                        <integer>5</integer>
+
+                                                        <!-- Define how start times (DTSTART) for the randomly generated events
+                                                                will be selected. This is an example of a "Distribution" parameter. The value
+                                                                for most "Distribution" parameters are interchangeable and extensible. -->
+                                                        <key>eventStartDistribution</key>
+                                                        <dict>
+
+                                                                <!-- This distribution is pretty specialized. It produces timestamps
+                                                                        in the near future, limited to certain days of the week and certain hours
+                                                                        of the day. -->
+                                                                <key>type</key>
+                                                                <string>contrib.performance.stats.WorkDistribution</string>
+
+                                                                <key>params</key>
+                                                                <dict>
+                                                                        <!-- These are the days of the week the distribution will use. -->
+                                                                        <key>daysOfWeek</key>
+                                                                        <array>
+                                                                                <string>mon</string>
+                                                                                <string>tue</string>
+                                                                                <string>wed</string>
+                                                                                <string>thu</string>
+                                                                                <string>fri</string>
+                                                                        </array>
+
+                                                                        <!-- The earliest hour of a day at which an event might be scheduled. -->
+                                                                        <key>beginHour</key>
+                                                                        <integer>8</integer>
+
+                                                                        <!-- And the latest hour of a day (at which an event will be scheduled
+                                                                                to begin!). -->
+                                                                        <key>endHour</key>
+                                                                        <integer>16</integer>
+
+                                                                        <!-- The timezone in which the event is scheduled. (XXX Does this
+                                                                                really work right?) -->
+                                                                        <key>tzname</key>
+                                                                        <string>America/Los_Angeles</string>
+                                                                </dict>
+                                                        </dict>
+
+                                                        <!-- Define how recurrences are created. -->
+                                                        <key>recurrenceDistribution</key>
+                                                        <dict>
+
+                                                                <!-- This distribution is pretty specialized. We have a fixed set of
+                                                                 RRULEs defined for this distribution and pick each based on a
+                                                                 weight. -->
+                                                                <key>type</key>
+                                                                <string>contrib.performance.stats.RecurrenceDistribution</string>
+
+                                                                <key>params</key>
+                                                                <dict>
+                                                                        <!-- False to disable RRULEs -->
+                                                                        <key>allowRecurrence</key>
+                                                                        <true/>
+
+                                                                        <!-- These are the weights for the specific set of RRULEs. -->
+                                                                        <key>weights</key>
+                                                                        <dict>
+                                                                                <!-- Half of all events will be non-recurring -->
+                                                                                <key>none</key>
+                                                                                <integer>50</integer>
+                                                                                
+                                                                                <!-- Daily and weekly are pretty common -->
+                                                                                <key>daily</key>
+                                                                                <integer>25</integer>
+                                                                                <key>weekly</key>
+                                                                                <integer>25</integer>
+                                                                                
+                                                                                <!-- Monthly, yearly, daily & weekly limit not so common -->
+                                                                                <key>monthly</key>
+                                                                                <integer>0</integer>
+                                                                                <key>yearly</key>
+                                                                                <integer>0</integer>
+                                                                                <key>dailylimit</key>
+                                                                                <integer>0</integer>
+                                                                                <key>weeklylimit</key>
+                                                                                <integer>0</integer>
+                                                                                
+                                                                                <!-- Work days pretty common -->
+                                                                                <key>workdays</key>
+                                                                                <integer>0</integer>
+                                                                        </dict>
+                                                                </dict>
+                                                        </dict>
+                                                </dict>
+                                        </dict>
+
</ins><span class="cx">                                         <!-- This profile invites some number of new attendees to new events. -->
</span><span class="cx">                                         <dict>
</span><span class="cx">                                                 <key>class</key>
</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">                                                 </dict>
</span><span class="cx">                                         </dict>
</span><span class="cx">
</span><ins>+                                        <!-- This profile will create a new event, and then periodically update the ACKNOWLEDGED property. -->
+                                        <dict>
+                                                <key>class</key>
+                                                <string>contrib.performance.loadtest.profiles.EventUpdater</string>
+
+                                                <key>params</key>
+                                                <dict>
+                                                        <key>enabled</key>
+                                                        <false/>
+
+                                                        <!-- Define the interval (in seconds) at which this profile will use
+                                                                its client to create a new event. -->
+                                                        <key>interval</key>
+                                                        <integer>5</integer>
+
+                                                        <!-- Define how start times (DTSTART) for the randomly generated events
+                                                                will be selected. This is an example of a "Distribution" parameter. The value
+                                                                for most "Distribution" parameters are interchangeable and extensible. -->
+                                                        <key>eventStartDistribution</key>
+                                                        <dict>
+
+                                                                <!-- This distribution is pretty specialized. It produces timestamps
+                                                                        in the near future, limited to certain days of the week and certain hours
+                                                                        of the day. -->
+                                                                <key>type</key>
+                                                                <string>contrib.performance.stats.WorkDistribution</string>
+
+                                                                <key>params</key>
+                                                                <dict>
+                                                                        <!-- These are the days of the week the distribution will use. -->
+                                                                        <key>daysOfWeek</key>
+                                                                        <array>
+                                                                                <string>mon</string>
+                                                                                <string>tue</string>
+                                                                                <string>wed</string>
+                                                                                <string>thu</string>
+                                                                                <string>fri</string>
+                                                                        </array>
+
+                                                                        <!-- The earliest hour of a day at which an event might be scheduled. -->
+                                                                        <key>beginHour</key>
+                                                                        <integer>8</integer>
+
+                                                                        <!-- And the latest hour of a day (at which an event will be scheduled
+                                                                                to begin!). -->
+                                                                        <key>endHour</key>
+                                                                        <integer>16</integer>
+
+                                                                        <!-- The timezone in which the event is scheduled. (XXX Does this
+                                                                                really work right?) -->
+                                                                        <key>tzname</key>
+                                                                        <string>America/Los_Angeles</string>
+                                                                </dict>
+                                                        </dict>
+
+                                                        <!-- Define how recurrences are created. -->
+                                                        <key>recurrenceDistribution</key>
+                                                        <dict>
+
+                                                                <!-- This distribution is pretty specialized. We have a fixed set of
+                                                                 RRULEs defined for this distribution and pick each based on a
+                                                                 weight. -->
+                                                                <key>type</key>
+                                                                <string>contrib.performance.stats.RecurrenceDistribution</string>
+
+                                                                <key>params</key>
+                                                                <dict>
+                                                                        <!-- False to disable RRULEs -->
+                                                                        <key>allowRecurrence</key>
+                                                                        <true/>
+
+                                                                        <!-- These are the weights for the specific set of RRULEs. -->
+                                                                        <key>weights</key>
+                                                                        <dict>
+                                                                                <!-- Half of all events will be non-recurring -->
+                                                                                <key>none</key>
+                                                                                <integer>50</integer>
+                                                                                
+                                                                                <!-- Daily and weekly are pretty common -->
+                                                                                <key>daily</key>
+                                                                                <integer>25</integer>
+                                                                                <key>weekly</key>
+                                                                                <integer>25</integer>
+                                                                                
+                                                                                <!-- Monthly, yearly, daily & weekly limit not so common -->
+                                                                                <key>monthly</key>
+                                                                                <integer>0</integer>
+                                                                                <key>yearly</key>
+                                                                                <integer>0</integer>
+                                                                                <key>dailylimit</key>
+                                                                                <integer>0</integer>
+                                                                                <key>weeklylimit</key>
+                                                                                <integer>0</integer>
+                                                                                
+                                                                                <!-- Work days pretty common -->
+                                                                                <key>workdays</key>
+                                                                                <integer>0</integer>
+                                                                        </dict>
+                                                                </dict>
+                                                        </dict>
+                                                </dict>
+                                        </dict>
+
</ins><span class="cx">                                         <!-- This profile invites some number of new attendees to new events. -->
</span><span class="cx">                                         <dict>
</span><span class="cx">                                                 <key>class</key>
</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">                                                 </dict>
</span><span class="cx">                                         </dict>
</span><span class="cx">
</span><ins>+                                        <!-- This profile will create a new event, and then periodically update the ACKNOWLEDGED property. -->
+                                        <dict>
+                                                <key>class</key>
+                                                <string>contrib.performance.loadtest.profiles.EventUpdater</string>
+
+                                                <key>params</key>
+                                                <dict>
+                                                        <key>enabled</key>
+                                                        <false/>
+
+                                                        <!-- Define the interval (in seconds) at which this profile will use
+                                                                its client to create a new event. -->
+                                                        <key>interval</key>
+                                                        <integer>5</integer>
+
+                                                        <!-- Define how start times (DTSTART) for the randomly generated events
+                                                                will be selected. This is an example of a "Distribution" parameter. The value
+                                                                for most "Distribution" parameters are interchangeable and extensible. -->
+                                                        <key>eventStartDistribution</key>
+                                                        <dict>
+
+                                                                <!-- This distribution is pretty specialized. It produces timestamps
+                                                                        in the near future, limited to certain days of the week and certain hours
+                                                                        of the day. -->
+                                                                <key>type</key>
+                                                                <string>contrib.performance.stats.WorkDistribution</string>
+
+                                                                <key>params</key>
+                                                                <dict>
+                                                                        <!-- These are the days of the week the distribution will use. -->
+                                                                        <key>daysOfWeek</key>
+                                                                        <array>
+                                                                                <string>mon</string>
+                                                                                <string>tue</string>
+                                                                                <string>wed</string>
+                                                                                <string>thu</string>
+                                                                                <string>fri</string>
+                                                                        </array>
+
+                                                                        <!-- The earliest hour of a day at which an event might be scheduled. -->
+                                                                        <key>beginHour</key>
+                                                                        <integer>8</integer>
+
+                                                                        <!-- And the latest hour of a day (at which an event will be scheduled
+                                                                                to begin!). -->
+                                                                        <key>endHour</key>
+                                                                        <integer>16</integer>
+
+                                                                        <!-- The timezone in which the event is scheduled. (XXX Does this
+                                                                                really work right?) -->
+                                                                        <key>tzname</key>
+                                                                        <string>America/Los_Angeles</string>
+                                                                </dict>
+                                                        </dict>
+
+                                                        <!-- Define how recurrences are created. -->
+                                                        <key>recurrenceDistribution</key>
+                                                        <dict>
+
+                                                                <!-- This distribution is pretty specialized. We have a fixed set of
+                                                                 RRULEs defined for this distribution and pick each based on a
+                                                                 weight. -->
+                                                                <key>type</key>
+                                                                <string>contrib.performance.stats.RecurrenceDistribution</string>
+
+                                                                <key>params</key>
+                                                                <dict>
+                                                                        <!-- False to disable RRULEs -->
+                                                                        <key>allowRecurrence</key>
+                                                                        <true/>
+
+                                                                        <!-- These are the weights for the specific set of RRULEs. -->
+                                                                        <key>weights</key>
+                                                                        <dict>
+                                                                                <!-- Half of all events will be non-recurring -->
+                                                                                <key>none</key>
+                                                                                <integer>50</integer>
+                                                                                
+                                                                                <!-- Daily and weekly are pretty common -->
+                                                                                <key>daily</key>
+                                                                                <integer>25</integer>
+                                                                                <key>weekly</key>
+                                                                                <integer>25</integer>
+                                                                                
+                                                                                <!-- Monthly, yearly, daily & weekly limit not so common -->
+                                                                                <key>monthly</key>
+                                                                                <integer>0</integer>
+                                                                                <key>yearly</key>
+                                                                                <integer>0</integer>
+                                                                                <key>dailylimit</key>
+                                                                                <integer>0</integer>
+                                                                                <key>weeklylimit</key>
+                                                                                <integer>0</integer>
+                                                                                
+                                                                                <!-- Work days pretty common -->
+                                                                                <key>workdays</key>
+                                                                                <integer>0</integer>
+                                                                        </dict>
+                                                                </dict>
+                                                        </dict>
+                                                </dict>
+                                        </dict>
+
</ins><span class="cx">                                         <!-- This profile invites some number of new attendees to new events. -->
</span><span class="cx">                                         <dict>
</span><span class="cx">                                                 <key>class</key>
</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="test", client_id="1234"))
</del><ins>+ type='response', method='GET', success=True,
+ duration=1.23, user=user, client_type="test", client_id="1234"
+ ))
</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="user01", client_type="test", client_id=client))
</del><ins>+ type='response', method='GET', success=True,
+ duration=1.23, user="user01", client_type="test", 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="testing %s" % (client,)))
</del><ins>+ type='client-failure', reason="testing %s" % (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="testing %s" % (client,)))
</del><ins>+ type='sim-failure', reason="testing %s" % (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"> """
</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="test", client_id="1234"))
</del><ins>+ type='response', method='GET', success=True,
+ duration=2.5, user='user01', client_type="test", client_id="1234"
+ ))
</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="test", client_id="1234"))
</del><ins>+ type='response', method='GET', success=True,
+ duration=2.5, user='user01', client_type="test", client_id="1234"
+ ))
</ins><span class="cx"> logger.observe(dict(
</span><del>- type='response', method='GET', success=False,
- duration=2.5, user='user01', client_type="test", client_id="1234"))
</del><ins>+ type='response', method='GET', success=False,
+ duration=2.5, user='user01', client_type="test", client_id="1234"
+ ))
</ins><span class="cx"> self.assertEqual(
</span><span class="cx"> ["Greater than 1% GET failed"],
</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="test", client_id="1234"))
</del><ins>+ type='response', method='GET', success=True,
+ duration=2.5, user='user01', client_type="test", client_id="1234"
+ ))
</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="test", client_id="1234"))
</del><ins>+ type='response', method='GET', success=True,
+ duration=3.5, user='user02', client_type="test", client_id="1234"
+ ))
</ins><span class="cx"> self.assertEqual(
</span><span class="cx"> ["Greater than 5% GET exceeded 3 second response time"],
</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="test", client_id="1234"))
</del><ins>+ type='response', method='GET', success=True,
+ duration=2.5, user='user01', client_type="test", client_id="1234"
+ ))
</ins><span class="cx"> logger.observe(dict(
</span><del>- type='response', method='GET', success=True,
- duration=5.5, user='user01', client_type="test", client_id="1234"))
</del><ins>+ type='response', method='GET', success=True,
+ duration=5.5, user='user01', client_type="test", client_id="1234"
+ ))
</ins><span class="cx"> self.assertEqual(
</span><span class="cx"> ["Greater than 1% GET exceeded 5 second response time"],
</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="test", client_id="1234"))
</del><ins>+ type='response', method='GET', success=True,
+ duration=2.5, user='user01', client_type="test", client_id="1234"
+ ))
</ins><span class="cx"> logger.observe(dict(
</span><del>- type='response', method='POST', success=True,
- duration=2.5, user='user01', client_type="test", client_id="1234"))
</del><ins>+ type='response', method='POST', success=True,
+ duration=2.5, user='user01', client_type="test", client_id="1234"
+ ))
</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="test", client_id="1234"))
</del><ins>+ type='response', method='GET', success=False,
+ duration=2.5, user='user01', client_type="test", client_id="1234"
+ ))
</ins><span class="cx"> logger.observe(dict(
</span><del>- type='response', method='POST', success=False,
- duration=2.5, user='user01', client_type="test", client_id="1234"))
</del><ins>+ type='response', method='POST', success=False,
+ duration=2.5, user='user01', client_type="test", client_id="1234"
+ ))
</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="test", client_id="1234"))
</del><ins>+ type='response', method='PUT{organizer-small}', success=True,
+ duration=0.2, user='user01', client_type="test", client_id="1234"
+ ))
</ins><span class="cx"> logger.observe(dict(
</span><del>- type='response', method='PUT{organizer-small}', success=True,
- duration=0.2, user='user01', client_type="test", client_id="1234"))
</del><ins>+ type='response', method='PUT{organizer-small}', success=True,
+ duration=0.2, user='user01', client_type="test", client_id="1234"
+ ))
</ins><span class="cx"> logger.observe(dict(
</span><del>- type='response', method='PUT{organizer-small}', success=True,
- duration=0.2, user='user01', client_type="test", client_id="1234"))
</del><ins>+ type='response', method='PUT{organizer-small}', success=True,
+ duration=0.2, user='user01', client_type="test", client_id="1234"
+ ))
</ins><span class="cx"> logger.observe(dict(
</span><del>- type='response', method='PUT{organizer-small}', success=True,
- duration=0.2, user='user01', client_type="test", client_id="1234"))
</del><ins>+ type='response', method='PUT{organizer-small}', success=True,
+ duration=0.2, user='user01', client_type="test", client_id="1234"
+ ))
</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="test", client_id="1234"))
</del><ins>+ type='response', method='PUT{organizer-small}', success=True,
+ duration=0.2, user='user01', client_type="test", client_id="1234"
+ ))
</ins><span class="cx"> logger.observe(dict(
</span><del>- type='response', method='PUT{organizer-small}', success=True,
- duration=0.6, user='user01', client_type="test", client_id="1234"))
</del><ins>+ type='response', method='PUT{organizer-small}', success=True,
+ duration=0.6, user='user01', client_type="test", client_id="1234"
+ ))
</ins><span class="cx"> logger.observe(dict(
</span><del>- type='response', method='PUT{organizer-small}', success=True,
- duration=0.6, user='user01', client_type="test", client_id="1234"))
</del><ins>+ type='response', method='PUT{organizer-small}', success=True,
+ duration=0.6, user='user01', client_type="test", client_id="1234"
+ ))
</ins><span class="cx"> logger.observe(dict(
</span><del>- type='response', method='PUT{organizer-small}', success=True,
- duration=0.6, user='user01', client_type="test", client_id="1234"))
</del><ins>+ type='response', method='PUT{organizer-small}', success=True,
+ duration=0.6, user='user01', client_type="test", client_id="1234"
+ ))
</ins><span class="cx"> self.assertEqual(
</span><span class="cx"> ["Greater than 50% PUT{organizer-small} exceeded 0.5 second response time"],
</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="test", client_id="1234"))
</del><ins>+ type='response', method='PUT{organizer-medium}', success=True,
+ duration=0.2, user='user01', client_type="test", client_id="1234"
+ ))
</ins><span class="cx"> logger.observe(dict(
</span><del>- type='response', method='PUT{organizer-medium}', success=True,
- duration=0.6, user='user01', client_type="test", client_id="1234"))
</del><ins>+ type='response', method='PUT{organizer-medium}', success=True,
+ duration=0.6, user='user01', client_type="test", client_id="1234"
+ ))
</ins><span class="cx"> logger.observe(dict(
</span><del>- type='response', method='PUT{organizer-medium}', success=True,
- duration=0.6, user='user01', client_type="test", client_id="1234"))
</del><ins>+ type='response', method='PUT{organizer-medium}', success=True,
+ duration=0.6, user='user01', client_type="test", client_id="1234"
+ ))
</ins><span class="cx"> logger.observe(dict(
</span><del>- type='response', method='PUT{organizer-medium}', success=True,
- duration=0.6, user='user01', client_type="test", client_id="1234"))
</del><ins>+ type='response', method='PUT{organizer-medium}', success=True,
+ duration=0.6, user='user01', client_type="test", client_id="1234"
+ ))
</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="test", client_id="1234"))
</del><ins>+ type='response', method='PUT{organizer-medium}', success=True,
+ duration=0.2, user='user01', client_type="test", client_id="1234"
+ ))
</ins><span class="cx"> logger.observe(dict(
</span><del>- type='response', method='PUT{organizer-medium}', success=True,
- duration=1.6, user='user01', client_type="test", client_id="1234"))
</del><ins>+ type='response', method='PUT{organizer-medium}', success=True,
+ duration=1.6, user='user01', client_type="test", client_id="1234"
+ ))
</ins><span class="cx"> logger.observe(dict(
</span><del>- type='response', method='PUT{organizer-medium}', success=True,
- duration=1.6, user='user01', client_type="test", client_id="1234"))
</del><ins>+ type='response', method='PUT{organizer-medium}', success=True,
+ duration=1.6, user='user01', client_type="test", client_id="1234"
+ ))
</ins><span class="cx"> logger.observe(dict(
</span><del>- type='response', method='PUT{organizer-medium}', success=True,
- duration=1.6, user='user01', client_type="test", client_id="1234"))
</del><ins>+ type='response', method='PUT{organizer-medium}', success=True,
+ duration=1.6, user='user01', client_type="test", client_id="1234"
+ ))
</ins><span class="cx"> self.assertEqual(
</span><span class="cx"> ["Greater than 50% PUT{organizer-medium} exceeded 1 second response time"],
</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="test", client_id="1234"))
</del><ins>+ type='response', method='PUT{organizer-large}', success=True,
+ duration=0.2, user='user01', client_type="test", client_id="1234"
+ ))
</ins><span class="cx"> logger.observe(dict(
</span><del>- type='response', method='PUT{organizer-large}', success=True,
- duration=1.6, user='user01', client_type="test", client_id="1234"))
</del><ins>+ type='response', method='PUT{organizer-large}', success=True,
+ duration=1.6, user='user01', client_type="test", client_id="1234"
+ ))
</ins><span class="cx"> logger.observe(dict(
</span><del>- type='response', method='PUT{organizer-large}', success=True,
- duration=1.6, user='user01', client_type="test", client_id="1234"))
</del><ins>+ type='response', method='PUT{organizer-large}', success=True,
+ duration=1.6, user='user01', client_type="test", client_id="1234"
+ ))
</ins><span class="cx"> logger.observe(dict(
</span><del>- type='response', method='PUT{organizer-large}', success=True,
- duration=1.6, user='user01', client_type="test", client_id="1234"))
</del><ins>+ type='response', method='PUT{organizer-large}', success=True,
+ duration=1.6, user='user01', client_type="test", client_id="1234"
+ ))
</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="test", client_id="1234"))
</del><ins>+ type='response', method='PUT{organizer-large}', success=True,
+ duration=0.2, user='user01', client_type="test", client_id="1234"
+ ))
</ins><span class="cx"> logger.observe(dict(
</span><del>- type='response', method='PUT{organizer-large}', success=True,
- duration=3.6, user='user01', client_type="test", client_id="1234"))
</del><ins>+ type='response', method='PUT{organizer-large}', success=True,
+ duration=3.6, user='user01', client_type="test", client_id="1234"
+ ))
</ins><span class="cx"> logger.observe(dict(
</span><del>- type='response', method='PUT{organizer-large}', success=True,
- duration=3.6, user='user01', client_type="test", client_id="1234"))
</del><ins>+ type='response', method='PUT{organizer-large}', success=True,
+ duration=3.6, user='user01', client_type="test", client_id="1234"
+ ))
</ins><span class="cx"> logger.observe(dict(
</span><del>- type='response', method='PUT{organizer-large}', success=True,
- duration=3.6, user='user01', client_type="test", client_id="1234"))
</del><ins>+ type='response', method='PUT{organizer-large}', success=True,
+ duration=3.6, user='user01', client_type="test", client_id="1234"
+ ))
</ins><span class="cx"> self.assertEqual(
</span><span class="cx"> ["Greater than 50% PUT{organizer-large} exceeded 3 second response time"],
</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="test", client_id="1234"))
</del><ins>+ type='response', method='PUT{organizer-huge}', success=True,
+ duration=12.0, user='user01', client_type="test", client_id="1234"
+ ))
</ins><span class="cx"> logger.observe(dict(
</span><del>- type='response', method='PUT{organizer-huge}', success=True,
- duration=8, user='user01', client_type="test", client_id="1234"))
</del><ins>+ type='response', method='PUT{organizer-huge}', success=True,
+ duration=8, user='user01', client_type="test", client_id="1234"
+ ))
</ins><span class="cx"> logger.observe(dict(
</span><del>- type='response', method='PUT{organizer-huge}', success=True,
- duration=11.0, user='user01', client_type="test", client_id="1234"))
</del><ins>+ type='response', method='PUT{organizer-huge}', success=True,
+ duration=11.0, user='user01', client_type="test", client_id="1234"
+ ))
</ins><span class="cx"> logger.observe(dict(
</span><del>- type='response', method='PUT{organizer-huge}', success=True,
- duration=9.0, user='user01', client_type="test", client_id="1234"))
</del><ins>+ type='response', method='PUT{organizer-huge}', success=True,
+ duration=9.0, user='user01', client_type="test", client_id="1234"
+ ))
</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="test", client_id="1234"))
</del><ins>+ type='response', method='PUT{organizer-huge}', success=True,
+ duration=12.0, user='user01', client_type="test", client_id="1234"
+ ))
</ins><span class="cx"> logger.observe(dict(
</span><del>- type='response', method='PUT{organizer-huge}', success=True,
- duration=9.0, user='user01', client_type="test", client_id="1234"))
</del><ins>+ type='response', method='PUT{organizer-huge}', success=True,
+ duration=9.0, user='user01', client_type="test", client_id="1234"
+ ))
</ins><span class="cx"> logger.observe(dict(
</span><del>- type='response', method='PUT{organizer-huge}', success=True,
- duration=12.0, user='user01', client_type="test", client_id="1234"))
</del><ins>+ type='response', method='PUT{organizer-huge}', success=True,
+ duration=12.0, user='user01', client_type="test", client_id="1234"
+ ))
</ins><span class="cx"> logger.observe(dict(
</span><del>- type='response', method='PUT{organizer-huge}', success=True,
- duration=42.42, user='user01', client_type="test", client_id="1234"))
</del><ins>+ type='response', method='PUT{organizer-huge}', success=True,
+ duration=42.42, user='user01', client_type="test", client_id="1234"
+ ))
</ins><span class="cx"> self.assertEqual(
</span><span class="cx"> ["Greater than 50% PUT{organizer-huge} exceeded 10 second response time"],
</span><span class="cx"> logger.failures()
</span></span></pre>
</div>
</div>
</body>
</html>