Changeset 192494 in webkit


Ignore:
Timestamp:
Nov 16, 2015 3:52:46 PM (8 years ago)
Author:
commit-queue@webkit.org
Message:

Highlight the alarming test results in the graphics benchmark results page
https://bugs.webkit.org/show_bug.cgi?id=151286

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-11-16
Reviewed by Simon Fraser.

When showing the results of a test in the graphics benchmark the following
criteria is going to be applied:

  1. If the standard deviation of the test complexity or the frame rate is equal to or more than 10%, the standard deviation and the test name will be displayed in red.
  2. If the average frame rate is not in the range = [(desired_frame_rate - 2) .. (desired_frame_rate + 2)], the average frame rate and the test name will be displayed in red.
  • Animometer/resources/extensions.js:

(ResultsTable.prototype._showHeaderRow):
(ResultsTable.prototype._showHeader):
(ResultsTable.prototype._showEmptyCell):
(ResultsTable.prototype._showText):
(ResultsTable.prototype._showFixedNumber):
(ResultsTable.prototype.):
(ResultsTable.prototype._showGraph):
(ResultsTable.prototype._showJSON):
(ResultsTable.prototype._isAlarmingMeasurement):
(ResultsTable.prototype._isAlarmingTestResults):
(ResultsTable.prototype._showEmptyCells):
(ResultsTable.prototype._showEmptyRow):
(ResultsTable.prototype._showTest):
(ResultsTable.prototype._showSuite):
(ResultsTable.prototype._showIteration):
(ResultsTable.prototype.showRecord):
(ResultsTable.prototype.showIterations):
(ResultsTable.prototype._showEmpty): Deleted.

  • Animometer/runner/resources/animometer.js:

(window.benchmarkRunnerClient.didFinishLastIteration):

  • Animometer/tests/resources/stage.js:

(StageBenchmark.prototype.showResults):

Location:
trunk/PerformanceTests
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/PerformanceTests/Animometer/resources/extensions.js

    r192455 r192494  
    275275    {
    276276        headers.forEach(function (header) {
    277             var th = document.createElement("th");
     277            var th = DocumentExtension.createElement("th", {}, row);
    278278            th.textContent = header.text;
    279279            if (typeof message != "undefined" && message.length) {
    280                 th.appendChild(document.createElement('br'));
    281                 th.appendChild(document.createTextNode('[' + message +']'));
     280                th.innerHTML += "<br>" + '[' + message +']';
    282281                message = "";
    283282            }
    284283            if ("width" in header)
    285284                th.width = header.width + "%";
    286             row.appendChild(th);
    287285            queue.push({element: th, headers: header.children });
    288286        });
     
    324322    },
    325323   
    326     _showEmpty: function(row)
    327     {
    328         var td = document.createElement("td");
    329         row.appendChild(td);
    330     },
    331 
    332     _showText: function(row, text)
    333     {
    334         var td = document.createElement("td");
     324    _showEmptyCell: function(row, className)
     325    {
     326        return DocumentExtension.createElement("td", { class: className }, row);
     327    },
     328
     329    _showText: function(row, text, className)
     330    {
     331        var td = DocumentExtension.createElement("td", { class: className }, row);
    335332        td.textContent = text;
    336         row.appendChild(td);
    337     },
    338 
    339     _showFixedNumber: function(row, value, digits)
    340     {
    341         var td = document.createElement("td");
     333    },
     334
     335    _showFixedNumber: function(row, value, digits, className)
     336    {
     337        var td = DocumentExtension.createElement("td", { class: className }, row);
    342338        td.textContent = value.toFixed(digits || 2);
    343         row.appendChild(td);
    344339    },
    345340   
     
    348343        var data = testResults[Strings["JSON_SAMPLES"][0]];
    349344        if (!data) {
    350             this._showEmpty(row);
     345            this._showEmptyCell(row, "");
    351346            return;
    352347        }
    353348       
    354         var td = document.createElement("td");
    355         var button = document.createElement("button");
    356         button.className = "small-button";
     349        var td = DocumentExtension.createElement("td", {}, row);
     350        var button = DocumentExtension.createElement("button", { class: "small-button" }, td);
    357351
    358352        button.addEventListener("click", function() {
     
    364358           
    365359        button.textContent = Strings["TEXT_RESULTS"][1] + "...";
    366         td.appendChild(button);
    367         row.appendChild(td);
    368360    },
    369361
     
    372364        var data = testResults[Strings["JSON_SAMPLES"][0]];
    373365        if (!data) {
    374             this._showEmpty(row);
     366            this._showEmptyCell(row, "");
    375367            return;
    376368        }
    377        
    378         var td = document.createElement("td");
    379         var button = document.createElement("button");
    380         button.className = "small-button";
     369
     370        var td = DocumentExtension.createElement("td", {}, row);
     371        var button = DocumentExtension.createElement("button", { class: "small-button" }, td);
    381372
    382373        button.addEventListener("click", function() {
     
    385376           
    386377        button.textContent = Strings["TEXT_RESULTS"][2] + "...";
    387         td.appendChild(button);
    388         row.appendChild(td);
    389     },
    390 
    391     _showTest: function(testName, testResults)
    392     {
    393         var row = document.createElement("tr");
     378    },
     379   
     380    _isNoisyMeasurement: function(index, data, measurement, options)
     381    {
     382        const percentThreshold = 10;
     383        const averageThreshold = 2;
     384         
     385        if (measurement == Strings["JSON_MEASUREMENTS"][3])
     386            return data[Strings["JSON_MEASUREMENTS"][3]] >= percentThreshold;
     387           
     388        if (index == 1 && measurement == Strings["JSON_MEASUREMENTS"][0])
     389            return Math.abs(data[Strings["JSON_MEASUREMENTS"][0]] - options["frame-rate"]) >= averageThreshold;
     390
     391        return false;
     392    },
     393
     394    _isNoisyTest: function(testResults, options)
     395    {
     396        for (var index = 0; index < 2; ++index) {
     397            var data = testResults[Strings["JSON_EXPERIMENTS"][index]];
     398            for (var measurement in data) {
     399                if (this._isNoisyMeasurement(index, data, measurement, options))
     400                    return true;
     401            }
     402        }
     403        return false;
     404    },
     405
     406    _showEmptyCells: function(row, headers)
     407    {
     408        for (var index = 0; index < headers.length; ++index) {
     409            if (!headers[index].children.length)
     410                this._showEmptyCell(row, "suites-separator");
     411            else
     412                this._showEmptyCells(row, headers[index].children);
     413        }
     414    },
     415
     416    _showEmptyRow: function()
     417    {
     418        var row = DocumentExtension.createElement("tr", {}, this.element);
     419        this._showEmptyCells(row, this._headers);
     420    },
     421
     422    _showTest: function(testName, testResults, options)
     423    {
     424        var row = DocumentExtension.createElement("tr", {}, this.element);
     425        var className = this._isNoisyTest(testResults, options) ? "noisy-results" : "";
    394426       
    395427        for (var index = 0; index < this._headers.length; ++index) {
     
    397429            switch (index) {
    398430            case 0:
    399                 this._showText(row, testName);
     431                this._showText(row, testName, className);
    400432                break;
    401433
     
    409441                var data = testResults[Strings["JSON_EXPERIMENTS"][index - 2]];
    410442                for (var measurement in data)
    411                     this._showFixedNumber(row, data[measurement], 2);
     443                    this._showFixedNumber(row, data[measurement], 2, this._isNoisyMeasurement(index - 2, data, measurement, options) ? className : "");
    412444                break;
    413445               
     
    418450            }
    419451        }
    420        
    421         this.element.appendChild(row);
    422     },
    423 
    424     _showSuite: function(suiteName, suiteResults)
     452    },
     453
     454    _showSuite: function(suiteName, suiteResults, options)
    425455    {
    426456        for (var testName in suiteResults[Strings["JSON_RESULTS"][2]]) {
    427             this._showTest(testName, suiteResults[Strings["JSON_RESULTS"][2]][testName]);
    428         }
    429     },
    430    
    431     _showIteration : function(iterationResults)
     457            this._showTest(testName, suiteResults[Strings["JSON_RESULTS"][2]][testName], options);
     458        }
     459    },
     460   
     461    _showIteration : function(iterationResults, options)
    432462    {
    433463        for (var suiteName in iterationResults[Strings["JSON_RESULTS"][1]]) {
    434             this._showSuite(suiteName, iterationResults[Strings["JSON_RESULTS"][1]][suiteName]);
    435         }
    436     },
    437    
    438     showRecord: function(testName, message, testResults)
     464            if (suiteName != Object.keys(iterationResults[Strings["JSON_RESULTS"][1]])[0])
     465                this._showEmptyRow();
     466            this._showSuite(suiteName, iterationResults[Strings["JSON_RESULTS"][1]][suiteName], options);
     467        }
     468    },
     469   
     470    showRecord: function(testName, message, testResults, options)
    439471    {
    440472        this.clear();
    441473        this._showHeader(message);
    442         this._showTest(testName, testResults);
    443     },
    444 
    445     showIterations: function(iterationsResults)
     474        this._showTest(testName, testResults, options);
     475    },
     476
     477    showIterations: function(iterationsResults, options)
    446478    {
    447479        this.clear();
     
    449481       
    450482        iterationsResults.forEach(function(iterationResults) {
    451             this._showIteration(iterationResults);
     483            this._showIteration(iterationResults, options);
    452484        }, this);
    453485    }
  • trunk/PerformanceTests/Animometer/runner/resources/animometer.css

    r191873 r192494  
    162162}
    163163
     164.results-table td.noisy-results {
     165    color: red;
     166}
     167
     168.results-table td.suites-separator {
     169    background-color: yellow;
     170}
     171 
    164172/* -------------------------------------------------------------------------- */
    165173/*                              Results JSON                                  */
  • trunk/PerformanceTests/Animometer/runner/resources/animometer.js

    r191873 r192494  
    4646        var json = this._resultsDashboard.toJSON(true, true);
    4747        this.score = json[Strings["JSON_SCORE"]];
    48         this._resultsTable.showIterations(json[Strings["JSON_RESULTS"][0]]);
     48        this._resultsTable.showIterations(json[Strings["JSON_RESULTS"][0]], this.options);
    4949        sectionsManager.showJSON("json", json[Strings["JSON_RESULTS"][0]][0]);
    5050        suitesManager.updateLocalStorageFromJSON(json[Strings["JSON_RESULTS"][0]][0]);
  • trunk/PerformanceTests/Animometer/tests/resources/stage.js

    r192491 r192494  
    174174
    175175    if (this._options["show-running-results"])
    176         this._recordTable.showRecord(this._test.name, message, this._sampler.toJSON(true, false));
     176        this._recordTable.showRecord(this._test.name, message, this._sampler.toJSON(true, false), this._options);
    177177
    178178    this._progressBar.setPos(progress);
  • trunk/PerformanceTests/ChangeLog

    r192491 r192494  
     12015-11-16  Said Abou-Hallawa  <sabouhallawa@apple.com>
     2
     3        Highlight the alarming test results in the graphics benchmark results page
     4        https://bugs.webkit.org/show_bug.cgi?id=151286
     5
     6        Reviewed by Simon Fraser.
     7       
     8        When showing the results of a test in the graphics benchmark the following
     9        criteria is going to be applied:
     10       
     11        1. If the standard deviation of the test complexity or the frame rate is
     12           equal to or more than 10%, the standard deviation and the test name
     13           will be displayed in red.
     14        2. If the average frame rate is not in the range = [(desired_frame_rate - 2)
     15           .. (desired_frame_rate + 2)], the average frame rate and the test name will
     16           be displayed in red.
     17
     18        * Animometer/resources/extensions.js:
     19        (ResultsTable.prototype._showHeaderRow):
     20        (ResultsTable.prototype._showHeader):
     21        (ResultsTable.prototype._showEmptyCell):
     22        (ResultsTable.prototype._showText):
     23        (ResultsTable.prototype._showFixedNumber):
     24        (ResultsTable.prototype.):
     25        (ResultsTable.prototype._showGraph):
     26        (ResultsTable.prototype._showJSON):
     27        (ResultsTable.prototype._isAlarmingMeasurement):
     28        (ResultsTable.prototype._isAlarmingTestResults):
     29        (ResultsTable.prototype._showEmptyCells):
     30        (ResultsTable.prototype._showEmptyRow):
     31        (ResultsTable.prototype._showTest):
     32        (ResultsTable.prototype._showSuite):
     33        (ResultsTable.prototype._showIteration):
     34        (ResultsTable.prototype.showRecord):
     35        (ResultsTable.prototype.showIterations):
     36        (ResultsTable.prototype._showEmpty): Deleted.
     37        * Animometer/runner/resources/animometer.js:
     38        (window.benchmarkRunnerClient.didFinishLastIteration):
     39        * Animometer/tests/resources/stage.js:
     40        (StageBenchmark.prototype.showResults):
     41
    1422015-11-16  Said Abou-Hallawa  <sabouhallawa@apple.com>
    243
Note: See TracChangeset for help on using the changeset viewer.