1from __future__ import absolute_import 2 3import os 4 5from talos import filter 6 7""" 8test definitions for Talos 9""" 10 11_TESTS = {} # internal dict of Talos test classes 12 13 14def register_test(): 15 """Decorator to register Talos test classes""" 16 def wrapper(klass): 17 assert issubclass(klass, Test) 18 assert klass.name() not in _TESTS 19 20 _TESTS[klass.name()] = klass 21 return klass 22 return wrapper 23 24 25def test_dict(): 26 """Return the dict of the registered test classes""" 27 return _TESTS 28 29 30class Test(object): 31 """abstract base class for a Talos test case""" 32 __test__ = False # not pytest 33 34 cycles = None # number of cycles 35 keys = [] 36 desktop = True 37 filters = filter.ignore_first.prepare(1) + filter.median.prepare() 38 lower_is_better = True 39 alert_threshold = 2.0 40 41 @classmethod 42 def name(cls): 43 return cls.__name__ 44 45 @classmethod 46 def description(cls): 47 if cls.__doc__ is None: 48 return "No documentation available yet." 49 else: 50 doc = cls.__doc__ 51 description_lines = [i.strip() for i in doc.strip().splitlines()] 52 return "\n".join(description_lines) 53 54 def __init__(self, **kw): 55 self.update(**kw) 56 57 def update(self, **kw): 58 self.__dict__.update(kw) 59 60 def items(self): 61 """ 62 returns a list of 2-tuples 63 """ 64 retval = [('name', self.name())] 65 for key in self.keys: 66 value = getattr(self, key, None) 67 if value is not None: 68 retval.append((key, value)) 69 return retval 70 71 def __str__(self): 72 """string form appropriate for YAML output""" 73 items = self.items() 74 75 key, value = items.pop(0) 76 lines = ["- %s: %s" % (key, value)] 77 for key, value in items: 78 lines.append(' %s: %s' % (key, value)) 79 return '\n'.join(lines) 80 81 82# ts-style startup tests (ts, twinopen, ts_cold, etc) 83# The overall test number is calculated by excluding the max opening time 84# and taking an average of the remaining numbers. 85class TsBase(Test): 86 """abstract base class for ts-style tests""" 87 keys = [ 88 'url', 89 'url_timestamp', 90 'timeout', 91 'cycles', 92 'profile_path', # The path containing the template profile. This 93 # directory is copied to the temporary profile during 94 # initialization of the test. If some of the files may 95 # be overwritten by Firefox and need to be reinstalled 96 # before each pass, use key |reinstall| 97 'gecko_profile', 98 'gecko_profile_interval', 99 'gecko_profile_entries', 100 'gecko_profile_startup', 101 'preferences', 102 'xperf_counters', 103 'xperf_providers', 104 'xperf_user_providers', 105 'xperf_stackwalk', 106 'tpmozafterpaint', 107 'fnbpaint', 108 'tphero', 109 'profile', 110 'firstpaint', 111 'userready', 112 'testeventmap', 113 'base_vs_ref', 114 'extensions', 115 'filters', 116 'setup', 117 'cleanup', 118 'webextensions', 119 'reinstall', # A list of files from the profile directory that 120 # should be copied to the temporary profile prior to 121 # running each cycle, to avoid one cycle overwriting 122 # the data used by the next another cycle (may be used 123 # e.g. for sessionstore.js to ensure that all cycles 124 # use the exact same sessionstore.js, rather than a 125 # more recent copy). 126 ] 127 128 129@register_test() 130class ts_paint(TsBase): 131 """ 132 Launches tspaint_test.html with the current timestamp in the url, 133 waits for [MozAfterPaint and onLoad] to fire, then records the end 134 time and calculates the time to startup. 135 """ 136 cycles = 20 137 timeout = 150 138 gecko_profile_startup = True 139 gecko_profile_entries = 10000000 140 url = 'startup_test/tspaint_test.html' 141 xperf_counters = [] 142 win7_counters = [] 143 filters = filter.ignore_first.prepare(1) + filter.median.prepare() 144 tpmozafterpaint = True 145 mainthread = False 146 responsiveness = False 147 unit = 'ms' 148 149 150@register_test() 151class ts_paint_webext(ts_paint): 152 webextensions = '${talos}/webextensions/dummy/dummy.xpi' 153 preferences = {'xpinstall.signatures.required': False} 154 155 156@register_test() 157class ts_paint_heavy(ts_paint): 158 """ 159 ts_paint test ran against a heavy-user profile 160 """ 161 profile = 'simple' 162 163 164@register_test() 165class ts_paint_flex(ts_paint): 166 preferences = {'layout.css.emulate-moz-box-with-flex': True} 167 168 169@register_test() 170class sessionrestore(TsBase): 171 """ 172 A start up test measuring the time it takes to load a sessionstore.js file. 173 174 1. Set up Firefox to restore from a given sessionstore.js file. 175 2. Launch Firefox. 176 3. Measure the delta between firstPaint and sessionRestored. 177 """ 178 extensions = ['${talos}/pageloader', '${talos}/startup_test/sessionrestore/addon'] 179 cycles = 10 180 timeout = 900 181 gecko_profile_startup = True 182 gecko_profile_entries = 10000000 183 profile_path = '${talos}/startup_test/sessionrestore/profile' 184 reinstall = ['sessionstore.jsonlz4', 'sessionstore.js', 'sessionCheckpoints.json'] 185 # Restore the session. We have to provide a URL, otherwise Talos 186 # asks for a manifest URL. 187 url = 'about:home' 188 preferences = {'browser.startup.page': 3} 189 unit = 'ms' 190 191 192@register_test() 193class sessionrestore_no_auto_restore(sessionrestore): 194 """ 195 A start up test measuring the time it takes to load a sessionstore.js file. 196 197 1. Set up Firefox to *not* restore automatically from sessionstore.js file. 198 2. Launch Firefox. 199 3. Measure the delta between firstPaint and sessionRestored. 200 """ 201 preferences = {'browser.startup.page': 1} 202 203 204@register_test() 205class sessionrestore_many_windows(sessionrestore): 206 """ 207 A start up test measuring the time it takes to load a sessionstore.js file. 208 209 1. Set up Firefox to restore automatically from sessionstore.js file. 210 2. Launch Firefox. 211 3. Measure the delta between firstPaint and sessionRestored. 212 """ 213 profile_path = '${talos}/startup_test/sessionrestore/profile-manywindows' 214 215 216@register_test() 217class tresize(TsBase): 218 """ 219 This test does some resize thing. 220 """ 221 extensions = ['${talos}/startup_test/tresize/addon'] 222 cycles = 20 223 url = 'startup_test/tresize/addon/content/tresize-test.html' 224 timeout = 150 225 gecko_profile_interval = 2 226 gecko_profile_entries = 1000000 227 tpmozafterpaint = True 228 filters = filter.ignore_first.prepare(5) + filter.median.prepare() 229 unit = 'ms' 230 231 232# pageloader tests(tp5, etc) 233 234# The overall test number is determined by first calculating the median 235# page load time for each page in the set (excluding the max page load 236# per individual page). The max median from that set is then excluded and 237# the average is taken; that becomes the number reported to the tinderbox 238# waterfall. 239 240 241class PageloaderTest(Test): 242 """abstract base class for a Talos Pageloader test""" 243 extensions = ['${talos}/pageloader'] 244 tpmanifest = None # test manifest 245 tpcycles = 1 # number of time to run each page 246 cycles = None 247 timeout = None 248 keys = ['tpmanifest', 'tpcycles', 'tppagecycles', 'tprender', 'tpchrome', 249 'tpmozafterpaint', 'fnbpaint', 'tphero', 'tploadnocache', 'firstpaint', 250 'userready', 'testeventmap', 'base_vs_ref', 'mainthread', 'resolution', 251 'cycles', 'gecko_profile', 'gecko_profile_interval', 'gecko_profile_entries', 252 'tptimeout', 'win_counters', 'w7_counters', 'linux_counters', 'mac_counters', 253 'tpscrolltest', 'xperf_counters', 'timeout', 'responsiveness', 254 'profile_path', 'xperf_providers', 'xperf_user_providers', 'xperf_stackwalk', 255 'format_pagename', 'filters', 'preferences', 'extensions', 'setup', 'cleanup', 256 'lower_is_better', 'alert_threshold', 'unit', 'webextensions', 'profile'] 257 258 259class QuantumPageloadTest(PageloaderTest): 260 """ 261 Base class for a Quantum Pageload test 262 """ 263 tpcycles = 1 264 tppagecycles = 25 265 gecko_profile_interval = 1 266 gecko_profile_entries = 2000000 267 filters = filter.ignore_first.prepare(5) + filter.median.prepare() 268 unit = 'ms' 269 lower_is_better = True 270 fnbpaint = True 271 272 273@register_test() 274class tpaint(PageloaderTest): 275 """ 276 Tests the amount of time it takes the open a new window. This test does 277 not include startup time. Multiple test windows are opened in succession, 278 results reported are the average amount of time required to create and 279 display a window in the running instance of the browser. 280 (Measures ctrl-n performance.) 281 """ 282 tpmanifest = '${talos}/tests/tpaint/tpaint.manifest' 283 tppagecycles = 20 284 timeout = 300 285 gecko_profile_interval = 1 286 gecko_profile_entries = 2000000 287 tpmozafterpaint = True 288 filters = filter.ignore_first.prepare(5) + filter.median.prepare() 289 unit = 'ms' 290 preferences = {'security.data_uri.block_toplevel_data_uri_navigations': False} 291 292 293@register_test() 294class cpstartup(PageloaderTest): 295 """ 296 Tests the amount of time it takes to start up a new content process and 297 initialize it to the point where it can start processing incoming URLs 298 to load. 299 """ 300 extensions = ['${talos}/tests/cpstartup', '${talos}/pageloader'] 301 tpmanifest = '${talos}/tests/cpstartup/cpstartup.manifest' 302 tppagecycles = 20 303 gecko_profile_entries = 1000000 304 tploadnocache = True 305 unit = 'ms' 306 preferences = { 307 # By default, Talos is configured to open links from 308 # content in new windows. We're overriding them so that 309 # they open in new tabs instead. 310 # See http://kb.mozillazine.org/Browser.link.open_newwindow 311 # and http://kb.mozillazine.org/Browser.link.open_newwindow.restriction 312 'browser.link.open_newwindow': 3, 313 'browser.link.open_newwindow.restriction': 2, 314 } 315 316 317@register_test() 318class tabpaint(PageloaderTest): 319 """ 320 Tests the amount of time it takes to open new tabs, triggered from 321 both the parent process and the content process. 322 """ 323 extensions = ['${talos}/tests/tabpaint', '${talos}/pageloader'] 324 tpmanifest = '${talos}/tests/tabpaint/tabpaint.manifest' 325 tppagecycles = 20 326 gecko_profile_entries = 1000000 327 tploadnocache = True 328 unit = 'ms' 329 preferences = { 330 # By default, Talos is configured to open links from 331 # content in new windows. We're overriding them so that 332 # they open in new tabs instead. 333 # See http://kb.mozillazine.org/Browser.link.open_newwindow 334 # and http://kb.mozillazine.org/Browser.link.open_newwindow.restriction 335 'browser.link.open_newwindow': 3, 336 'browser.link.open_newwindow.restriction': 2, 337 } 338 339 340@register_test() 341class tps(PageloaderTest): 342 """ 343 Tests the amount of time it takes to switch between tabs 344 """ 345 extensions = ['${talos}/tests/tabswitch', '${talos}/pageloader'] 346 tpmanifest = '${talos}/tests/tabswitch/tps.manifest' 347 tppagecycles = 5 348 gecko_profile_entries = 5000000 349 tploadnocache = True 350 preferences = { 351 'addon.test.tabswitch.urlfile': os.path.join('${talos}', 352 'tests', 353 'tp5o.html'), 354 'addon.test.tabswitch.webserver': '${webserver}', 355 'addon.test.tabswitch.maxurls': -1, 356 } 357 unit = 'ms' 358 359 360@register_test() 361class tart(PageloaderTest): 362 """ 363 Tab Animation Regression Test 364 Tests tab animation on these cases: 365 1. Simple: single new tab of about:blank open/close without affecting 366 (shrinking/expanding) other tabs. 367 2. icon: same as above with favicons and long title instead of about:blank. 368 3. Newtab: newtab open with thumbnails preview - without affecting other 369 tabs, with and without preload. 370 4. Fade: opens a tab, then measures fadeout/fadein (tab animation without 371 the overhead of opening/closing a tab). 372 - Case 1 is tested with DPI scaling of 1. 373 - Case 2 is tested with DPI scaling of 1.0 and 2.0. 374 - Case 3 is tested with the default scaling of the test system. 375 - Case 4 is tested with DPI scaling of 2.0 with the "icon" tab 376 (favicon and long title). 377 - Each animation produces 3 test results: 378 - error: difference between the designated duration and the actual 379 completion duration from the trigger. 380 - half: average interval over the 2nd half of the animation. 381 - all: average interval over all recorded intervals. 382 """ 383 tpmanifest = '${talos}/tests/tart/tart.manifest' 384 extensions = ['${talos}/pageloader', '${talos}/tests/tart/addon'] 385 tpcycles = 1 386 tppagecycles = 25 387 tploadnocache = True 388 tpmozafterpaint = False 389 gecko_profile_interval = 10 390 gecko_profile_entries = 1000000 391 win_counters = w7_counters = linux_counters = mac_counters = None 392 """ 393 ASAP mode 394 The recording API is broken with OMTC before ~2013-11-27 395 After ~2013-11-27, disabling OMTC will also implicitly disable 396 OGL HW composition to disable OMTC with older firefox builds, also 397 set 'layers.offmainthreadcomposition.enabled': False 398 """ 399 preferences = {'layout.frame_rate': 0, 400 'docshell.event_starvation_delay_hint': 1, 401 'dom.send_after_paint_to_content': False} 402 filters = filter.ignore_first.prepare(1) + filter.median.prepare() 403 unit = 'ms' 404 405 406@register_test() 407class tart_flex(tart): 408 preferences = {'layout.css.emulate-moz-box-with-flex': True} 409 410 411@register_test() 412class damp(PageloaderTest): 413 """ 414 Devtools At Maximum Performance 415 Tests the speed of DevTools toolbox open, close, and page reload 416 for each tool, across a very simple and very complicated page. 417 """ 418 tpmanifest = '${talos}/tests/devtools/damp.manifest' 419 extensions = ['${talos}/pageloader', '${talos}/tests/devtools/addon'] 420 cycles = 5 421 tpcycles = 1 422 tppagecycles = 5 423 tploadnocache = True 424 tpmozafterpaint = False 425 gecko_profile_interval = 10 426 gecko_profile_entries = 1000000 427 win_counters = w7_counters = linux_counters = mac_counters = None 428 filters = filter.ignore_first.prepare(1) + filter.median.prepare() 429 preferences = {'devtools.memory.enabled': True, 430 'addon.test.damp.webserver': '${webserver}'} 431 unit = 'ms' 432 433 434@register_test() 435class glterrain(PageloaderTest): 436 """ 437 Simple rotating WebGL scene with moving light source over a 438 textured terrain. 439 Measures average frame intervals. 440 The same sequence is measured 4 times for combinations of alpha and 441 antialias as canvas properties. 442 Each of these 4 runs is reported as a different test name. 443 """ 444 tpmanifest = '${talos}/tests/webgl/glterrain.manifest' 445 tpcycles = 1 446 tppagecycles = 25 447 tploadnocache = True 448 tpmozafterpaint = False 449 tpchrome = False 450 gecko_profile_interval = 10 451 gecko_profile_entries = 2000000 452 win_counters = w7_counters = linux_counters = mac_counters = None 453 """ ASAP mode """ 454 preferences = {'layout.frame_rate': 0, 455 'docshell.event_starvation_delay_hint': 1, 456 'dom.send_after_paint_to_content': False} 457 filters = filter.ignore_first.prepare(1) + filter.median.prepare() 458 unit = 'frame interval' 459 460 461@register_test() 462class glvideo(PageloaderTest): 463 """ 464 WebGL video texture update with 1080p video. 465 Measures mean tick time across 100 ticks. 466 (each tick is texImage2D(<video>)+setTimeout(0)) 467 """ 468 tpmanifest = '${talos}/tests/webgl/glvideo.manifest' 469 tpcycles = 1 470 tppagecycles = 5 471 tploadnocache = True 472 tpmozafterpaint = False 473 tpchrome = False 474 gecko_profile_interval = 2 475 gecko_profile_entries = 2000000 476 win_counters = w7_counters = linux_counters = mac_counters = None 477 filters = filter.ignore_first.prepare(1) + filter.median.prepare() 478 unit = 'ms' 479 480 481@register_test() 482class tp5n(PageloaderTest): 483 """ 484 Tests the time it takes Firefox to load the tp5 web page test set. 485 486 The tp5 is an updated web page test set to 100 pages from April 8th, 2011. 487 Effort was made for the pages to no longer be splash screens/login 488 pages/home pages but to be pages that better reflect the actual content 489 of the site in question. 490 """ 491 resolution = 20 492 tpmanifest = '${talos}/tests/tp5n/tp5n.manifest' 493 tpcycles = 1 494 tppagecycles = 1 495 cycles = 1 496 tpmozafterpaint = True 497 tptimeout = 5000 498 mainthread = True 499 w7_counters = [] 500 win_counters = [] 501 linux_counters = [] 502 mac_counters = [] 503 xperf_counters = ['main_startup_fileio', 'main_startup_netio', 504 'main_normal_fileio', 'main_normal_netio', 505 'nonmain_startup_fileio', 'nonmain_normal_fileio', 506 'nonmain_normal_netio', 'mainthread_readcount', 507 'mainthread_readbytes', 'mainthread_writecount', 508 'mainthread_writebytes'] 509 xperf_providers = ['PROC_THREAD', 'LOADER', 'HARD_FAULTS', 'FILENAME', 510 'FILE_IO', 'FILE_IO_INIT'] 511 xperf_user_providers = ['Mozilla Generic Provider', 512 'Microsoft-Windows-TCPIP'] 513 xperf_stackwalk = ['FileCreate', 'FileRead', 'FileWrite', 'FileFlush', 514 'FileClose'] 515 filters = filter.ignore_first.prepare(1) + filter.median.prepare() 516 timeout = 1800 517 setup = '${talos}/xtalos/start_xperf.py -c ${talos}/bcontroller.json' 518 cleanup = '${talos}/xtalos/parse_xperf.py -c ${talos}/bcontroller.json' 519 preferences = {'extensions.enabledScopes': '', 520 'talos.logfile': 'browser_output.txt'} 521 unit = 'ms' 522 523 524@register_test() 525class tp5o(PageloaderTest): 526 """ 527 Derived from the tp5n pageset, this is the 49 most reliable webpages. 528 """ 529 tpcycles = 1 530 tppagecycles = 25 531 cycles = 1 532 tpmozafterpaint = True 533 tptimeout = 5000 534 mainthread = False 535 tpmanifest = '${talos}/tests/tp5n/tp5o.manifest' 536 win_counters = ['% Processor Time'] 537 w7_counters = ['% Processor Time'] 538 linux_counters = ['XRes'] 539 mac_counters = [] 540 responsiveness = True 541 gecko_profile_interval = 2 542 gecko_profile_entries = 4000000 543 filters = filter.ignore_first.prepare(5) + filter.median.prepare() 544 timeout = 1800 545 unit = 'ms' 546 547 548@register_test() 549class tp5o_webext(tp5o): 550 webextensions = '${talos}/webextensions/dummy/dummy.xpi' 551 preferences = {'xpinstall.signatures.required': False} 552 553 554@register_test() 555class tp5o_scroll(PageloaderTest): 556 """ 557 Tests scroll (like tscrollx does, including ASAP) but on the tp5o pageset. 558 """ 559 tpmanifest = '${talos}/tests/tp5n/tp5o.manifest' 560 tpcycles = 1 561 tppagecycles = 12 562 gecko_profile_interval = 2 563 gecko_profile_entries = 2000000 564 tpscrolltest = True 565 """ASAP mode""" 566 tpmozafterpaint = False 567 preferences = {'layout.frame_rate': 0, 568 'docshell.event_starvation_delay_hint': 1, 569 'dom.send_after_paint_to_content': False, 570 'layout.css.scroll-behavior.spring-constant': "'10'", 571 'toolkit.framesRecording.bufferSize': 10000} 572 filters = filter.ignore_first.prepare(1) + filter.median.prepare() 573 unit = '1/FPS' 574 575 576@register_test() 577class v8_7(PageloaderTest): 578 """ 579 This is the V8 (version 7) javascript benchmark taken verbatim and 580 slightly modified to fit into our pageloader extension and talos harness. 581 582 The previous version of this test is V8 version 5 which was run on 583 selective branches and operating systems. 584 """ 585 tpmanifest = '${talos}/tests/v8_7/v8.manifest' 586 gecko_profile_interval = 1 587 gecko_profile_entries = 1000000 588 tpcycles = 1 589 resolution = 20 590 tpmozafterpaint = False 591 preferences = {'dom.send_after_paint_to_content': False} 592 filters = filter.v8_subtest.prepare() 593 unit = 'score' 594 lower_is_better = False 595 596 597@register_test() 598class kraken(PageloaderTest): 599 """ 600 This is the Kraken javascript benchmark taken verbatim and slightly 601 modified to fit into our pageloader extension and talos harness. 602 """ 603 tpmanifest = '${talos}/tests/kraken/kraken.manifest' 604 tpcycles = 1 605 tppagecycles = 1 606 gecko_profile_interval = 1 607 gecko_profile_entries = 5000000 608 tpmozafterpaint = False 609 tpchrome = False 610 preferences = {'dom.send_after_paint_to_content': False} 611 filters = filter.mean.prepare() 612 unit = 'score' 613 614 615@register_test() 616class basic_compositor_video(PageloaderTest): 617 """ 618 Video test 619 """ 620 tpmanifest = '${talos}/tests/video/video.manifest' 621 tpcycles = 1 622 tppagecycles = 12 623 tpchrome = False 624 timeout = 10000 625 gecko_profile_interval = 1 626 gecko_profile_entries = 2000000 627 preferences = {'full-screen-api.allow-trusted-requests-only': False, 628 'layers.acceleration.force-enabled': False, 629 'layers.acceleration.disabled': True, 630 'layout.frame_rate': 0, 631 'docshell.event_starvation_delay_hint': 1, 632 'full-screen-api.warning.timeout': 500, 633 'media.ruin-av-sync.enabled': True} 634 filters = filter.ignore_first.prepare(1) + filter.median.prepare() 635 unit = 'ms/frame' 636 lower_is_better = True 637 638 639class dromaeo(PageloaderTest): 640 """abstract base class for dramaeo tests""" 641 filters = filter.dromaeo.prepare() 642 lower_is_better = False 643 alert_threshold = 5.0 644 tpchrome = False 645 646 647@register_test() 648class dromaeo_css(dromaeo): 649 """ 650 Dromaeo suite of tests for JavaScript performance testing. 651 See the Dromaeo wiki (https://wiki.mozilla.org/Dromaeo) 652 for more information. 653 654 Each page in the manifest is part of the dromaemo css benchmark. 655 """ 656 gecko_profile_interval = 2 657 gecko_profile_entries = 10000000 658 tpmanifest = '${talos}/tests/dromaeo/css.manifest' 659 unit = 'score' 660 661 662@register_test() 663class dromaeo_dom(dromaeo): 664 """ 665 Dromaeo suite of tests for JavaScript performance testing. 666 See the Dromaeo wiki (https://wiki.mozilla.org/Dromaeo) 667 for more information. 668 669 Each page in the manifest is part of the dromaemo dom benchmark. 670 """ 671 gecko_profile_interval = 2 672 gecko_profile_entries = 10000000 673 tpmanifest = '${talos}/tests/dromaeo/dom.manifest' 674 unit = 'score' 675 676 677@register_test() 678class tsvgm(PageloaderTest): 679 """ 680 An svg-only number that measures SVG rendering performance 681 for dynamic content only. 682 """ 683 tpmanifest = '${talos}/tests/svgx/svgm.manifest' 684 tpcycles = 1 685 tppagecycles = 7 686 tpmozafterpaint = False 687 tpchrome = False 688 gecko_profile_interval = 10 689 gecko_profile_entries = 1000000 690 """ASAP mode""" 691 preferences = {'layout.frame_rate': 0, 692 'docshell.event_starvation_delay_hint': 1, 693 'dom.send_after_paint_to_content': False} 694 filters = filter.ignore_first.prepare(2) + filter.median.prepare() 695 unit = 'ms' 696 697 698@register_test() 699class tsvgx(PageloaderTest): 700 """ 701 An svg-only number that measures SVG rendering performance 702 for dynamic content only. 703 """ 704 tpmanifest = '${talos}/tests/svgx/svgx.manifest' 705 tpcycles = 1 706 tppagecycles = 25 707 tpmozafterpaint = False 708 tpchrome = False 709 gecko_profile_interval = 10 710 gecko_profile_entries = 1000000 711 """ASAP mode""" 712 preferences = {'layout.frame_rate': 0, 713 'docshell.event_starvation_delay_hint': 1, 714 'dom.send_after_paint_to_content': False} 715 filters = filter.ignore_first.prepare(5) + filter.median.prepare() 716 unit = 'ms' 717 718 719@register_test() 720class tsvg_static(PageloaderTest): 721 """ 722 An svg-only number that measures SVG rendering performance 723 for static content only. 724 """ 725 tpmanifest = '${talos}/tests/svg_static/svg_static.manifest' 726 tpcycles = 1 727 tppagecycles = 25 728 tpmozafterpaint = True 729 tpchrome = False 730 gecko_profile_interval = 1 731 gecko_profile_entries = 10000000 732 filters = filter.ignore_first.prepare(5) + filter.median.prepare() 733 unit = 'ms' 734 735 736@register_test() 737class tsvgr_opacity(PageloaderTest): 738 """ 739 An svg-only number that measures SVG rendering performance. 740 """ 741 tpmanifest = '${talos}/tests/svg_opacity/svg_opacity.manifest' 742 tpcycles = 1 743 tppagecycles = 25 744 tpmozafterpaint = True 745 tpchrome = False 746 gecko_profile_interval = 1 747 gecko_profile_entries = 10000000 748 filters = filter.ignore_first.prepare(5) + filter.median.prepare() 749 unit = 'ms' 750 751 752@register_test() 753class tscrollx(PageloaderTest): 754 """ 755 This test does some scrolly thing. 756 """ 757 tpmanifest = '${talos}/tests/scroll/scroll.manifest' 758 tpcycles = 1 759 tppagecycles = 25 760 tpmozafterpaint = False 761 tpchrome = False 762 gecko_profile_interval = 1 763 gecko_profile_entries = 1000000 764 """ ASAP mode """ 765 preferences = {'layout.frame_rate': 0, 766 'docshell.event_starvation_delay_hint': 1, 767 'dom.send_after_paint_to_content': False, 768 'layout.css.scroll-behavior.spring-constant': "'10'", 769 'toolkit.framesRecording.bufferSize': 10000} 770 filters = filter.ignore_first.prepare(5) + filter.median.prepare() 771 unit = 'ms' 772 773 774@register_test() 775class a11yr(PageloaderTest): 776 """ 777 This test ensures basic a11y tables and permutations do not cause 778 performance regressions. 779 """ 780 tpmanifest = '${talos}/tests/a11y/a11y.manifest' 781 tpcycles = 1 782 tppagecycles = 25 783 tpmozafterpaint = True 784 tpchrome = False 785 preferences = {'dom.send_after_paint_to_content': False} 786 unit = 'ms' 787 alert_threshold = 5.0 788 789 790class WebkitBenchmark(PageloaderTest): 791 tpcycles = 1 792 tppagecycles = 5 793 tpmozafterpaint = False 794 tpchrome = False 795 format_pagename = False 796 lower_is_better = False 797 unit = 'score' 798 799 800@register_test() 801class speedometer(WebkitBenchmark): 802 # Speedometer benchmark used by many browser vendors (from webkit) 803 tpmanifest = '${talos}/tests/speedometer/speedometer.manifest' 804 805 806@register_test() 807class stylebench(WebkitBenchmark): 808 # StyleBench benchmark used by many browser vendors (from webkit) 809 tpmanifest = '${talos}/tests/stylebench/stylebench.manifest' 810 811 812@register_test() 813class motionmark_animometer(WebkitBenchmark): 814 # MotionMark benchmark used by many browser vendors (from webkit) 815 tpmanifest = '${talos}/tests/motionmark/animometer.manifest' 816 817 818@register_test() 819class ARES6(WebkitBenchmark): 820 # ARES-6 benchmark used by many browser vendors (from webkit) 821 tpmanifest = '${talos}/tests/ares6/ares6.manifest' 822 tppagecycles = 1 823 lower_is_better = True 824 825 826@register_test() 827class motionmark_htmlsuite(WebkitBenchmark): 828 # MotionMark benchmark used by many browser vendors (from webkit) 829 tpmanifest = '${talos}/tests/motionmark/htmlsuite.manifest' 830 831 832@register_test() 833class JetStream(WebkitBenchmark): 834 # JetStream benchmark used by many browser vendors (from webkit) 835 tpmanifest = '${talos}/tests/jetstream/jetstream.manifest' 836 tppagecycles = 1 837 838 839@register_test() 840class perf_reftest(PageloaderTest): 841 """ 842 Style perf-reftest a set of tests where the result is the difference of base vs ref pages 843 """ 844 base_vs_ref = True # compare the two test pages with eachother and report comparison 845 tpmanifest = '${talos}/tests/perf-reftest/perf_reftest.manifest' 846 tpcycles = 1 847 tppagecycles = 10 848 tptimeout = 30000 849 gecko_profile_interval = 1 850 gecko_profile_entries = 2000000 851 filters = filter.ignore_first.prepare(5) + filter.median.prepare() 852 unit = 'ms' 853 lower_is_better = True 854 alert_threshold = 5.0 855 856 857@register_test() 858class perf_reftest_singletons(PageloaderTest): 859 """ 860 Style perf-reftests run as individual tests 861 """ 862 tpmanifest = '${talos}/tests/perf-reftest-singletons/perf_reftest_singletons.manifest' 863 tpcycles = 1 864 tppagecycles = 15 865 tptimeout = 30000 866 gecko_profile_interval = 1 867 gecko_profile_entries = 2000000 868 filters = filter.ignore_first.prepare(5) + filter.median.prepare() 869 unit = 'ms' 870 lower_is_better = True 871 alert_threshold = 5.0 872 873 874@register_test() 875class tp6_google(QuantumPageloadTest): 876 """ 877 Quantum Pageload Test - Google 878 """ 879 tpmanifest = '${talos}/tests/quantum_pageload/quantum_pageload_google.manifest' 880 fnbpaint = False 881 tphero = True 882 883 884@register_test() 885class tp6_google_heavy(tp6_google): 886 """ 887 tp6_google test ran against a heavy-user profile 888 """ 889 profile = 'simple' 890 891 892@register_test() 893class tp6_youtube(QuantumPageloadTest): 894 """ 895 Quantum Pageload Test - YouTube 896 """ 897 tpmanifest = '${talos}/tests/quantum_pageload/quantum_pageload_youtube.manifest' 898 899 900@register_test() 901class tp6_youtube_heavy(tp6_youtube): 902 """ 903 tp6_youtube test ran against a heavy-user profile 904 """ 905 profile = 'simple' 906 907 908@register_test() 909class tp6_amazon(QuantumPageloadTest): 910 """ 911 Quantum Pageload Test - Amazon 912 """ 913 tpmanifest = '${talos}/tests/quantum_pageload/quantum_pageload_amazon.manifest' 914 915 916@register_test() 917class tp6_amazon_heavy(tp6_amazon): 918 """ 919 tp6_amazon test ran against a heavy-user profile 920 """ 921 profile = 'simple' 922 923 924@register_test() 925class tp6_facebook(QuantumPageloadTest): 926 """ 927 Quantum Pageload Test - Facebook 928 """ 929 tpmanifest = '${talos}/tests/quantum_pageload/quantum_pageload_facebook.manifest' 930 931 932@register_test() 933class tp6_facebook_heavy(tp6_facebook): 934 """ 935 tp6_facebook test ran against a heavy-user profile 936 """ 937 profile = 'simple' 938 939 940@register_test() 941class displaylist_mutate(PageloaderTest): 942 """ 943 Test modifying single items in a large display list. Measure transaction speed 944 to the compositor. 945 """ 946 tpmanifest = '${talos}/tests/layout/displaylist_mutate.manifest' 947 tpcycles = 1 948 tppagecycles = 5 949 tploadnocache = True 950 tpmozafterpaint = False 951 tpchrome = False 952 gecko_profile_interval = 2 953 gecko_profile_entries = 2000000 954 win_counters = w7_counters = linux_counters = mac_counters = None 955 filters = filter.ignore_first.prepare(1) + filter.median.prepare() 956 """ASAP mode""" 957 preferences = {'layout.frame_rate': 0, 958 'docshell.event_starvation_delay_hint': 1, 959 'dom.send_after_paint_to_content': False} 960 unit = 'ms' 961 962 963@register_test() 964class rasterflood_svg(PageloaderTest): 965 """ 966 Test modifying single items in a large display list. Measure transaction speed 967 to the compositor. 968 """ 969 tpmanifest = '${talos}/tests/gfx/rasterflood_svg.manifest' 970 tpcycles = 1 971 tppagecycles = 10 972 tploadnocache = True 973 tpmozafterpaint = False 974 tpchrome = False 975 gecko_profile_interval = 2 976 gecko_profile_entries = 2000000 977 win_counters = w7_counters = linux_counters = mac_counters = None 978 filters = filter.ignore_first.prepare(1) + filter.median.prepare() 979 """ASAP mode""" 980 preferences = {'layout.frame_rate': 0, 981 'docshell.event_starvation_delay_hint': 1, 982 'dom.send_after_paint_to_content': False} 983 unit = 'ms' 984 985 986@register_test() 987class rasterflood_gradient(PageloaderTest): 988 """ 989 Test expensive rasterization while the main thread is busy. 990 """ 991 tpmanifest = '${talos}/tests/gfx/rasterflood_gradient.manifest' 992 tpcycles = 1 993 tppagecycles = 10 994 tploadnocache = True 995 tpmozafterpaint = False 996 tpchrome = False 997 gecko_profile_interval = 2 998 gecko_profile_entries = 2000000 999 win_counters = w7_counters = linux_counters = mac_counters = None 1000 filters = filter.ignore_first.prepare(1) + filter.median.prepare() 1001 """ASAP mode""" 1002 preferences = {'layout.frame_rate': 0, 1003 'docshell.event_starvation_delay_hint': 1, 1004 'dom.send_after_paint_to_content': False} 1005 lower_is_better = False 1006 unit = 'score' 1007 1008 1009@register_test() 1010class about_preferences_basic(PageloaderTest): 1011 """ 1012 Base class for about_preferences test 1013 """ 1014 tpmanifest = '${talos}/tests/about-preferences/about_preferences_basic.manifest' 1015 # this test uses 'about:blank' as a dummy page (see manifest) so that the pages 1016 # that just change url categories (i.e. about:preferences#search) will get a load event 1017 # also any of the url category pages cannot have more than one tppagecycle 1018 tpcycles = 25 1019 tppagecycles = 1 1020 gecko_profile_interval = 1 1021 gecko_profile_entries = 2000000 1022 filters = filter.ignore_first.prepare(5) + filter.median.prepare() 1023 unit = 'ms' 1024 lower_is_better = True 1025 fnbpaint = True 1026