Changeset 166038 in webkit


Ignore:
Timestamp:
Mar 20, 2014 9:05:05 PM (10 years ago)
Author:
zoltan@webkit.org
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:
Location:
trunk/PerformanceTests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/PerformanceTests/ChangeLog

    r166016 r166038  
     12014-03-20  Zoltan Horvath  <zoltan@webkit.org>
     2
     3        Add option for hiding Confidence Interval Delta on the performance tests results page
     4        https://bugs.webkit.org/show_bug.cgi?id=130483
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        I've found it useful to hide the confidence interval delta from the results table
     9        sometimes, for example on copying data, or for a clearer look. This patch introduces
     10        a new button for it on the local results page.
     11
     12        * resources/results-template.html:
     13
    1142014-03-20  Laszlo Vidacs  <lvidacs.u-szeged@partner.samsung.com>
    215
  • trunk/PerformanceTests/resources/results-template.html

    r144583 r166038  
    133133Result <span id="time-memory" class="checkbox"><span class="checked">Time</span><span>Memory</span></span>
    134134Reference <span id="reference" class="checkbox"></span>
     135<span title="Confidence Interval Delta">CI&#916;</span> <span id="confidenceIntervalDelta" class="checkbox"><span class="checked">Show</span><span>Hide</span></span>
    135136</div>
    136137<table id="container"></table>
     
    390391}
    391392
    392 function createTable(tests, runs, shouldIgnoreMemory, referenceIndex) {
     393function createTable(tests, runs, shouldIgnoreMemory, referenceIndex, hideConfidenceIntervalDelta) {
    393394    $('#container').html('<thead><tr><th>Test</th><th>Unit</th>' + runs.map(function (run, index) {
    394         return '<th colspan="' + (index == referenceIndex ? 2 : 3) + '" class="{sorter: \'comparison\'}">' + run.label() + '</th>';
     395        var colspan = 2;
     396        if (index != referenceIndex)
     397            colspan = 3;
     398        if (hideConfidenceIntervalDelta)
     399            colspan--;
     400        return '<th colspan="' + colspan + '" class="{sorter: \'comparison\'}">' + run.label() + '</th>';
    395401    }).reduce(function (markup, cell) { return markup + cell; }, '') + '</tr></head><tbody></tbody>');
    396402
     
    402408        var test = tests[testName];
    403409        if (test.isMemoryTest() != shouldIgnoreMemory)
    404             createTableRow(runs, test, referenceIndex);
     410            createTableRow(runs, test, referenceIndex, hideConfidenceIntervalDelta);
    405411    });
    406412
     
    446452    + '</svg>';
    447453
    448 function createTableRow(runs, test, referenceIndex) {
     454function createTableRow(runs, test, referenceIndex, hideConfidenceIntervalDelta) {
    449455    var tableRow = $('<tr><td class="test">' + test.name() + '</td><td class="unit">' + test.unit() + '</td></tr>');
    450456
     
    482488            + ', max=' + toFixedWidthPrecision(result.max()) + '\n' + regressionAnalysis;
    483489
     490        var confidenceIntervalDeltaCell = '';
     491        if (!hideConfidenceIntervalDelta) {
     492            confidenceIntervalDeltaCell = '<td class="confidenceIntervalDelta" title="' + statistics + '">&plusmn; '
     493                + formatPercentage(result.confidenceIntervalDeltaRatio()) + warning + '</td>';
     494        }
     495
    484496        // Tablesorter doesn't know about the second cell so put the comparison in the invisible element.
    485497        return '<td class="result" title="' + statistics + '">' + toFixedWidthPrecision(result.mean()) + hiddenValue
    486             + '</td><td class="confidenceIntervalDelta" title="' + statistics + '">&plusmn; '
    487             + formatPercentage(result.confidenceIntervalDeltaRatio()) + warning + '</td>' + comparisonCell;
     498            + '</td>' + confidenceIntervalDeltaCell + comparisonCell;
    488499    }
    489500
     
    581592    var shouldIgnoreMemory= true;
    582593    var referenceIndex = 0;
     594    var hideConfidenceIntervalDelta = false;
    583595
    584596    createTable(metrics, runs, shouldIgnoreMemory, referenceIndex);
     
    586598    $('#time-memory').bind('change', function (event, checkedElement) {
    587599        shouldIgnoreMemory = checkedElement.textContent == 'Time';
    588         createTable(metrics, runs, shouldIgnoreMemory, referenceIndex);
     600        createTable(metrics, runs, shouldIgnoreMemory, referenceIndex, hideConfidenceIntervalDelta);
    589601    });
    590602
     
    595607    $('#reference').bind('change', function (event, checkedElement) {
    596608        referenceIndex = parseInt(checkedElement.getAttribute('value'));
    597         createTable(metrics, runs, shouldIgnoreMemory, referenceIndex);
     609        createTable(metrics, runs, shouldIgnoreMemory, referenceIndex, hideConfidenceIntervalDelta);
     610    });
     611
     612    $('#confidenceIntervalDelta').bind('change', function (event, checkedElement) {
     613        hideConfidenceIntervalDelta = checkedElement.textContent == 'Hide';
     614        createTable(metrics, runs, shouldIgnoreMemory, referenceIndex, hideConfidenceIntervalDelta);
    598615    });
    599616
Note: See TracChangeset for help on using the changeset viewer.