Changeset 192494 in webkit
- Timestamp:
- Nov 16, 2015 3:52:46 PM (8 years ago)
- Location:
- trunk/PerformanceTests
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/PerformanceTests/Animometer/resources/extensions.js
r192455 r192494 275 275 { 276 276 headers.forEach(function (header) { 277 var th = document.createElement("th");277 var th = DocumentExtension.createElement("th", {}, row); 278 278 th.textContent = header.text; 279 279 if (typeof message != "undefined" && message.length) { 280 th.appendChild(document.createElement('br')); 281 th.appendChild(document.createTextNode('[' + message +']')); 280 th.innerHTML += "<br>" + '[' + message +']'; 282 281 message = ""; 283 282 } 284 283 if ("width" in header) 285 284 th.width = header.width + "%"; 286 row.appendChild(th);287 285 queue.push({element: th, headers: header.children }); 288 286 }); … … 324 322 }, 325 323 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); 335 332 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); 342 338 td.textContent = value.toFixed(digits || 2); 343 row.appendChild(td);344 339 }, 345 340 … … 348 343 var data = testResults[Strings["JSON_SAMPLES"][0]]; 349 344 if (!data) { 350 this._showEmpty (row);345 this._showEmptyCell(row, ""); 351 346 return; 352 347 } 353 348 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); 357 351 358 352 button.addEventListener("click", function() { … … 364 358 365 359 button.textContent = Strings["TEXT_RESULTS"][1] + "..."; 366 td.appendChild(button);367 row.appendChild(td);368 360 }, 369 361 … … 372 364 var data = testResults[Strings["JSON_SAMPLES"][0]]; 373 365 if (!data) { 374 this._showEmpty (row);366 this._showEmptyCell(row, ""); 375 367 return; 376 368 } 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); 381 372 382 373 button.addEventListener("click", function() { … … 385 376 386 377 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" : ""; 394 426 395 427 for (var index = 0; index < this._headers.length; ++index) { … … 397 429 switch (index) { 398 430 case 0: 399 this._showText(row, testName );431 this._showText(row, testName, className); 400 432 break; 401 433 … … 409 441 var data = testResults[Strings["JSON_EXPERIMENTS"][index - 2]]; 410 442 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 : ""); 412 444 break; 413 445 … … 418 450 } 419 451 } 420 421 this.element.appendChild(row); 422 }, 423 424 _showSuite: function(suiteName, suiteResults) 452 }, 453 454 _showSuite: function(suiteName, suiteResults, options) 425 455 { 426 456 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) 432 462 { 433 463 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) 439 471 { 440 472 this.clear(); 441 473 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) 446 478 { 447 479 this.clear(); … … 449 481 450 482 iterationsResults.forEach(function(iterationResults) { 451 this._showIteration(iterationResults );483 this._showIteration(iterationResults, options); 452 484 }, this); 453 485 } -
trunk/PerformanceTests/Animometer/runner/resources/animometer.css
r191873 r192494 162 162 } 163 163 164 .results-table td.noisy-results { 165 color: red; 166 } 167 168 .results-table td.suites-separator { 169 background-color: yellow; 170 } 171 164 172 /* -------------------------------------------------------------------------- */ 165 173 /* Results JSON */ -
trunk/PerformanceTests/Animometer/runner/resources/animometer.js
r191873 r192494 46 46 var json = this._resultsDashboard.toJSON(true, true); 47 47 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); 49 49 sectionsManager.showJSON("json", json[Strings["JSON_RESULTS"][0]][0]); 50 50 suitesManager.updateLocalStorageFromJSON(json[Strings["JSON_RESULTS"][0]][0]); -
trunk/PerformanceTests/Animometer/tests/resources/stage.js
r192491 r192494 174 174 175 175 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); 177 177 178 178 this._progressBar.setPos(progress); -
trunk/PerformanceTests/ChangeLog
r192491 r192494 1 2015-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 1 42 2015-11-16 Said Abou-Hallawa <sabouhallawa@apple.com> 2 43
Note: See TracChangeset
for help on using the changeset viewer.