Bug 1819335 Part 2 - Add tests for page name change and break-after/break-before...
[gecko.git] / testing / performance / hooks.py
blob1a02f1ab3ceefe026ddb9ffef0f04508162517d3
1 # This Source Code Form is subject to the terms of the Mozilla Public
2 # License, v. 2.0. If a copy of the MPL was not distributed with this
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 import os
6 from mozperftest.test.browsertime import add_option, add_options
8 sites = os.path.join(os.path.dirname(__file__), "sites.txt")
9 with open(sites) as f:
10 sites = [site for site in f.read().split("\n") if site.strip()]
13 def next_site():
14 for site in sites:
15 yield site
18 get_site = next_site()
20 options = [
21 ("firefox.preference", "network.http.speculative-parallel-limit:6"),
22 # XXX potentially move those as first class options in mozperf?
23 ("pageCompleteWaitTime", "10000"),
24 ("visualMetrics", "true"),
25 ("video", "true"),
26 ("firefox.windowRecorder", "false"),
27 ("videoParams.addTimer", "false"),
28 ("videoParams.createFilmstrip", "false"),
29 ("videoParams.keepOriginalVideo", "true"),
33 def before_runs(env, **kw):
34 env.set_arg("cycles", len(sites))
35 add_options(env, options)
38 def before_cycle(env, **kw):
39 url = next(get_site)
40 add_option(env, "browsertime.url", url)