RESOLVED FIXED 150528
Add an option to make the graphics benchmark runs a specific test
https://bugs.webkit.org/show_bug.cgi?id=150528
Summary Add an option to make the graphics benchmark runs a specific test
Said Abou-Hallawa
Reported 2015-10-23 21:26:02 PDT
This option should be useful for profiling and testing a specific test.
Attachments
Patch (11.90 KB, patch)
2015-10-27 01:15 PDT, Jon Lee
no flags
Patch (11.12 KB, patch)
2015-10-27 19:03 PDT, Jon Lee
zalan: review+
Radar WebKit Bug Importer
Comment 1 2015-10-23 21:27:11 PDT
Jon Lee
Comment 2 2015-10-27 01:15:29 PDT
Said Abou-Hallawa
Comment 3 2015-10-27 09:27:22 PDT
Comment on attachment 264123 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=264123&action=review > PerformanceTests/Animometer/runner/animometer.html:34 > + <label><input id="show-running-results" type="checkbox" /> Show running results</label> void elements like <br> and <input> do not require slashes at the end. > PerformanceTests/Animometer/runner/resources/animometer.js:76 > + for (var i = 0; i < suiteItems.length; ++i) { Can't we use forEach() here? > PerformanceTests/Animometer/runner/resources/animometer.js:85 > + for (var j = 0; j < testCheckboxes.length; ++j) { Can't we use forEach() here? > PerformanceTests/Animometer/runner/resources/animometer.js:87 > + if (testCheckbox.checked) { Do we need to flip the condition and use continue like the if(!suiteCheckbox.checked) above? > PerformanceTests/Animometer/runner/resources/animometer.js:171 > +function initialize() { I am not sure about the style guidelines here. I was putting the opening brace of the function and the class on the same line like what you do. But I got a comment from Dean that the opening braces of the function and the class should be in a separate line. > PerformanceTests/Animometer/runner/resources/animometer.js:186 > + for (var i = 0; i < testCheckboxes.length; ++i) { Can't we use forEach() here? > PerformanceTests/Animometer/runner/resources/animometer.js:200 > + var noneSelected = true; Can't we used: var cSelected = 0; > PerformanceTests/Animometer/runner/resources/animometer.js:205 > + noneSelected = noneSelected && !testCheckbox.checked; cSelected += testCheckbox.checked; > PerformanceTests/Animometer/runner/resources/animometer.js:207 > + if (allSelected && !noneSelected) { if (cSelected == testCheckboxes.length) > PerformanceTests/Animometer/runner/resources/animometer.js:211 > + else if (!allSelected && noneSelected) { if (!cSelected) > PerformanceTests/Animometer/runner/resources/animometer.js:218 > + } We can even simplify the code and replace the whole if-statment by: suiteCheckbox.checked = cSelected > 0; suiteCheckbox.indeterminate = cSelected > 0 && cSelected < testCheckboxes.length;
Jon Lee
Comment 4 2015-10-27 13:27:59 PDT
Comment on attachment 264123 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=264123&action=review >> PerformanceTests/Animometer/runner/animometer.html:34 >> + <label><input id="show-running-results" type="checkbox" /> Show running results</label> > > void elements like <br> and <input> do not require slashes at the end. I can remove. That generally always bothered me but I don't know if we have a style policy of this. >> PerformanceTests/Animometer/runner/resources/animometer.js:76 >> + for (var i = 0; i < suiteItems.length; ++i) { > > Can't we use forEach() here? NodeLists are not Arrays. >> PerformanceTests/Animometer/runner/resources/animometer.js:85 >> + for (var j = 0; j < testCheckboxes.length; ++j) { > > Can't we use forEach() here? NodeLists are not Arrays. >> PerformanceTests/Animometer/runner/resources/animometer.js:87 >> + if (testCheckbox.checked) { > > Do we need to flip the condition and use continue like the if(!suiteCheckbox.checked) above? I didn't because the body wasn't large enough. But I can do it. >> PerformanceTests/Animometer/runner/resources/animometer.js:186 >> + for (var i = 0; i < testCheckboxes.length; ++i) { > > Can't we use forEach() here? NodeLists are not Arrays. >> PerformanceTests/Animometer/runner/resources/animometer.js:218 >> + } > > We can even simplify the code and replace the whole if-statment by: > suiteCheckbox.checked = cSelected > 0; > suiteCheckbox.indeterminate = cSelected > 0 && cSelected < testCheckboxes.length; Done.
Jon Lee
Comment 5 2015-10-27 19:03:16 PDT
Said Abou-Hallawa
Comment 6 2015-10-28 13:45:13 PDT
unofficial r=me
Jon Lee
Comment 7 2015-10-28 16:12:23 PDT
Note You need to log in before you can comment on or make changes to this bug.