Title: [166038] trunk/PerformanceTests
Revision
166038
Author
zol...@webkit.org
Date
2014-03-20 21:05:05 -0700 (Thu, 20 Mar 2014)

Log Message

Add option for hiding Confidence Interval Delta on the performance tests results page
https://bugs.webkit.org/show_bug.cgi?id=130483

Reviewed by Ryosuke Niwa.

I've found it useful to hide the confidence interval delta from the results table
sometimes, for example on copying data, or for a clearer look. This patch introduces
a new button for it on the local results page.

* resources/results-template.html:

Modified Paths

Diff

Modified: trunk/PerformanceTests/ChangeLog (166037 => 166038)


--- trunk/PerformanceTests/ChangeLog	2014-03-21 03:47:26 UTC (rev 166037)
+++ trunk/PerformanceTests/ChangeLog	2014-03-21 04:05:05 UTC (rev 166038)
@@ -1,3 +1,16 @@
+2014-03-20  Zoltan Horvath  <zol...@webkit.org>
+
+        Add option for hiding Confidence Interval Delta on the performance tests results page
+        https://bugs.webkit.org/show_bug.cgi?id=130483
+
+        Reviewed by Ryosuke Niwa.
+
+        I've found it useful to hide the confidence interval delta from the results table
+        sometimes, for example on copying data, or for a clearer look. This patch introduces
+        a new button for it on the local results page.
+
+        * resources/results-template.html:
+
 2014-03-20  Laszlo Vidacs  <lvidacs.u-sze...@partner.samsung.com>
 
         Optimize RenderTable::colToEffCol() for tables without colspans

Modified: trunk/PerformanceTests/resources/results-template.html (166037 => 166038)


--- trunk/PerformanceTests/resources/results-template.html	2014-03-21 03:47:26 UTC (rev 166037)
+++ trunk/PerformanceTests/resources/results-template.html	2014-03-21 04:05:05 UTC (rev 166038)
@@ -132,6 +132,7 @@
 <div style="padding: 0 10px;">
 Result <span id="time-memory" class="checkbox"><span class="checked">Time</span><span>Memory</span></span>
 Reference <span id="reference" class="checkbox"></span>
+<span title="Confidence Interval Delta">CI&#916;</span> <span id="confidenceIntervalDelta" class="checkbox"><span class="checked">Show</span><span>Hide</span></span>
 </div>
 <table id="container"></table>
 <script>
@@ -389,9 +390,14 @@
     return (fraction * 100).toFixed(2) + '%';
 }
 
-function createTable(tests, runs, shouldIgnoreMemory, referenceIndex) {
+function createTable(tests, runs, shouldIgnoreMemory, referenceIndex, hideConfidenceIntervalDelta) {
     $('#container').html('<thead><tr><th>Test</th><th>Unit</th>' + runs.map(function (run, index) {
-        return '<th colspan="' + (index == referenceIndex ? 2 : 3) + '" class="{sorter: \'comparison\'}">' + run.label() + '</th>';
+        var colspan = 2;
+        if (index != referenceIndex)
+            colspan = 3;
+        if (hideConfidenceIntervalDelta)
+            colspan--;
+        return '<th colspan="' + colspan + '" class="{sorter: \'comparison\'}">' + run.label() + '</th>';
     }).reduce(function (markup, cell) { return markup + cell; }, '') + '</tr></head><tbody></tbody>');
 
     var testNames = [];
@@ -401,7 +407,7 @@
     testNames.sort().map(function (testName) {
         var test = tests[testName];
         if (test.isMemoryTest() != shouldIgnoreMemory)
-            createTableRow(runs, test, referenceIndex);
+            createTableRow(runs, test, referenceIndex, hideConfidenceIntervalDelta);
     });
 
     $('#container').tablesorter({widgets: ['zebra']});
@@ -445,7 +451,7 @@
     + '<circle cx="50" cy="73" r="6" fill="white" />'
     + '</svg>';
 
-function createTableRow(runs, test, referenceIndex) {
+function createTableRow(runs, test, referenceIndex, hideConfidenceIntervalDelta) {
     var tableRow = $('<tr><td class="test">' + test.name() + '</td><td class="unit">' + test.unit() + '</td></tr>');
 
     function markupForRun(result, referenceResult) {
@@ -481,10 +487,15 @@
         var statistics = '&sigma;=' + toFixedWidthPrecision(result.confidenceIntervalDelta()) + ', min=' + toFixedWidthPrecision(result.min())
             + ', max=' + toFixedWidthPrecision(result.max()) + '\n' + regressionAnalysis;
 
+        var confidenceIntervalDeltaCell = '';
+        if (!hideConfidenceIntervalDelta) {
+            confidenceIntervalDeltaCell = '<td class="confidenceIntervalDelta" title="' + statistics + '">&plusmn; '
+                + formatPercentage(result.confidenceIntervalDeltaRatio()) + warning + '</td>';
+        }
+
         // Tablesorter doesn't know about the second cell so put the comparison in the invisible element.
         return '<td class="result" title="' + statistics + '">' + toFixedWidthPrecision(result.mean()) + hiddenValue
-            + '</td><td class="confidenceIntervalDelta" title="' + statistics + '">&plusmn; '
-            + formatPercentage(result.confidenceIntervalDeltaRatio()) + warning + '</td>' + comparisonCell;
+            + '</td>' + confidenceIntervalDeltaCell + comparisonCell;
     }
 
     function markupForMissingRun(isReference) {
@@ -580,12 +591,13 @@
 
     var shouldIgnoreMemory= true;
     var referenceIndex = 0;
+    var hideConfidenceIntervalDelta = false;
 
     createTable(metrics, runs, shouldIgnoreMemory, referenceIndex);
 
     $('#time-memory').bind('change', function (event, checkedElement) {
         shouldIgnoreMemory = checkedElement.textContent == 'Time';
-        createTable(metrics, runs, shouldIgnoreMemory, referenceIndex);
+        createTable(metrics, runs, shouldIgnoreMemory, referenceIndex, hideConfidenceIntervalDelta);
     });
 
     runs.map(function (run, index) {
@@ -594,9 +606,14 @@
 
     $('#reference').bind('change', function (event, checkedElement) {
         referenceIndex = parseInt(checkedElement.getAttribute('value'));
-        createTable(metrics, runs, shouldIgnoreMemory, referenceIndex);
+        createTable(metrics, runs, shouldIgnoreMemory, referenceIndex, hideConfidenceIntervalDelta);
     });
 
+    $('#confidenceIntervalDelta').bind('change', function (event, checkedElement) {
+        hideConfidenceIntervalDelta = checkedElement.textContent == 'Hide';
+        createTable(metrics, runs, shouldIgnoreMemory, referenceIndex, hideConfidenceIntervalDelta);
+    });
+
     $('.checkbox').each(function (index, checkbox) {
         $(checkbox).children('span').click(function (event) {
             if ($(this).hasClass('checked'))
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to