<!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>[13752] CalendarServer/trunk</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/13752">13752</a></dd>
<dt>Author</dt> <dd>cdaboo@apple.com</dd>
<dt>Date</dt> <dd>2014-07-11 13:03:42 -0700 (Fri, 11 Jul 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Fix sqlusage tool.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#CalendarServertrunkconfauthaccountstestxml">CalendarServer/trunk/conf/auth/accounts-test.xml</a></li>
<li><a href="#CalendarServertrunkconfauthgenerate_test_accountspy">CalendarServer/trunk/conf/auth/generate_test_accounts.py</a></li>
<li><a href="#CalendarServertrunkcontribperformancesqlusagerequestshttpTestspy">CalendarServer/trunk/contrib/performance/sqlusage/requests/httpTests.py</a></li>
<li><a href="#CalendarServertrunkcontribperformancesqlusagerequestsmultigetpy">CalendarServer/trunk/contrib/performance/sqlusage/requests/multiget.py</a></li>
<li><a href="#CalendarServertrunkcontribperformancesqlusagerequestspropfindpy">CalendarServer/trunk/contrib/performance/sqlusage/requests/propfind.py</a></li>
<li><a href="#CalendarServertrunkcontribperformancesqlusagerequestspropfind_invitepy">CalendarServer/trunk/contrib/performance/sqlusage/requests/propfind_invite.py</a></li>
<li><a href="#CalendarServertrunkcontribperformancesqlusagerequestsquerypy">CalendarServer/trunk/contrib/performance/sqlusage/requests/query.py</a></li>
<li><a href="#CalendarServertrunkcontribperformancesqlusagerequestssyncpy">CalendarServer/trunk/contrib/performance/sqlusage/requests/sync.py</a></li>
<li><a href="#CalendarServertrunkcontribperformancesqlusagesqlusagepy">CalendarServer/trunk/contrib/performance/sqlusage/sqlusage.py</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="CalendarServertrunkconfauthaccountstestxml"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/conf/auth/accounts-test.xml (13751 => 13752)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/conf/auth/accounts-test.xml        2014-07-11 18:04:46 UTC (rev 13751)
+++ CalendarServer/trunk/conf/auth/accounts-test.xml        2014-07-11 20:03:42 UTC (rev 13752)
</span><span class="lines">@@ -844,6 +844,14 @@
</span><span class="cx"> <email>user100@example.com</email>
</span><span class="cx"> </record>
</span><span class="cx"> <record type="user">
</span><ins>+ <uid>10000000-0000-0000-0000-000000000101</uid>
+ <guid>10000000-0000-0000-0000-000000000101</guid>
+ <short-name>user101</short-name>
+ <password>user101</password>
+ <full-name>User 101</full-name>
+ <email>user101@example.com</email>
+</record>
+<record type="user">
</ins><span class="cx"> <uid>50000000-0000-0000-0000-000000000001</uid>
</span><span class="cx"> <guid>50000000-0000-0000-0000-000000000001</guid>
</span><span class="cx"> <short-name>public01</short-name>
</span></span></pre></div>
<a id="CalendarServertrunkconfauthgenerate_test_accountspy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/conf/auth/generate_test_accounts.py (13751 => 13752)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/conf/auth/generate_test_accounts.py        2014-07-11 18:04:46 UTC (rev 13751)
+++ CalendarServer/trunk/conf/auth/generate_test_accounts.py        2014-07-11 20:03:42 UTC (rev 13752)
</span><span class="lines">@@ -59,8 +59,8 @@
</span><span class="cx"> </record>
</span><span class="cx"> """.format(uid=uid, guid=guid, fullName=fullName))
</span><span class="cx">
</span><del>-# user01-100
-for i in xrange(1, 501 if EXTRA_GROUPS else 101):
</del><ins>+# user01-101
+for i in xrange(1, 501 if EXTRA_GROUPS else 102):
</ins><span class="cx"> out.write("""<record type="user">
</span><span class="cx"> <uid>{guid}</uid>
</span><span class="cx"> <guid>{guid}</guid>
</span></span></pre></div>
<a id="CalendarServertrunkcontribperformancesqlusagerequestshttpTestspy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/contrib/performance/sqlusage/requests/httpTests.py (13751 => 13752)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/contrib/performance/sqlusage/requests/httpTests.py        2014-07-11 18:04:46 UTC (rev 13751)
+++ CalendarServer/trunk/contrib/performance/sqlusage/requests/httpTests.py        2014-07-11 20:03:42 UTC (rev 13752)
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx"> self.timing = timing
</span><span class="cx">
</span><span class="cx">
</span><del>- def __init__(self, label, sessions, logFilePath):
</del><ins>+ def __init__(self, label, sessions, logFilePath, logFilePrefix):
</ins><span class="cx"> """
</span><span class="cx"> @param label: label used to identify the test
</span><span class="cx"> @type label: C{str}
</span><span class="lines">@@ -39,6 +39,7 @@
</span><span class="cx"> self.label = label
</span><span class="cx"> self.sessions = sessions
</span><span class="cx"> self.logFilePath = logFilePath
</span><ins>+ self.logFilePrefix = logFilePrefix
</ins><span class="cx"> self.result = None
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -95,7 +96,7 @@
</span><span class="cx"> offset = 0
</span><span class="cx"> while True:
</span><span class="cx"> if lines[offset] == "*** SQL Stats ***":
</span><del>- if lines[offset + 2].split()[1] != "unlabeled":
</del><ins>+ if lines[offset + 2].startswith("Label: <"):
</ins><span class="cx"> count = extractInt(lines[offset + 4])
</span><span class="cx"> rows = extractInt(lines[offset + 5])
</span><span class="cx"> timing = extractFloat(lines[offset + 6])
</span><span class="lines">@@ -105,7 +106,8 @@
</span><span class="cx"> else:
</span><span class="cx"> self.result = HTTPTestBase.SQLResults(-1, -1, 0.0)
</span><span class="cx">
</span><del>- with open("%s-%d-%s" % (self.logFilePath, event_count, self.label), "w") as f:
</del><ins>+ # Archive current sqlstats file
+ with open("%s-%s-%d-%s" % (self.logFilePath, self.logFilePrefix, event_count, self.label), "w") as f:
</ins><span class="cx"> f.write(data)
</span><span class="cx">
</span><span class="cx">
</span></span></pre></div>
<a id="CalendarServertrunkcontribperformancesqlusagerequestsmultigetpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/contrib/performance/sqlusage/requests/multiget.py (13751 => 13752)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/contrib/performance/sqlusage/requests/multiget.py        2014-07-11 18:04:46 UTC (rev 13751)
+++ CalendarServer/trunk/contrib/performance/sqlusage/requests/multiget.py        2014-07-11 20:03:42 UTC (rev 13752)
</span><span class="lines">@@ -26,8 +26,8 @@
</span><span class="cx"> A multiget operation
</span><span class="cx"> """
</span><span class="cx">
</span><del>- def __init__(self, label, sessions, logFilePath, count):
- super(MultigetTest, self).__init__(label, sessions, logFilePath)
</del><ins>+ def __init__(self, label, sessions, logFilePath, logFilePrefix, count):
+ super(MultigetTest, self).__init__(label, sessions, logFilePath, logFilePrefix)
</ins><span class="cx"> self.count = count
</span><span class="cx">
</span><span class="cx">
</span></span></pre></div>
<a id="CalendarServertrunkcontribperformancesqlusagerequestspropfindpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/contrib/performance/sqlusage/requests/propfind.py (13751 => 13752)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/contrib/performance/sqlusage/requests/propfind.py        2014-07-11 18:04:46 UTC (rev 13751)
+++ CalendarServer/trunk/contrib/performance/sqlusage/requests/propfind.py        2014-07-11 20:03:42 UTC (rev 13752)
</span><span class="lines">@@ -25,8 +25,8 @@
</span><span class="cx"> A propfind operation
</span><span class="cx"> """
</span><span class="cx">
</span><del>- def __init__(self, label, sessions, logFilePath, depth=1):
- super(PropfindTest, self).__init__(label, sessions, logFilePath)
</del><ins>+ def __init__(self, label, sessions, logFilePath, logFilePrefix, depth=1):
+ super(PropfindTest, self).__init__(label, sessions, logFilePath, logFilePrefix)
</ins><span class="cx"> self.depth = headers.Depth1 if depth == 1 else headers.Depth0
</span><span class="cx">
</span><span class="cx">
</span></span></pre></div>
<a id="CalendarServertrunkcontribperformancesqlusagerequestspropfind_invitepy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/contrib/performance/sqlusage/requests/propfind_invite.py (13751 => 13752)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/contrib/performance/sqlusage/requests/propfind_invite.py        2014-07-11 18:04:46 UTC (rev 13751)
+++ CalendarServer/trunk/contrib/performance/sqlusage/requests/propfind_invite.py        2014-07-11 20:03:42 UTC (rev 13752)
</span><span class="lines">@@ -26,8 +26,8 @@
</span><span class="cx"> A propfind operation
</span><span class="cx"> """
</span><span class="cx">
</span><del>- def __init__(self, label, sessions, logFilePath, depth=1):
- super(PropfindInviteTest, self).__init__(label, sessions, logFilePath)
</del><ins>+ def __init__(self, label, sessions, logFilePath, logFilePrefix, depth=1):
+ super(PropfindInviteTest, self).__init__(label, sessions, logFilePath, logFilePrefix)
</ins><span class="cx"> self.depth = headers.Depth1 if depth == 1 else headers.Depth0
</span><span class="cx">
</span><span class="cx">
</span></span></pre></div>
<a id="CalendarServertrunkcontribperformancesqlusagerequestsquerypy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/contrib/performance/sqlusage/requests/query.py (13751 => 13752)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/contrib/performance/sqlusage/requests/query.py        2014-07-11 18:04:46 UTC (rev 13751)
+++ CalendarServer/trunk/contrib/performance/sqlusage/requests/query.py        2014-07-11 20:03:42 UTC (rev 13752)
</span><span class="lines">@@ -60,8 +60,8 @@
</span><span class="cx"> A sync operation
</span><span class="cx"> """
</span><span class="cx">
</span><del>- def __init__(self, label, sessions, logFilePath, count):
- super(QueryTest, self).__init__(label, sessions, logFilePath)
</del><ins>+ def __init__(self, label, sessions, logFilePath, logFilePrefix, count):
+ super(QueryTest, self).__init__(label, sessions, logFilePath, logFilePrefix)
</ins><span class="cx"> self.count = count
</span><span class="cx">
</span><span class="cx">
</span></span></pre></div>
<a id="CalendarServertrunkcontribperformancesqlusagerequestssyncpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/contrib/performance/sqlusage/requests/sync.py (13751 => 13752)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/contrib/performance/sqlusage/requests/sync.py        2014-07-11 18:04:46 UTC (rev 13751)
+++ CalendarServer/trunk/contrib/performance/sqlusage/requests/sync.py        2014-07-11 20:03:42 UTC (rev 13752)
</span><span class="lines">@@ -58,8 +58,8 @@
</span><span class="cx"> A sync operation
</span><span class="cx"> """
</span><span class="cx">
</span><del>- def __init__(self, label, sessions, logFilePath, full, count):
- super(SyncTest, self).__init__(label, sessions, logFilePath)
</del><ins>+ def __init__(self, label, sessions, logFilePath, logFilePrefix, full, count):
+ super(SyncTest, self).__init__(label, sessions, logFilePath, logFilePrefix)
</ins><span class="cx"> self.full = full
</span><span class="cx"> self.count = count
</span><span class="cx"> self.synctoken = ""
</span></span></pre></div>
<a id="CalendarServertrunkcontribperformancesqlusagesqlusagepy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/contrib/performance/sqlusage/sqlusage.py (13751 => 13752)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/contrib/performance/sqlusage/sqlusage.py        2014-07-11 18:04:46 UTC (rev 13751)
+++ CalendarServer/trunk/contrib/performance/sqlusage/sqlusage.py        2014-07-11 20:03:42 UTC (rev 13752)
</span><span class="lines">@@ -115,15 +115,15 @@
</span><span class="cx">
</span><span class="cx"> # Set of requests to execute
</span><span class="cx"> requests = [
</span><del>- MultigetTest("mget-1" if self.compact else "multiget-1", sessions, self.logFilePath, 1),
- MultigetTest("mget-50" if self.compact else "multiget-50", sessions, self.logFilePath, 50),
- PropfindTest("prop-cal" if self.compact else "propfind-cal", sessions, self.logFilePath, 1),
- SyncTest("s-full" if self.compact else "sync-full", sessions, self.logFilePath, True, 0),
- SyncTest("s-1" if self.compact else "sync-1", sessions, self.logFilePath, False, 1),
- QueryTest("q-1" if self.compact else "query-1", sessions, self.logFilePath, 1),
- QueryTest("q-10" if self.compact else "query-10", sessions, self.logFilePath, 10),
- PutTest("put", sessions, self.logFilePath),
- InviteTest("invite", sessions, self.logFilePath),
</del><ins>+ MultigetTest("mget-1" if self.compact else "multiget-1", sessions, self.logFilePath, "event", 1),
+ MultigetTest("mget-50" if self.compact else "multiget-50", sessions, self.logFilePath, "event", 50),
+ PropfindTest("prop-cal" if self.compact else "propfind-cal", sessions, self.logFilePath, "event", 1),
+ SyncTest("s-full" if self.compact else "sync-full", sessions, self.logFilePath, "event", True, 0),
+ SyncTest("s-1" if self.compact else "sync-1", sessions, self.logFilePath, "event", False, 1),
+ QueryTest("q-1" if self.compact else "query-1", sessions, self.logFilePath, "event", 1),
+ QueryTest("q-10" if self.compact else "query-10", sessions, self.logFilePath, "event", 10),
+ PutTest("put", sessions, self.logFilePath, "event"),
+ InviteTest("invite", sessions, self.logFilePath, "event"),
</ins><span class="cx"> ]
</span><span class="cx"> self.requestLabels = [request.label for request in requests]
</span><span class="cx">
</span><span class="lines">@@ -221,14 +221,14 @@
</span><span class="cx">
</span><span class="cx"> # Set of requests to execute
</span><span class="cx"> requests = [
</span><del>- MultigetTest("mget-1" if self.compact else "multiget-1", sessions, self.logFilePath, 1),
- MultigetTest("mget-50" if self.compact else "multiget-50", sessions, self.logFilePath, 50),
- PropfindInviteTest("propfind", sessions, self.logFilePath, 1),
- SyncTest("s-full" if self.compact else "sync-full", sessions, self.logFilePath, True, 0),
- SyncTest("s-1" if self.compact else "sync-1", sessions, self.logFilePath, False, 1),
- QueryTest("q-1" if self.compact else "query-1", sessions, self.logFilePath, 1),
- QueryTest("q-10" if self.compact else "query-10", sessions, self.logFilePath, 10),
- PutTest("put", sessions, self.logFilePath),
</del><ins>+ MultigetTest("mget-1" if self.compact else "multiget-1", sessions, self.logFilePath, "share", 1),
+ MultigetTest("mget-50" if self.compact else "multiget-50", sessions, self.logFilePath, "share", 50),
+ PropfindInviteTest("propfind", sessions, self.logFilePath, "share", 1),
+ SyncTest("s-full" if self.compact else "sync-full", sessions, self.logFilePath, "share", True, 0),
+ SyncTest("s-1" if self.compact else "sync-1", sessions, self.logFilePath, "share", False, 1),
+ QueryTest("q-1" if self.compact else "query-1", sessions, self.logFilePath, "share", 1),
+ QueryTest("q-10" if self.compact else "query-10", sessions, self.logFilePath, "share", 10),
+ PutTest("put", sessions, self.logFilePath, "share"),
</ins><span class="cx"> ]
</span><span class="cx"> self.requestLabels = [request.label for request in requests]
</span><span class="cx">
</span><span class="lines">@@ -286,7 +286,7 @@
</span><span class="cx"> for i in range(n - self.currentCount):
</span><span class="cx"> index = self.currentCount + i + 2
</span><span class="cx"> users.append("user%02d" % (index,))
</span><del>- uids.append("urn:x-uid:user%02d" % (index,))
</del><ins>+ uids.append("urn:x-uid:10000000-0000-0000-0000-000000000%03d" % (index,))
</ins><span class="cx"> session.addInvitees(URL(path=calendarhref), uids, True)
</span><span class="cx">
</span><span class="cx"> # Now accept each one
</span></span></pre>
</div>
</div>
</body>
</html>