| OLD | NEW |
| 1 <!-- | 1 <!-- |
| 2 The <chromium-perf-sk> custom element declaration. Displays a form that allows
the user to queue a | 2 The <chromium-perf-sk> custom element declaration. Displays a form that allows
the user to queue a |
| 3 task to test Chromium/Skia performance. | 3 task to test Chromium/Skia performance. |
| 4 | 4 |
| 5 Attributes: | 5 Attributes: |
| 6 benchmarks: Which benchmarks to show. Must be set. | 6 benchmarks: Which benchmarks to show. Must be set. |
| 7 platformsToDesc: Map of platforms to their descriptions. Must be set. | 7 platformsToDesc: Map of platforms to their descriptions. Must be set. |
| 8 platforms: List of all supported platforms. Must be set. | 8 platforms: List of all supported platforms. Must be set. |
| 9 pageSets: List of all supported page sets, as accepted by page-set-selector-
sk property | 9 pageSets: List of all supported page sets, as accepted by page-set-selector-
sk property |
| 10 pageSets. Must be set. | 10 pageSets. Must be set. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 } | 23 } |
| 24 | 24 |
| 25 .iron-selected { | 25 .iron-selected { |
| 26 background-color: #D6ECF2; | 26 background-color: #D6ECF2; |
| 27 } | 27 } |
| 28 | 28 |
| 29 .long-field { | 29 .long-field { |
| 30 width: 40em; | 30 width: 40em; |
| 31 } | 31 } |
| 32 | 32 |
| 33 .hidden { |
| 34 display: none; |
| 35 } |
| 36 |
| 33 .short-field { | 37 .short-field { |
| 34 width: 5em; | 38 width: 5em; |
| 35 } | 39 } |
| 36 | 40 |
| 37 iron-selector.long-field > div { | 41 iron-selector.long-field > div { |
| 38 width: 40em; | 42 width: 40em; |
| 39 } | 43 } |
| 40 | 44 |
| 41 iron-selector.medium-field > div { | 45 iron-selector.medium-field > div { |
| 42 width: 20em; | 46 width: 20em; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 68 </paper-dialog> | 72 </paper-dialog> |
| 69 | 73 |
| 70 <table class="options panel"> | 74 <table class="options panel"> |
| 71 <tr> | 75 <tr> |
| 72 <td>Benchmark Name</td> | 76 <td>Benchmark Name</td> |
| 73 <td> | 77 <td> |
| 74 <iron-selector attr-for-selected="id" id="benchmark_name" selected="ra
sterize_and_record_micro" class="medium-field"> | 78 <iron-selector attr-for-selected="id" id="benchmark_name" selected="ra
sterize_and_record_micro" class="medium-field"> |
| 75 <template is="dom-repeat" items="{{benchmarks}}"> | 79 <template is="dom-repeat" items="{{benchmarks}}"> |
| 76 <div id="{{item}}">{{item}}</div> | 80 <div id="{{item}}">{{item}}</div> |
| 77 </template> | 81 </template> |
| 82 <div id="custom">custom</div> |
| 78 </iron-selector> | 83 </iron-selector> |
| 84 <paper-input value="" id="custom_benchmark_name" class="hidden" label=
"Enter name of your custom benchmark"></paper-input> |
| 79 </td> | 85 </td> |
| 80 </tr> | 86 </tr> |
| 81 | 87 |
| 82 <tr> | 88 <tr> |
| 83 <td>Target Platform</td> | 89 <td>Target Platform</td> |
| 84 <td> | 90 <td> |
| 85 <iron-selector attr-for-selected="id" id="target_platform" selected="L
inux" class="medium-field"> | 91 <iron-selector attr-for-selected="id" id="target_platform" selected="L
inux" class="medium-field"> |
| 86 <template is="dom-repeat" items="{{platforms}}"> | 92 <template is="dom-repeat" items="{{platforms}}"> |
| 87 <div id="{{item}}">{{getPlatformDesc(item)}}</div> | 93 <div id="{{item}}">{{getPlatformDesc(item)}}</div> |
| 88 </template> | 94 </template> |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 </td> | 168 </td> |
| 163 <td> | 169 <td> |
| 164 <patch-sk id="skia_patch" | 170 <patch-sk id="skia_patch" |
| 165 patch-type="skia" | 171 patch-type="skia" |
| 166 cl-description="{{skiaClDescription}}"> | 172 cl-description="{{skiaClDescription}}"> |
| 167 </patch-sk> | 173 </patch-sk> |
| 168 </td> | 174 </td> |
| 169 </tr> | 175 </tr> |
| 170 | 176 |
| 171 <tr> | 177 <tr> |
| 178 <td> |
| 179 Telemetry Git patch (optional)<br/> |
| 180 Applied to Chromium ToT<br/> |
| 181 Documentation is <a href="https://docs.google.com/document/d/1GhqosQcw
sy6F-eBAmFn_ITDF7_Iv_rY9FhCKwAnk9qQ/edit#heading=h.d3d1e25u2mzy">here</a> |
| 182 </td> |
| 183 <td> |
| 184 <patch-sk id="benchmark_patch" |
| 185 patch-type="chromium" |
| 186 cl-description="{{benchmarkClDescription}}"> |
| 187 </patch-sk> |
| 188 </td> |
| 189 </tr> |
| 190 |
| 191 <tr> |
| 172 <td>Repeat this task</td> | 192 <td>Repeat this task</td> |
| 173 <td> | 193 <td> |
| 174 <repeat-after-days-sk id="repeat_after_days"></repeat-after-days-sk> | 194 <repeat-after-days-sk id="repeat_after_days"></repeat-after-days-sk> |
| 175 </td> | 195 </td> |
| 176 </tr> | 196 </tr> |
| 177 | 197 |
| 178 <tr> | 198 <tr> |
| 179 <td>Description</td> | 199 <td>Description</td> |
| 180 <td> | 200 <td> |
| 181 <paper-input value="" id="desc" label="Description is required"></pape
r-input> | 201 <paper-input value="" id="desc" label="Description is required"></pape
r-input> |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 pageSets: { | 238 pageSets: { |
| 219 type: Array, | 239 type: Array, |
| 220 observer: 'pageSetsChanged', | 240 observer: 'pageSetsChanged', |
| 221 }, | 241 }, |
| 222 defaultLinuxBrowserArgs: { | 242 defaultLinuxBrowserArgs: { |
| 223 type: String, | 243 type: String, |
| 224 value: "--disable-setuid-sandbox --enable-threaded-compositing --enable
-impl-side-painting", | 244 value: "--disable-setuid-sandbox --enable-threaded-compositing --enable
-impl-side-painting", |
| 225 }, | 245 }, |
| 226 chromiumClDescription: String, | 246 chromiumClDescription: String, |
| 227 skiaClDescription: String, | 247 skiaClDescription: String, |
| 248 benchmarkClDescription: String, |
| 228 }, | 249 }, |
| 229 | 250 |
| 230 observers: [ | 251 observers: [ |
| 231 "clDescriptionChanged(chromiumClDescription, skiaClDescription)" | 252 "clDescriptionChanged(chromiumClDescription, skiaClDescription, benchmark
ClDescription)" |
| 232 ], | 253 ], |
| 233 | 254 |
| 234 ready: function() { | 255 ready: function() { |
| 235 var that = this; | 256 var that = this; |
| 236 this.$.benchmark_name.addEventListener('click', function(e) { | 257 this.$.benchmark_name.addEventListener('click', function(e) { |
| 237 that.setRunInParallel(); | 258 that.setRunInParallel(); |
| 259 that.$.custom_benchmark_name.classList.toggle("hidden", that.$.benchmar
k_name.selected != "custom"); |
| 238 }); | 260 }); |
| 239 this.$.target_platform.addEventListener('click', function(e) { | 261 this.$.target_platform.addEventListener('click', function(e) { |
| 240 that.platformChanged(); | 262 that.platformChanged(); |
| 241 that.setRunInParallel(); | 263 that.setRunInParallel(); |
| 242 }); | 264 }); |
| 243 this.$.submit_task.addEventListener('click', function(e) { | 265 this.$.submit_task.addEventListener('click', function(e) { |
| 244 that.validateTask(); | 266 that.validateTask(); |
| 245 }); | 267 }); |
| 246 this.$.task_dismiss.addEventListener('click', function(e) { | 268 this.$.task_dismiss.addEventListener('click', function(e) { |
| 247 that.dismissTask(); | 269 that.dismissTask(); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 this.$.page_sets.selected = "10k"; | 308 this.$.page_sets.selected = "10k"; |
| 287 this.$.browser_args_nopatch.value = this.defaultLinuxBrowserArgs; | 309 this.$.browser_args_nopatch.value = this.defaultLinuxBrowserArgs; |
| 288 this.$.browser_args_withpatch.value = this.defaultLinuxBrowserArgs; | 310 this.$.browser_args_withpatch.value = this.defaultLinuxBrowserArgs; |
| 289 } else { | 311 } else { |
| 290 this.$.page_sets.selected = "Mobile10k"; | 312 this.$.page_sets.selected = "Mobile10k"; |
| 291 this.$.browser_args_nopatch.value = ""; | 313 this.$.browser_args_nopatch.value = ""; |
| 292 this.$.browser_args_withpatch.value = ""; | 314 this.$.browser_args_withpatch.value = ""; |
| 293 } | 315 } |
| 294 }, | 316 }, |
| 295 | 317 |
| 296 clDescriptionChanged: function(chromiumClDescription, skiaClDescription) { | 318 clDescriptionChanged: function(chromiumClDescription, skiaClDescription, be
nchmarkClDescription) { |
| 297 if (!chromiumClDescription && !skiaClDescription) { | 319 if (!chromiumClDescription && !skiaClDescription && !benchmarkClDescripti
on) { |
| 298 this.$.desc.value = ""; | 320 this.$.desc.value = ""; |
| 299 } else { | 321 } else { |
| 300 var str = "Testing "; | 322 var str = "Testing "; |
| 301 var prev = false; | 323 var prev = false; |
| 302 if (chromiumClDescription) { | 324 if (chromiumClDescription) { |
| 303 str += chromiumClDescription; | 325 str += chromiumClDescription; |
| 304 prev = true; | 326 prev = true; |
| 305 } | 327 } |
| 306 if (skiaClDescription) { | 328 if (skiaClDescription) { |
| 307 if (prev) { | 329 if (prev) { |
| 308 str += " and "; | 330 str += " and "; |
| 309 } | 331 } |
| 310 str += skiaClDescription; | 332 str += skiaClDescription; |
| 311 prev = true; | 333 prev = true; |
| 312 } | 334 } |
| 335 if (benchmarkClDescription) { |
| 336 if (prev) { |
| 337 str += " with "; |
| 338 } |
| 339 str += benchmarkClDescription; |
| 340 prev = true; |
| 341 } |
| 313 this.$.desc.value = str; | 342 this.$.desc.value = str; |
| 314 } | 343 } |
| 315 }, | 344 }, |
| 316 | 345 |
| 317 validateTask: function() { | 346 validateTask: function() { |
| 318 if (!this.$.chromium_patch.validate() || | 347 if (!this.$.chromium_patch.validate() || |
| 319 !this.$.skia_patch.validate()) { | 348 !this.$.skia_patch.validate() || |
| 349 !this.$.benchmark_patch.validate()) { |
| 320 return; | 350 return; |
| 321 } | 351 } |
| 322 if (! this.$.desc.value) { | 352 if (! this.$.desc.value) { |
| 323 sk.errorMessage("Please specify a description"); | 353 sk.errorMessage("Please specify a description"); |
| 324 this.$.desc.focus(); | 354 this.$.desc.focus(); |
| 325 return; | 355 return; |
| 326 } | 356 } |
| 357 if (! this.getBenchmarkName()) { |
| 358 sk.errorMessage("Please specify a benchmark"); |
| 359 this.$.custom_benchmark_name.focus(); |
| 360 return; |
| 361 } |
| 327 this.$.confirm_dialog.open() | 362 this.$.confirm_dialog.open() |
| 328 }, | 363 }, |
| 329 | 364 |
| 330 dismissTask: function() { | 365 dismissTask: function() { |
| 331 sk.errorMessage("Did not queue"); | 366 sk.errorMessage("Did not queue"); |
| 332 this.$.confirm_dialog.close() | 367 this.$.confirm_dialog.close() |
| 333 }, | 368 }, |
| 334 | 369 |
| 370 getBenchmarkName: function() { |
| 371 if (this.$.benchmark_name.selected == "custom") { |
| 372 return this.$.custom_benchmark_name.value; |
| 373 } |
| 374 return this.$.benchmark_name.selected; |
| 375 }, |
| 376 |
| 335 queueTask: function() { | 377 queueTask: function() { |
| 336 var params = {}; | 378 var params = {}; |
| 337 params["benchmark"] = this.$.benchmark_name.selected; | 379 params["benchmark"] = this.getBenchmarkName(); |
| 338 params["platform"] = this.$.target_platform.selected; | 380 params["platform"] = this.$.target_platform.selected; |
| 339 params["page_sets"] = this.$.page_sets.selected; | 381 params["page_sets"] = this.$.page_sets.selected; |
| 340 params["repeat_runs"] = this.$.repeat_runs.selected; | 382 params["repeat_runs"] = this.$.repeat_runs.selected; |
| 341 params["run_in_parallel"] = this.$.run_in_parallel.selected; | 383 params["run_in_parallel"] = this.$.run_in_parallel.selected; |
| 342 params["benchmark_args"] = this.$.benchmark_args.value; | 384 params["benchmark_args"] = this.$.benchmark_args.value; |
| 343 params["browser_args_nopatch"] = this.$.browser_args_nopatch.value; | 385 params["browser_args_nopatch"] = this.$.browser_args_nopatch.value; |
| 344 params["browser_args_withpatch"] = this.$.browser_args_withpatch.value; | 386 params["browser_args_withpatch"] = this.$.browser_args_withpatch.value; |
| 345 params["desc"] = this.$.desc.value; | 387 params["desc"] = this.$.desc.value; |
| 346 params["chromium_patch"] = this.$.chromium_patch.patch; | 388 params["chromium_patch"] = this.$.chromium_patch.patch; |
| 347 params["skia_patch"] = this.$.skia_patch.patch; | 389 params["skia_patch"] = this.$.skia_patch.patch; |
| 390 params["benchmark_patch"] = this.$.benchmark_patch.patch; |
| 348 params["repeat_after_days"] = this.$.repeat_after_days.selected; | 391 params["repeat_after_days"] = this.$.repeat_after_days.selected; |
| 349 | 392 |
| 350 var that = this; | 393 var that = this; |
| 351 sk.post("/_/add_chromium_perf_task", JSON.stringify(params)).then(functio
n(resp) { | 394 sk.post("/_/add_chromium_perf_task", JSON.stringify(params)).then(functio
n(resp) { |
| 352 that.gotoRunsHistory(); | 395 that.gotoRunsHistory(); |
| 353 }).catch(sk.errorMessage); | 396 }).catch(sk.errorMessage); |
| 354 }, | 397 }, |
| 355 | 398 |
| 356 gotoRunsHistory: function() { | 399 gotoRunsHistory: function() { |
| 357 window.location.href = "/chromium_perf_runs/"; | 400 window.location.href = "/chromium_perf_runs/"; |
| 358 }, | 401 }, |
| 359 }); | 402 }); |
| 360 </script> | 403 </script> |
| OLD | NEW |