<!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>[15627] 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/15627">15627</a></dd>
<dt>Author</dt> <dd>sagen@apple.com</dd>
<dt>Date</dt> <dd>2016-05-20 16:36:26 -0700 (Fri, 20 May 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Sim operations that exceed responsetime thresholds count towards overall run failure.</pre>

<h3>Modified Paths</h3>
<ul>
<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="#CalendarServertrunkcontribperformanceloadtestprofilespy">CalendarServer/trunk/contrib/performance/loadtest/profiles.py</a></li>
<li><a href="#CalendarServertrunkcontribperformanceloadtestthresholdsjson">CalendarServer/trunk/contrib/performance/loadtest/thresholds.json</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="CalendarServertrunkcontribperformanceloadtestclientsplist"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/contrib/performance/loadtest/clients.plist (15626 => 15627)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/contrib/performance/loadtest/clients.plist        2016-05-20 19:45:30 UTC (rev 15626)
+++ CalendarServer/trunk/contrib/performance/loadtest/clients.plist        2016-05-20 23:36:26 UTC (rev 15627)
</span><span class="lines">@@ -166,7 +166,7 @@
</span><span class="cx"> 
</span><span class="cx">                                                         &lt;!-- Percentage of time to attach a file --&gt;
</span><span class="cx">                                                         &lt;key&gt;fileAttachPercentage&lt;/key&gt;
</span><del>-                                                        &lt;integer&gt;5&lt;/integer&gt;
</del><ins>+                                                        &lt;integer&gt;1&lt;/integer&gt;
</ins><span class="cx"> 
</span><span class="cx">                                                         &lt;!-- Define the attachment size distribution. --&gt;
</span><span class="cx">                                                         &lt;key&gt;fileSizeDistribution&lt;/key&gt;
</span><span class="lines">@@ -175,7 +175,7 @@
</span><span class="cx">                                                                 &lt;string&gt;contrib.performance.stats.NormalDistribution&lt;/string&gt;
</span><span class="cx">                                                                 &lt;key&gt;params&lt;/key&gt;
</span><span class="cx">                                                                 &lt;dict&gt;
</span><del>-                                                                        &lt;!-- mu gives the mean of the normal distribution (in seconds). --&gt;
</del><ins>+                                                                        &lt;!-- mu gives the mean of the normal distribution (in bytes). --&gt;
</ins><span class="cx">                                                                         &lt;key&gt;mu&lt;/key&gt;
</span><span class="cx">                                                                         &lt;integer&gt;500000&lt;/integer&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -379,7 +379,7 @@
</span><span class="cx">                                                                 &lt;string&gt;contrib.performance.stats.NormalDistribution&lt;/string&gt;
</span><span class="cx">                                                                 &lt;key&gt;params&lt;/key&gt;
</span><span class="cx">                                                                 &lt;dict&gt;
</span><del>-                                                                        &lt;!-- mu gives the mean of the normal distribution (in seconds). --&gt;
</del><ins>+                                                                        &lt;!-- mu gives the mean of the normal distribution (in bytes). --&gt;
</ins><span class="cx">                                                                         &lt;key&gt;mu&lt;/key&gt;
</span><span class="cx">                                                                         &lt;integer&gt;500000&lt;/integer&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -603,7 +603,7 @@
</span><span class="cx"> 
</span><span class="cx">                                                         &lt;!-- Percentage of time to attach a file --&gt;
</span><span class="cx">                                                         &lt;key&gt;fileAttachPercentage&lt;/key&gt;
</span><del>-                                                        &lt;integer&gt;10&lt;/integer&gt;
</del><ins>+                                                        &lt;integer&gt;1&lt;/integer&gt;
</ins><span class="cx"> 
</span><span class="cx">                                                         &lt;!-- Define the attachment size distribution. --&gt;
</span><span class="cx">                                                         &lt;key&gt;fileSizeDistribution&lt;/key&gt;
</span></span></pre></div>
<a id="CalendarServertrunkcontribperformanceloadtesticalpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/contrib/performance/loadtest/ical.py (15626 => 15627)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/contrib/performance/loadtest/ical.py        2016-05-20 19:45:30 UTC (rev 15626)
+++ CalendarServer/trunk/contrib/performance/loadtest/ical.py        2016-05-20 23:36:26 UTC (rev 15627)
</span><span class="lines">@@ -1566,7 +1566,7 @@
</span><span class="cx">                 self.calendarHomeHref = calendarHome
</span><span class="cx">             yield self._checkCalendarsForEvents(calendarHome, firstTime=True)
</span><span class="cx">             returnValue(calendarHome)
</span><del>-        calendarHome = yield self._newOperation(&quot;startup: %s&quot; % (self.title,), startup())
</del><ins>+        calendarHome = yield self._newOperation(&quot;startup&quot;, startup())
</ins><span class="cx"> 
</span><span class="cx">         self.started = True
</span><span class="cx"> 
</span></span></pre></div>
<a id="CalendarServertrunkcontribperformanceloadtestprofilespy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/contrib/performance/loadtest/profiles.py (15626 => 15627)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/contrib/performance/loadtest/profiles.py        2016-05-20 19:45:30 UTC (rev 15626)
+++ CalendarServer/trunk/contrib/performance/loadtest/profiles.py        2016-05-20 23:36:26 UTC (rev 15627)
</span><span class="lines">@@ -727,7 +727,7 @@
</span><span class="cx">     def modifyEvent(self, _ignore_href, vevent):
</span><span class="cx">         length = max(5, int(self._titleLength.sample()))
</span><span class="cx">         vevent.replaceProperty(Property(&quot;SUMMARY&quot;, &quot;Event&quot; + &quot;.&quot; * (length - 5)))
</span><del>-        return succeed(&quot;update{title}&quot;)
</del><ins>+        return succeed(&quot;update&quot;)
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -747,7 +747,7 @@
</span><span class="cx">     def modifyEvent(self, _ignore_href, vevent):
</span><span class="cx">         length = int(self._descriptionLength.sample())
</span><span class="cx">         vevent.replaceProperty(Property(&quot;DESCRIPTION&quot;, &quot;.&quot; * length))
</span><del>-        return succeed(&quot;update{description}&quot;)
</del><ins>+        return succeed(&quot;update&quot;)
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -1209,6 +1209,8 @@
</span><span class="cx">     _LATENCY_REASON = &quot;Median %(operation)s scheduling lag greater than %(cutoff)sms&quot;
</span><span class="cx">     _FAILED_REASON = &quot;Greater than %(cutoff).0f%% %(operation)s failed&quot;
</span><span class="cx">     _PUSH_MISSING_REASON = &quot;Push was configured but no pushes were received by clients&quot;
</span><ins>+    _REASON_1 = &quot;Greater than %(cutoff)g%% %(method)s exceeded &quot;
+    _REASON_2 = &quot;%g second response time&quot;
</ins><span class="cx"> 
</span><span class="cx">     def failures(self):
</span><span class="cx">         reasons = []
</span><span class="lines">@@ -1224,6 +1226,24 @@
</span><span class="cx">                 reasons.append(self._FAILED_REASON % dict(
</span><span class="cx">                     operation=operation.upper(), cutoff=self._fail_cut_off))
</span><span class="cx"> 
</span><ins>+        for operation, times in self._perOperationTimes.iteritems():
+            overDurations = [0] * len(self._thresholds)
+            for success, duration in times:
+                for ctr, item in enumerate(self._thresholds):
+                    threshold, _ignore_fail_at = item
+                    if duration &gt; threshold:
+                        overDurations[ctr] += 1
+            checks = []
+            for ctr, item in enumerate(self._thresholds):
+                threshold, fail_at = item
+                fail_at = fail_at.get(operation, fail_at[&quot;default&quot;])
+                checks.append(
+                    (overDurations[ctr], fail_at, self._REASON_1 + self._REASON_2 % (threshold,))
+                )
+            for count, cutoff, reason in checks:
+                if count * 100.0 / len(times) &gt; cutoff:
+                    reasons.append(reason % dict(method=operation.upper(), cutoff=cutoff))
+
</ins><span class="cx">         if self._fail_if_no_push and &quot;push&quot; not in self._perOperationTimes:
</span><span class="cx">             reasons.append(self._PUSH_MISSING_REASON)
</span><span class="cx"> 
</span></span></pre></div>
<a id="CalendarServertrunkcontribperformanceloadtestthresholdsjson"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/contrib/performance/loadtest/thresholds.json (15626 => 15627)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/contrib/performance/loadtest/thresholds.json        2016-05-20 19:45:30 UTC (rev 15626)
+++ CalendarServer/trunk/contrib/performance/loadtest/thresholds.json        2016-05-20 23:36:26 UTC (rev 15627)
</span><span class="lines">@@ -4,27 +4,27 @@
</span><span class="cx"> 
</span><span class="cx">                 &quot;thresholds&quot;: {
</span><span class="cx">                         &quot;default&quot;                       : [ 100.0, 100.0, 100.0,   5.0,   1.0,   0.5,   0.0],
</span><del>-        
</del><ins>+
</ins><span class="cx">                         &quot;GET{event}&quot;                    : [ 100.0, 100.0, 100.0,  75.0,  50.0,  25.0,   5.0],
</span><del>-        
</del><ins>+
</ins><span class="cx">                         &quot;PUT{event}&quot;                    : [ 100.0, 100.0, 100.0,  75.0,  50.0,  25.0,   0.5],
</span><span class="cx">                         &quot;PUT{update}&quot;                   : [ 100.0, 100.0, 100.0,  75.0,  50.0,  25.0,   0.5],
</span><span class="cx">                         &quot;PUT{attendee-small}&quot;           : [ 100.0, 100.0, 100.0,  75.0,  50.0,  25.0,   5.0],
</span><del>-                        &quot;PUT{attendee-medium}&quot;          : [ 100.0, 100.0, 100.0,  75.0,  50.0,  25.0,   5.0], 
</del><ins>+                        &quot;PUT{attendee-medium}&quot;          : [ 100.0, 100.0, 100.0,  75.0,  50.0,  25.0,   5.0],
</ins><span class="cx">                         &quot;PUT{attendee-large}&quot;           : [ 100.0, 100.0, 100.0,  100.0, 100.0, 100.0, 25.0],
</span><span class="cx">                         &quot;PUT{attendee-huge}&quot;            : [ 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0],
</span><del>-                        &quot;PUT{organizer-small}&quot;          : [ 100.0, 100.0, 100.0,  75.0,  50.0,  25.0,   5.0], 
</del><ins>+                        &quot;PUT{organizer-small}&quot;          : [ 100.0, 100.0, 100.0,  75.0,  50.0,  25.0,   5.0],
</ins><span class="cx">                         &quot;PUT{organizer-medium}&quot;         : [ 100.0, 100.0, 100.0,  75.0,  50.0,  25.0,   5.0],
</span><span class="cx">                         &quot;PUT{organizer-large}&quot;          : [ 100.0, 100.0, 100.0, 100.0, 100.0,  75.0,  25.0],
</span><span class="cx">                         &quot;PUT{organizer-huge}&quot;           : [ 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0],
</span><del>-        
</del><ins>+
</ins><span class="cx">                         &quot;DELETE{event}&quot;                 : [ 100.0, 100.0,  50.0,  25.0,  10.0,   5.0,   1.0],
</span><del>-        
</del><ins>+
</ins><span class="cx">                         &quot;POST{fb-small}&quot;                : [ 100.0, 100.0, 100.0,  75.0,  50.0,  25.0,   5.0],
</span><del>-                        &quot;POST{fb-medium}&quot;               : [ 100.0, 100.0, 100.0,  75.0,  50.0,  25.0,   5.0], 
-                        &quot;POST{fb-large}&quot;                : [ 100.0, 100.0, 100.0,  75.0,  50.0,  25.0,   5.0], 
-                        &quot;POST{fb-huge}&quot;                 : [ 100.0, 100.0, 100.0, 100.0,  75.0,  50.0,  25.0], 
-        
</del><ins>+                        &quot;POST{fb-medium}&quot;               : [ 100.0, 100.0, 100.0,  75.0,  50.0,  25.0,   5.0],
+                        &quot;POST{fb-large}&quot;                : [ 100.0, 100.0, 100.0,  75.0,  50.0,  25.0,   5.0],
+                        &quot;POST{fb-huge}&quot;                 : [ 100.0, 100.0, 100.0, 100.0,  75.0,  50.0,  25.0],
+
</ins><span class="cx">                         &quot;PROPFIND{well-known}&quot;          : [ 100.0, 100.0, 100.0,   5.0,   1.0,   0.5,   0.0],
</span><span class="cx">                         &quot;PROPFIND{find-principal}&quot;      : [ 100.0, 100.0, 100.0,   5.0,   1.0,   0.5,   0.0],
</span><span class="cx">                         &quot;PROPFIND{principal}&quot;           : [ 100.0, 100.0, 100.0,   5.0,   1.0,   0.5,   0.0],
</span><span class="lines">@@ -32,9 +32,9 @@
</span><span class="cx">                         &quot;PROPFIND{calendar}&quot;            : [ 100.0, 100.0, 100.0,   5.0,   1.0,   0.5,   0.0],
</span><span class="cx">                         &quot;PROPFIND{notification}&quot;        : [ 100.0, 100.0, 100.0,   5.0,   1.0,   0.5,   0.0],
</span><span class="cx">                         &quot;PROPFIND{notification-items}&quot;  : [ 100.0, 100.0, 100.0,   5.0,   1.0,   0.5,   0.0],
</span><del>-        
</del><ins>+
</ins><span class="cx">                         &quot;PROPPATCH{calendar}&quot;           : [ 100.0, 100.0, 100.0,   5.0,   1.0,   0.5,   0.0],
</span><del>-        
</del><ins>+
</ins><span class="cx">                         &quot;REPORT{pset}&quot;                  : [ 100.0, 100.0, 100.0,   5.0,   1.0,   0.5,   0.0],
</span><span class="cx">                         &quot;REPORT{expand}&quot;                : [ 100.0, 100.0, 100.0,   5.0,   1.0,   0.5,   0.0],
</span><span class="cx">                         &quot;REPORT{psearch}&quot;               : [ 100.0, 100.0, 100.0,   5.0,   1.0,   0.5,   0.0],
</span><span class="lines">@@ -56,11 +56,13 @@
</span><span class="cx"> 
</span><span class="cx">             &quot;accept&quot;                        : [ 100.0, 100.0, 100.0,  75.0,  50.0,  10.0,   5.0],
</span><span class="cx">             &quot;create&quot;                        : [ 100.0, 100.0, 100.0,  75.0,  50.0,  10.0,   5.0],
</span><del>-            &quot;update&quot;                        : [ 100.0, 100.0, 100.0,  75.0,  50.0,  10.0,   5.0],
</del><ins>+            &quot;download&quot;                      : [ 100.0, 100.0, 100.0,  75.0,  50.0,  10.0,   5.0],
</ins><span class="cx">             &quot;invite&quot;                        : [ 100.0, 100.0, 100.0, 100.0,  75.0,  50.0,  25.0],
</span><span class="cx">             &quot;poll&quot;                          : [ 100.0, 100.0, 100.0,  75.0,  50.0,  10.0,   5.0],
</span><span class="cx">             &quot;push&quot;                          : [ 100.0, 100.0, 100.0,  75.0,  50.0,  10.0,   5.0],
</span><del>-            &quot;reply done&quot;                    : [ 100.0, 100.0, 100.0,  75.0,  50.0,  10.0,   5.0]
</del><ins>+            &quot;reply done&quot;                    : [ 100.0, 100.0, 100.0,  75.0,  50.0,  10.0,   5.0],
+            &quot;startup&quot;                       : [ 100.0, 100.0, 100.0,  75.0,  50.0,  10.0,   5.0],
+            &quot;update&quot;                        : [ 100.0, 100.0, 100.0,  75.0,  50.0,  10.0,   5.0]
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> }
</span></span></pre>
</div>
</div>

</body>
</html>