# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/.
import os
from talos import filter
"""
test definitions for Talos """
_TESTS = {} # internal dict of Talos test classes
def register_test(): """Decorator to register Talos test classes"""
def test_dict(): """Return the dict of the registered test classes""" return _TESTS
class Test: """abstract base class for a Talos test case"""
__test__ = False# not pytest
cycles = None# number of cycles
keys = []
desktop = True
filters = filter.ignore_first.prepare(1) + filter.median.prepare()
lower_is_better = True
alert_threshold = 2.0
perfherder_framework = "talos"
subtest_alerts = False
suite_should_alert = True # Default number of entries for the gecko profiler which is 128MiB. # This value is calculated by dividing the 128MiB of memory by 8 because # the profiler uses 8 bytes per entry.
gecko_profile_entries = int(128 * 1024 * 1024 / 8)
@classmethod def name(cls): return cls.__name__
@classmethod def description(cls): if cls.__doc__ isNone: return"No documentation available yet." else:
doc = cls.__doc__
description_lines = [i.strip() for i in doc.strip().splitlines()] return"\n".join(description_lines)
def __init__(self, **kw):
self.update(**kw)
def update(self, **kw):
self.__dict__.update(kw)
def items(self): """
returns a list of 2-tuples """
retval = [("name", self.name())] for key in self.keys:
value = getattr(self, key, None) if value isnotNone:
retval.append((key, value)) return retval
def __str__(self): """string form appropriate for YAML output"""
items = self.items()
key, value = items.pop(0)
lines = ["- %s: %s" % (key, value)] for key, value in items:
lines.append(" %s: %s" % (key, value)) return"\n".join(lines)
# ts-style startup tests (ts, twinopen, ts_cold, etc) # The overall test number is calculated by excluding the max opening time # and taking an average of the remaining numbers. class TsBase(Test): """abstract base class for ts-style tests"""
keys = [ "url", "url_timestamp", "timeout", "cycles", "profile_path", # The path containing the template profile. This # directory is copied to the temporary profile during # initialization of the test. If some of the files may # be overwritten by Firefox and need to be reinstalled # before each pass, use key |reinstall| "gecko_profile", "gecko_profile_interval", "gecko_profile_entries", "gecko_profile_features", "gecko_profile_threads", "gecko_profile_extra_threads", "gecko_profile_startup", "preferences", "xperf_counters", "xperf_providers", "xperf_user_providers", "xperf_stackwalk", "tpmozafterpaint", "fnbpaint", "tphero", "tpmanifest", "profile", "firstpaint", "userready", "testeventmap", "base_vs_ref", "extensions", "filters", "setup", "cleanup", "pine", "skip_reason", "webextensions", "webextensions_folder", "reinstall", # A list of files from the profile directory that # should be copied to the temporary profile prior to # running each cycle, to avoid one cycle overwriting # the data used by the next another cycle (may be used # e.g. for sessionstore.js to ensure that all cycles # use the exact same sessionstore.js, rather than a # more recent copy).
]
def __init__(self, **kw):
super().__init__(**kw)
# Unless set to False explicitly, all TsBase tests will have the blocklist # enabled by default in order to more accurately test the startup paths.
BLOCKLIST_PREF = "extensions.blocklist.enabled"
@register_test() class ts_paint(TsBase): """
Launches tspaint_test.html with the current timestamp in the url,
waits for [MozAfterPaint and onLoad] to fire, then records the end
time and calculates the time to startup. """
@register_test() class ts_paint_webext(ts_paint):
webextensions = "${talos}/webextensions/dummy/dummy.xpi"
preferences = {"xpinstall.signatures.required": False}
@register_test() class ts_paint_heavy(ts_paint): """
ts_paint test ran against a heavy-user profile """
profile = "simple"
@register_test() class startup_about_home_paint(ts_paint): """
Tests loading about:home on startup with the about:home startup cache
disabled, to more accurately simulate startup when the cache does not
exist. """
@register_test() class startup_about_home_paint_cached(ts_paint): """
Tests loading about:home on startup with the about:home startup cache
enabled. """
@register_test() class sessionrestore(TsBase): """
A start up test measuring the time it takes to load a sessionstore.js file.
1. Set up Firefox to restore from a given sessionstore.js file. 2. Launch Firefox. 3. Measure the delta between firstPaint and sessionRestored. """
extensions = ["${talos}/startup_test/sessionrestore/addon"]
cycles = 10
timeout = 900
gecko_profile_startup = True
profile_path = "${talos}/startup_test/sessionrestore/profile"
reinstall = ["sessionstore.jsonlz4", "sessionstore.js", "sessionCheckpoints.json"] # Restore the session. We have to provide a URL, otherwise Talos # asks for a manifest URL.
url = "about:home"
preferences = {"browser.startup.page": 3}
unit = "ms"
pine = False
@register_test() class sessionrestore_no_auto_restore(sessionrestore): """
A start up test measuring the time it takes to load a sessionstore.js file.
1. Set up Firefox to *not* restore automatically from sessionstore.js file. 2. Launch Firefox. 3. Measure the delta between firstPaint and sessionRestored. """
@register_test() class sessionrestore_many_windows(sessionrestore): """
A start up test measuring the time it takes to load a sessionstore.js file.
1. Set up Firefox to restore automatically from sessionstore.js file. 2. Launch Firefox. 3. Measure the delta between firstPaint and sessionRestored. """
# The overall test number is determined by first calculating the median # page load time for each page in the set (excluding the max page load # per individual page). The max median from that set is then excluded and # the average is taken; that becomes the number reported to the tinderbox # waterfall.
class PageloaderTest(Test): """abstract base class for a Talos Pageloader test"""
extensions = ["${talos}/pageloader"]
tpmanifest = None# test manifest
tpcycles = 1# number of time to run each page
cycles = None
timeout = None
@register_test() class twinopen(PageloaderTest): """
Tests the amount of time it takes an open browser to open a new browser
window and paint the browser chrome. This test does not include startup
time. Multiple test windows are opened in succession.
(Measures ctrl-n performance.) """
@register_test() class cpstartup(PageloaderTest): """
Tests the amount of time it takes to start up a new content process and
initialize it to the point where it can start processing incoming URLs
to load. """
extensions = ["${talos}/pageloader", "${talos}/tests/cpstartup/extension"]
tpmanifest = "${talos}/tests/cpstartup/cpstartup.manifest"
tppagecycles = 20
timeout = 600
tploadnocache = True
unit = "ms"
preferences = { # By default, Talos is configured to open links from # content in new windows. We're overriding them so that # they open in new tabs instead. # See http://kb.mozillazine.org/Browser.link.open_newwindow # and http://kb.mozillazine.org/Browser.link.open_newwindow.restriction "browser.link.open_newwindow": 3, "browser.link.open_newwindow.restriction": 2,
}
@register_test() class tabpaint(PageloaderTest): """
Tests the amount of time it takes to open new tabs, triggered from
both the parent process and the content process. """
extensions = ["${talos}/tests/tabpaint", "${talos}/pageloader"]
tpmanifest = "${talos}/tests/tabpaint/tabpaint.manifest"
tppagecycles = 20
timeout = 600
tploadnocache = True
unit = "ms"
preferences = { # By default, Talos is configured to open links from # content in new windows. We're overriding them so that # they open in new tabs instead. # See http://kb.mozillazine.org/Browser.link.open_newwindow # and http://kb.mozillazine.org/Browser.link.open_newwindow.restriction "browser.link.open_newwindow": 3, "browser.link.open_newwindow.restriction": 2, "browser.newtab.preload": False,
}
@register_test() class tabswitch(PageloaderTest): """
Tests the amount of time it takes to switch between tabs """
@register_test() class cross_origin_pageload(PageloaderTest): """
Tests the amount of time it takes to load a page which
has 20 cross origin iframes """
@register_test() class tart(PageloaderTest): """
Tab Animation Regression Test
Tests tab animation on these cases: 1. Simple: single new tab of about:blank open/close without affecting
(shrinking/expanding) other tabs. 2. icon: same as above with favicons and long title instead of about:blank. 3. Newtab: newtab open with thumbnails preview - without affecting other
tabs, withand without preload. 4. Fade: opens a tab, then measures fadeout/fadein (tab animation without
the overhead of opening/closing a tab).
- Case 1is tested with DPI scaling of 1.
- Case 2is tested with DPI scaling of 1.0and2.0.
- Case 3is tested with the default scaling of the test system.
- Case 4is tested with DPI scaling of 2.0with the "icon" tab
(favicon and long title).
- Each animation produces 3 test results:
- error: difference between the designated duration and the actual
completion duration from the trigger.
- half: average interval over the 2nd half of the animation.
- all: average interval over all recorded intervals. """
tpmanifest = "${talos}/tests/tart/tart.manifest"
extensions = ["${talos}/pageloader", "${talos}/tests/tart/addon"]
tpcycles = 1
tppagecycles = 25
tploadnocache = True
tpmozafterpaint = False
gecko_profile_interval = 10
win_counters = linux_counters = mac_counters = None """
ASAP mode
The recording API is broken with OMTC before ~2013-11-27
After ~2013-11-27, disabling OMTC will also implicitly disable
OGL HW composition to disable OMTC with older firefox builds, also
set 'layers.offmainthreadcomposition.enabled': False """
preferences = { "layout.frame_rate": 0, "docshell.event_starvation_delay_hint": 1, "dom.send_after_paint_to_content": False,
}
filters = filter.ignore_first.prepare(1) + filter.median.prepare()
unit = "ms"
pine = False
@register_test() class damp(PageloaderTest): """
Devtools At Maximum Performance
Tests the speed of DevTools toolbox open, close, and page reload for each tool, across a very simple and very complicated page. """
@register_test() class glterrain(PageloaderTest): """
Simple rotating WebGL scene with moving light source over a
textured terrain.
Measures average frame intervals.
The same sequence is measured 4 times for combinations of alpha and
antialias as canvas properties.
Each of these 4 runs is reported as a different test name. """
@register_test() class glvideo(PageloaderTest): """
WebGL video texture update with1080p video.
Measures mean tick time across 100 ticks.
(each tick is texImage2D(<video>)+setTimeout(0)) """
@register_test() class canvas2dvideo(PageloaderTest): """
Canvas2D video texture update with1080p video.
Measures mean tick time across 100 ticks.
(each tick is drawImage(<video>)+setTimeout(0)) """
@register_test() class offscreencanvas_webcodecs_main_webgl_h264(PageloaderTest): """
OffscreenCanvas WebGL video texture update on the main thread with WebCodecs and1080p H264 video.
Measures mean frame time across 100 frames.
(decodes each frame and performs texImage2D(<videoFrame>)) """
@register_test() class offscreencanvas_webcodecs_main_webgl_vp9(PageloaderTest): """
OffscreenCanvas WebGL video texture update on the main thread with WebCodecs and1080p VP9 video.
Measures mean frame time across 100 frames.
(decodes each frame and performs texImage2D(<videoFrame>)) """
@register_test() class offscreencanvas_webcodecs_main_webgl_av1(PageloaderTest): """
OffscreenCanvas WebGL video texture update on the main thread with WebCodecs and1080p AV1 video.
Measures mean frame time across 100 frames.
(decodes each frame and performs texImage2D(<videoFrame>)) """
@register_test() class offscreencanvas_webcodecs_worker_webgl_h264(PageloaderTest): """
OffscreenCanvas WebGL video texture update on a DOM worker thread with WebCodecs and1080p H264 video.
Measures mean frame time across 100 frames.
(decodes each frame and performs texImage2D(<videoFrame>)) """
@register_test() class offscreencanvas_webcodecs_worker_webgl_vp9(PageloaderTest): """
OffscreenCanvas WebGL video texture update on a DOM worker thread with WebCodecs and1080p VP9 video.
Measures mean frame time across 100 frames.
(decodes each frame and performs texImage2D(<videoFrame>)) """
@register_test() class offscreencanvas_webcodecs_worker_webgl_av1(PageloaderTest): """
OffscreenCanvas WebGL video texture update on a DOM worker thread with WebCodecs and1080p AV1 video.
Measures mean frame time across 100 frames.
(decodes each frame and performs texImage2D(<videoFrame>)) """
@register_test() class offscreencanvas_webcodecs_main_2d_h264(PageloaderTest): """
OffscreenCanvas 2D video texture update on the main thread with WebCodecs and1080p H264 video.
Measures mean frame time across 100 frames.
(decodes each frame and performs drawImage(<videoFrame>)) """
@register_test() class offscreencanvas_webcodecs_main_2d_vp9(PageloaderTest): """
OffscreenCanvas 2D video texture update on the main thread with WebCodecs and1080p VP9 video.
Measures mean frame time across 100 frames.
(decodes each frame and performs drawImage(<videoFrame>)) """
@register_test() class offscreencanvas_webcodecs_main_2d_av1(PageloaderTest): """
OffscreenCanvas 2D video texture update on the main thread with WebCodecs and1080p AV1 video.
Measures mean frame time across 100 frames.
(decodes each frame and performs drawImage(<videoFrame>)) """
@register_test() class offscreencanvas_webcodecs_worker_2d_h264(PageloaderTest): """
OffscreenCanvas 2D video texture update on a DOM worker thread with WebCodecs and1080p H264 video.
Measures mean frame time across 100 frames.
(decodes each frame and performs drawImage(<videoFrame>)) """
@register_test() class offscreencanvas_webcodecs_worker_2d_vp9(PageloaderTest): """
OffscreenCanvas 2D video texture update on a DOM worker thread with WebCodecs and1080p VP9 video.
Measures mean frame time across 100 frames.
(decodes each frame and performs drawImage(<videoFrame>)) """
@register_test() class offscreencanvas_webcodecs_worker_2d_av1(PageloaderTest): """
OffscreenCanvas 2D video texture update on a DOM worker thread with WebCodecs and1080p AV1 video.
Measures mean frame time across 100 frames.
(decodes each frame and performs drawImage(<videoFrame>)) """
@register_test() class tp5n(PageloaderTest): """
Tests the time it takes Firefox to load the tp5 web page test set.
The tp5 is an updated web page test set to 100 pages from April 8th, 2011.
Effort was made for the pages to no longer be splash screens/login
pages/home pages but to be pages that better reflect the actual content
of the site in question. """
@register_test() class tp5o_scroll_paint_skip(tp5o_scroll): """
Tests scroll with paint skip (like tscrollx does, including ASAP) but on the tp5o pageset. """
@register_test() class v8_7(PageloaderTest): """
This is the V8 (version 7) javascript benchmark taken verbatim and
slightly modified to fit into our pageloader extension and talos harness.
The previous version of this test is V8 version 5 which was run on
selective branches and operating systems. """
@register_test() class kraken(PageloaderTest): """
This is the Kraken javascript benchmark taken verbatim and slightly
modified to fit into our pageloader extension and talos harness. """
@register_test() class dromaeo_css(dromaeo): """
Dromaeo suite of tests for JavaScript performance testing.
See the Dromaeo wiki (https://wiki.mozilla.org/Dromaeo) for more information.
Each page in the manifest is part of the dromaemo css benchmark. """
gecko_profile_interval = 2
tpmanifest = "${talos}/tests/dromaeo/css.manifest"
unit = "score"
@register_test() class dromaeo_dom(dromaeo): """
Dromaeo suite of tests for JavaScript performance testing.
See the Dromaeo wiki (https://wiki.mozilla.org/Dromaeo) for more information.
Each page in the manifest is part of the dromaemo dom benchmark. """
gecko_profile_interval = 2
tpmanifest = "${talos}/tests/dromaeo/dom.manifest"
unit = "score"
@register_test() class tresize(PageloaderTest): """
This test does some resize thing. """
@register_test() class stylebench(WebkitBenchmark): # StyleBench benchmark used by many browser vendors (from webkit)
tpmanifest = "${talos}/tests/stylebench/stylebench.manifest"
@register_test() class motionmark_animometer(WebkitBenchmark): # MotionMark benchmark used by many browser vendors (from webkit)
tpmanifest = "${talos}/tests/motionmark/animometer.manifest"
@register_test() class motionmark_webgl(WebkitBenchmark): # MotionMark benchmark used by many browser vendors (from webkit)
tpmanifest = "${talos}/tests/motionmark/webgl.manifest"
unit = "fps"
timeout = 600
@register_test() class ARES6(WebkitBenchmark): # ARES-6 benchmark used by many browser vendors (from webkit)
tpmanifest = "${talos}/tests/ares6/ares6.manifest"
tppagecycles = 1
lower_is_better = True
@register_test() class motionmark_htmlsuite(WebkitBenchmark): # MotionMark benchmark used by many browser vendors (from webkit)
tpmanifest = "${talos}/tests/motionmark/htmlsuite.manifest"
@register_test() class JetStream(WebkitBenchmark): # JetStream benchmark used by many browser vendors (from webkit)
tpmanifest = "${talos}/tests/jetstream/jetstream.manifest"
tppagecycles = 1
@register_test() class perf_reftest(PageloaderTest): """
Style perf-reftest a set of tests where the result is the difference of base vs ref pages """
base_vs_ref = ( True# compare the two test pages with eachother and report comparison
)
tpmanifest = "${talos}/tests/perf-reftest/perf_reftest.manifest"
tpcycles = 1
tppagecycles = 10
tptimeout = 30000
gecko_profile_interval = 1
filters = filter.ignore_first.prepare(5) + filter.median.prepare()
unit = "ms"
lower_is_better = True
alert_threshold = 5.0
subtest_alerts = True
@register_test() class perf_reftest_singletons(PageloaderTest): """
Style perf-reftests run as individual tests """
@register_test() class displaylist_mutate(PageloaderTest): """
Test modifying single items in a large display list. Measure transaction speed
to the compositor. """
@register_test() class rasterflood_svg(PageloaderTest): """
Test modifying single items in a large display list. Measure transaction speed
to the compositor. """
@register_test() class about_preferences_basic(PageloaderTest): """
Base classfor about_preferences test """
tpmanifest = "${talos}/tests/about-preferences/about_preferences_basic.manifest" # this test uses 'about:blank' as a dummy page (see manifest) so that the pages # that just change url categories (i.e. about:preferences#search) will get a load event # also any of the url category pages cannot have more than one tppagecycle
tpcycles = 25
tppagecycles = 1
gecko_profile_interval = 1
filters = filter.ignore_first.prepare(5) + filter.median.prepare()
unit = "ms"
lower_is_better = True
fnbpaint = True
pine = False
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.16Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.