Changeset 221114 in webkit
- Timestamp:
- Aug 23, 2017 4:04:13 PM (7 years ago)
- Location:
- trunk/PerformanceTests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/PerformanceTests/ChangeLog
r221106 r221114 1 2017-08-23 Ryosuke Niwa <rniwa@webkit.org> 2 3 Speedometer 2.0: Add the capability to run a specific suite 4 https://bugs.webkit.org/show_bug.cgi?id=175908 5 6 Reviewed by Saam Barati. 7 8 Added ?suite=X query parameter to specify a specific suite (e.g. React-TodoMVC) to run. 9 10 * Speedometer/resources/main.js: 11 (enableOneSuite): Added. 12 (startBenchmark): Return true if the benchmark actually had started running. 13 (startTest): Don't transition to the "running" state if the benchmark failed to start (e.g. no tests to run). 14 1 15 2017-08-23 Ryosuke Niwa <rniwa@webkit.org> 2 16 -
trunk/PerformanceTests/Speedometer/resources/main.js
r221045 r221114 150 150 } 151 151 152 function enableOneSuite(suites, suiteToEnable) 153 { 154 suiteToEnable = suiteToEnable.toLowerCase(); 155 var found = false; 156 for (var i = 0; i < suites.length; i++) { 157 var currentSuite = suites[i]; 158 if (currentSuite.name.toLowerCase() == suiteToEnable) { 159 currentSuite.disabled = false; 160 found = true; 161 } else 162 currentSuite.disabled = true; 163 } 164 return found; 165 } 166 152 167 function startBenchmark() { 168 var enabledSuites = Suites.filter(function (suite) { return !suite.disabled; }); 169 153 170 if (location.search.length > 1) { 154 171 var parts = location.search.substring(1).split('&'); … … 171 188 console.error('Invalid iteration count: ' + value); 172 189 break; 190 case 'suite': 191 if (!enableOneSuite(Suites, value)) { 192 alert('No tests to run'); 193 return false; 194 } 195 break; 173 196 } 174 197 } 175 198 } 176 199 177 var enabledSuites = Suites.filter(function (suite) { return !suite.disabled });200 var enabledSuites = Suites.filter(function (suite) { return !suite.disabled; }); 178 201 var totalSubtestCount = enabledSuites.reduce(function (testsCount, suite) { return testsCount + suite.tests.length; }, 0); 179 202 benchmarkClient.testsCount = benchmarkClient.iterationCount * totalSubtestCount; … … 181 204 var runner = new BenchmarkRunner(Suites, benchmarkClient); 182 205 runner.runMultipleIterations(benchmarkClient.iterationCount); 206 207 return true; 183 208 } 184 209 … … 206 231 207 232 function startTest() { 208 showSection('running');209 startBenchmark();233 if (startBenchmark()) 234 showSection('running'); 210 235 } 211 236
Note: See TracChangeset
for help on using the changeset viewer.