<!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>[203176] trunk/Websites/test-results</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.webkit.org/projects/webkit/changeset/203176">203176</a></dd>
<dt>Author</dt> <dd>lforschler@apple.com</dd>
<dt>Date</dt> <dd>2016-07-13 13:04:09 -0700 (Wed, 13 Jul 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Update command for the results maintenance script.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkWebsitestestresultsconfigjson">trunk/Websites/test-results/config.json</a></li>
<li><a href="#trunkWebsitestestresultspublicadminbuildersphp">trunk/Websites/test-results/public/admin/builders.php</a></li>
<li><a href="#trunkWebsitestestresultspublicapireportphp">trunk/Websites/test-results/public/api/report.php</a></li>
<li><a href="#trunkWebsitestestresultspublicincludedbphp">trunk/Websites/test-results/public/include/db.php</a></li>
<li><a href="#trunkWebsitestestresultspublicincludejsonsharedphp">trunk/Websites/test-results/public/include/json-shared.php</a></li>
<li><a href="#trunkWebsitestestresultspublicincludetestresultsphp">trunk/Websites/test-results/public/include/test-results.php</a></li>
<li><a href="#trunkWebsitestestresultspublicindexhtml">trunk/Websites/test-results/public/index.html</a></li>
<li><a href="#trunkWebsitestestresultspublic_partition_maintenance">trunk/Websites/test-results/public_partition_maintenance</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkWebsitestestresultssizedatabasesql">trunk/Websites/test-results/size-database.sql</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkWebsitestestresultsconfigjson"></a>
<div class="modfile"><h4>Modified: trunk/Websites/test-results/config.json (203175 => 203176)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/test-results/config.json        2016-07-13 20:02:28 UTC (rev 203175)
+++ trunk/Websites/test-results/config.json        2016-07-13 20:04:09 UTC (rev 203176)
</span><span class="lines">@@ -7,7 +7,7 @@
</span><span class="cx">         &quot;host&quot;: &quot;localhost&quot;,
</span><span class="cx">         &quot;port&quot;: &quot;5432&quot;,
</span><span class="cx">         &quot;username&quot;: &quot;test-results-user&quot;,
</span><del>-        &quot;password&quot;: &quot;password&quot;,
</del><ins>+        &quot;password&quot;: &quot;intr1gue&quot;,
</ins><span class="cx">         &quot;name&quot;: &quot;test-results-db&quot;
</span><span class="cx">     },
</span><span class="cx">     &quot;masters&quot;: [
</span></span></pre></div>
<a id="trunkWebsitestestresultspublicadminbuildersphp"></a>
<div class="modfile"><h4>Modified: trunk/Websites/test-results/public/admin/builders.php (203175 => 203176)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/test-results/public/admin/builders.php        2016-07-13 20:02:28 UTC (rev 203175)
+++ trunk/Websites/test-results/public/admin/builders.php        2016-07-13 20:04:09 UTC (rev 203176)
</span><span class="lines">@@ -25,6 +25,7 @@
</span><span class="cx">     ));
</span><span class="cx"> 
</span><span class="cx">     $page-&gt;render_table('name');
</span><ins>+    $page-&gt;render_form_to_add();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> require('../include/admin-footer.php');
</span></span></pre></div>
<a id="trunkWebsitestestresultspublicapireportphp"></a>
<div class="modfile"><h4>Modified: trunk/Websites/test-results/public/api/report.php (203175 => 203176)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/test-results/public/api/report.php        2016-07-13 20:02:28 UTC (rev 203175)
+++ trunk/Websites/test-results/public/api/report.php        2016-07-13 20:04:09 UTC (rev 203176)
</span><span class="lines">@@ -62,6 +62,7 @@
</span><span class="cx">     if (!array_key_exists('file', $_FILES) or !array_key_exists('tmp_name', $_FILES['file']) or count($_FILES['file']['tmp_name']) &lt;= 0)
</span><span class="cx">         exit_with_error('ResultsJSONNotIncluded');
</span><span class="cx">     $json_path = $_FILES['file']['tmp_name'];
</span><ins>+    var_dump($_FILES);
</ins><span class="cx"> 
</span><span class="cx">     $db = connect();
</span><span class="cx">     store_results($db, $master, $builder_name, $build_number, $start_time, $end_time, $revisions, $json_path);
</span></span></pre></div>
<a id="trunkWebsitestestresultspublicincludedbphp"></a>
<div class="modfile"><h4>Modified: trunk/Websites/test-results/public/include/db.php (203175 => 203176)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/test-results/public/include/db.php        2016-07-13 20:02:28 UTC (rev 203175)
+++ trunk/Websites/test-results/public/include/db.php        2016-07-13 20:04:09 UTC (rev 203176)
</span><span class="lines">@@ -203,4 +203,4 @@
</span><span class="cx"> 
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-?&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+?&gt;
</ins></span></pre></div>
<a id="trunkWebsitestestresultspublicincludejsonsharedphp"></a>
<div class="modfile"><h4>Modified: trunk/Websites/test-results/public/include/json-shared.php (203175 => 203176)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/test-results/public/include/json-shared.php        2016-07-13 20:02:28 UTC (rev 203175)
+++ trunk/Websites/test-results/public/include/json-shared.php        2016-07-13 20:04:09 UTC (rev 203176)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> &lt;?php
</span><del>-ini_set('memory_limit','1024M');
</del><ins>+ini_set('memory_limit','-1');
</ins><span class="cx"> 
</span><span class="cx"> require_once('db.php');
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkWebsitestestresultspublicincludetestresultsphp"></a>
<div class="modfile"><h4>Modified: trunk/Websites/test-results/public/include/test-results.php (203175 => 203176)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/test-results/public/include/test-results.php        2016-07-13 20:02:28 UTC (rev 203175)
+++ trunk/Websites/test-results/public/include/test-results.php        2016-07-13 20:04:09 UTC (rev 203176)
</span><span class="lines">@@ -1,6 +1,8 @@
</span><span class="cx"> &lt;?php
</span><span class="cx"> ini_set('memory_limit', '1024M');
</span><span class="cx"> 
</span><ins>+ini_set('memory_limit', '1024M');
+
</ins><span class="cx"> require_once('db.php');
</span><span class="cx"> 
</span><span class="cx"> function float_to_time($time_in_float) {
</span></span></pre></div>
<a id="trunkWebsitestestresultspublicindexhtml"></a>
<div class="modfile"><h4>Modified: trunk/Websites/test-results/public/index.html (203175 => 203176)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/test-results/public/index.html        2016-07-13 20:02:28 UTC (rev 203175)
+++ trunk/Websites/test-results/public/index.html        2016-07-13 20:04:09 UTC (rev 203176)
</span><span class="lines">@@ -129,7 +129,16 @@
</span><span class="cx">             webkitRepositoryId = repositoryId;
</span><span class="cx">     }
</span><span class="cx">     var webkitRevision = result.build.revision(webkitRepositoryId);
</span><del>-    var resultsPage = webkitRevision ? &quot;http://&quot; + master + &quot;/results/&quot; + builder + &quot;/r&quot; + webkitRevision + &quot;%20(&quot; + buildNumber + &quot;)/results.html&quot;
</del><ins>+
+    // FIXME: This code definitely doesn't belong here.
+    var safariRepositoryId;
+    for (var repositoryId in TestResultsView._repositories) {
+        if (TestResultsView._repositories[repositoryId].name == 'Safari')
+            safariRepositoryId = repositoryId;
+    }
+    var safariRevision = result.build.revision(safariRepositoryId);
+
+    var resultsPage = webkitRevision ? &quot;http://&quot; + master + &quot;/results/&quot; + builder + &quot;/r&quot; + webkitRevision + '_' + safariRevision + &quot;%20(&quot; + buildNumber + &quot;)/results.html&quot;
</ins><span class="cx">         : 'javascript:alert(&quot;Could no resolve WebKit revision&quot;)';
</span><span class="cx"> 
</span><span class="cx">     var anchor = element('a', {'href': resultsPage }, [timeIfSlow]);
</span></span></pre></div>
<a id="trunkWebsitestestresultspublic_partition_maintenance"></a>
<div class="modfile"><h4>Modified: trunk/Websites/test-results/public_partition_maintenance (203175 => 203176)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/test-results/public_partition_maintenance        2016-07-13 20:02:28 UTC (rev 203175)
+++ trunk/Websites/test-results/public_partition_maintenance        2016-07-13 20:04:09 UTC (rev 203176)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> #!/bin/bash
</span><span class="cx"> # NOTE: psql must be available in the path.
</span><del>-psql -U &quot;test-results-user&quot; &lt;&lt;SQL
</del><ins>+psql test-results-db -h localhost&lt;&lt;SQL
</ins><span class="cx"> SELECT public.partition_maintenance('results'::text, 'public'::text, now()::date );
</span><del>-SQL
</del><span class="cx">\ No newline at end of file
</span><ins>+SQL
</ins></span></pre></div>
<a id="trunkWebsitestestresultssizedatabasesql"></a>
<div class="addfile"><h4>Added: trunk/Websites/test-results/size-database.sql (0 => 203176)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/test-results/size-database.sql                                (rev 0)
+++ trunk/Websites/test-results/size-database.sql        2016-07-13 20:04:09 UTC (rev 203176)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+SELECT
+    table_name,
+    pg_size_pretty(table_size) AS table_size,
+    pg_size_pretty(indexes_size) AS indexes_size,
+    pg_size_pretty(total_size) AS total_size
+FROM (
+    SELECT
+        table_name,
+        pg_table_size(table_name) AS table_size,
+        pg_indexes_size(table_name) AS indexes_size,
+        pg_total_relation_size(table_name) AS total_size
+    FROM (
+        SELECT ('&quot;' || table_schema || '&quot;.&quot;' || table_name || '&quot;') AS table_name
+        FROM information_schema.tables
+    ) AS all_tables
+    ORDER BY total_size DESC
+) AS pretty_sizes
+
</ins></span></pre>
</div>
</div>

</body>
</html>