mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 23:02:20 +00:00
Bug 1695252 - Add a pageload test that reports PerfStats r=sparky,perftest-reviewers
This commit adds a simple pageload test, a warm pageload of https://www.google.com. Low-level perfstats are collected. All platforms were included. Not running as a cron job. The motivation is that we can now collect low-level perfStats timings and determine how useful they will be for performance work. Differential Revision: https://phabricator.services.mozilla.com/D109072
This commit is contained in:
parent
5b82d35841
commit
b70829a366
@ -33,6 +33,7 @@ suites:
|
||||
YouTube Link: ""
|
||||
pageload: ""
|
||||
JSConf (warm): ""
|
||||
perfstats: ""
|
||||
browser/base/content/test:
|
||||
description: "Performance tests from the 'browser/base/content/test' folder."
|
||||
tests:
|
||||
|
@ -216,3 +216,123 @@ hw-p2-main-fenix:
|
||||
--output $MOZ_FETCHES_DIR/../artifacts
|
||||
--browsertime-iterations 14
|
||||
testing/performance/perftest_android_main.js
|
||||
|
||||
hw-g5-perfstats-gv:
|
||||
worker-type: t-bitbar-gw-perf-g5
|
||||
description: Run PerfStats perftest on GeckoView on a G5
|
||||
treeherder:
|
||||
symbol: perftest(perfstats-gv)
|
||||
platform: android-hw-g5-7-0-arm7-api-16-shippable/opt
|
||||
attributes:
|
||||
cron: false
|
||||
run:
|
||||
command: >-
|
||||
mkdir -p $MOZ_FETCHES_DIR/../artifacts &&
|
||||
cd $GECKO_PATH &&
|
||||
python3 python/mozperftest/mozperftest/runner.py
|
||||
--flavor mobile-browser
|
||||
--android
|
||||
--android-app-name org.mozilla.geckoview_example
|
||||
--android-activity org.mozilla.geckoview_example.GeckoViewActivity
|
||||
--android-clear-logcat
|
||||
--android-capture-logcat logcat
|
||||
--android-install-apk gve_nightly_api16
|
||||
--browsertime-geckodriver ${MOZ_FETCHES_DIR}/geckodriver
|
||||
--output $MOZ_FETCHES_DIR/../artifacts
|
||||
--verbose
|
||||
--perfherder
|
||||
--perfherder-app geckoview
|
||||
--perfherder-metrics name:HttpChannelCompletion_Cache,unit:ms name:HttpChannelCompletion_Network,unit:ms
|
||||
--browsertime-iterations 10
|
||||
--hooks testing/performance/hooks_perfstats.py
|
||||
testing/performance/perftest_perfstats.js
|
||||
|
||||
hw-p2-perfstats-gv:
|
||||
worker-type: t-bitbar-gw-perf-p2
|
||||
description: Run PerfStats pageload test on GeckoView on a Pixel 2
|
||||
treeherder:
|
||||
symbol: perftest(perfstats-gv)
|
||||
platform: android-hw-p2-8-0-android-aarch64-shippable/opt
|
||||
attributes:
|
||||
cron: false
|
||||
run:
|
||||
command: >-
|
||||
mkdir -p $MOZ_FETCHES_DIR/../artifacts &&
|
||||
cd $GECKO_PATH &&
|
||||
python3 python/mozperftest/mozperftest/runner.py
|
||||
--flavor mobile-browser
|
||||
--android
|
||||
--android-app-name org.mozilla.geckoview_example
|
||||
--android-activity org.mozilla.geckoview_example.GeckoViewActivity
|
||||
--android-clear-logcat
|
||||
--android-capture-logcat logcat
|
||||
--android-install-apk gve_nightly_aarch64
|
||||
--browsertime-geckodriver ${MOZ_FETCHES_DIR}/geckodriver
|
||||
--output $MOZ_FETCHES_DIR/../artifacts
|
||||
--verbose
|
||||
--perfherder
|
||||
--perfherder-app geckoview
|
||||
--perfherder-metrics name:HttpChannelCompletion_Cache,unit:ms name:HttpChannelCompletion_Network,unit:ms
|
||||
--browsertime-iterations 10
|
||||
--hooks testing/performance/hooks_perfstats.py
|
||||
testing/performance/perftest_perfstats.js
|
||||
|
||||
hw-g5-perfstats-fenix:
|
||||
worker-type: t-bitbar-gw-perf-g5
|
||||
description: Run PerfStats perftest on Fenix on a G5
|
||||
treeherder:
|
||||
symbol: perftest(perfstats-fenix)
|
||||
platform: android-hw-g5-7-0-arm7-api-16-shippable/opt
|
||||
attributes:
|
||||
cron: false
|
||||
run:
|
||||
command: >-
|
||||
mkdir -p $MOZ_FETCHES_DIR/../artifacts &&
|
||||
cd $GECKO_PATH &&
|
||||
python3 python/mozperftest/mozperftest/runner.py
|
||||
--flavor mobile-browser
|
||||
--android
|
||||
--android-app-name org.mozilla.fenix
|
||||
--android-activity org.mozilla.fenix.IntentReceiverActivity
|
||||
--android-clear-logcat
|
||||
--android-capture-logcat logcat
|
||||
--android-install-apk fenix_nightly_armeabi_v7a
|
||||
--browsertime-geckodriver ${MOZ_FETCHES_DIR}/geckodriver
|
||||
--output $MOZ_FETCHES_DIR/../artifacts
|
||||
--verbose
|
||||
--perfherder
|
||||
--perfherder-app fenix
|
||||
--perfherder-metrics name:HttpChannelCompletion_Cache,unit:ms name:HttpChannelCompletion_Network,unit:ms
|
||||
--browsertime-iterations 10
|
||||
--hooks testing/performance/hooks_perfstats.py
|
||||
testing/performance/perftest_perfstats.js
|
||||
|
||||
hw-p2-perfstats-fenix:
|
||||
worker-type: t-bitbar-gw-perf-p2
|
||||
description: Run PerfStats perftest on Fenix on a Pixel2
|
||||
treeherder:
|
||||
symbol: perftest(perfstats-fenix)
|
||||
platform: android-hw-p2-8-0-android-aarch64-shippable/opt
|
||||
attributes:
|
||||
cron: false
|
||||
run:
|
||||
command: >-
|
||||
mkdir -p $MOZ_FETCHES_DIR/../artifacts &&
|
||||
cd $GECKO_PATH &&
|
||||
python3 python/mozperftest/mozperftest/runner.py
|
||||
--flavor mobile-browser
|
||||
--android
|
||||
--android-app-name org.mozilla.fenix
|
||||
--android-activity org.mozilla.fenix.IntentReceiverActivity
|
||||
--android-clear-logcat
|
||||
--android-capture-logcat logcat
|
||||
--android-install-apk fenix_nightly_arm64_v8a
|
||||
--browsertime-geckodriver ${MOZ_FETCHES_DIR}/geckodriver
|
||||
--output $MOZ_FETCHES_DIR/../artifacts
|
||||
--verbose
|
||||
--perfherder
|
||||
--perfherder-app fenix
|
||||
--perfherder-metrics name:HttpChannelCompletion_Cache,unit:ms name:HttpChannelCompletion_Network,unit:ms
|
||||
--browsertime-iterations 10
|
||||
--hooks testing/performance/hooks_perfstats.py
|
||||
testing/performance/perftest_perfstats.js
|
||||
|
@ -214,3 +214,24 @@ controlled:
|
||||
--perfherder-simplify-names
|
||||
--browsertime-geckodriver ${MOZ_FETCHES_DIR}/geckodriver
|
||||
--output $MOZ_FETCHES_DIR/../artifacts
|
||||
|
||||
perfstats:
|
||||
description: Run PerfStats pageload test
|
||||
treeherder:
|
||||
symbol: perftest(linux-perfstats)
|
||||
attributes:
|
||||
cron: false
|
||||
run:
|
||||
command: >-
|
||||
mkdir -p $MOZ_FETCHES_DIR/../artifacts &&
|
||||
cd $MOZ_FETCHES_DIR &&
|
||||
python3.8 python/mozperftest/mozperftest/runner.py
|
||||
--browsertime-binary ${MOZ_FETCHES_DIR}/firefox/firefox-bin
|
||||
--flavor desktop-browser
|
||||
--browsertime-geckodriver ${MOZ_FETCHES_DIR}/geckodriver
|
||||
--output $MOZ_FETCHES_DIR/../artifacts
|
||||
--perfherder
|
||||
--perfherder-metrics name:HttpChannelCompletion_Cache,unit:ms name:HttpChannelCompletion_Network,unit:ms
|
||||
--browsertime-iterations 10
|
||||
--hooks testing/performance/hooks_perfstats.py
|
||||
testing/performance/perftest_perfstats.js
|
||||
|
@ -225,3 +225,27 @@ controlled:
|
||||
--perfherder-simplify-names
|
||||
--browsertime-geckodriver ${MOZ_FETCHES_DIR}/geckodriver
|
||||
--output $MOZ_FETCHES_DIR/../artifacts
|
||||
|
||||
perfstats:
|
||||
description: Run PerfStats pageload test
|
||||
treeherder:
|
||||
symbol: perftest(macos-perfstats)
|
||||
attributes:
|
||||
batch: false
|
||||
cron: false
|
||||
run:
|
||||
command: >-
|
||||
mkdir -p $MOZ_FETCHES_DIR/../artifacts &&
|
||||
cd $MOZ_FETCHES_DIR &&
|
||||
python3 -m venv . &&
|
||||
bin/python3 python/mozperftest/mozperftest/runner.py
|
||||
--browsertime-binary ${MOZ_FETCHES_DIR}/target.dmg
|
||||
--browsertime-node ${MOZ_FETCHES_DIR}/node/bin/node
|
||||
--flavor desktop-browser
|
||||
--browsertime-geckodriver ${MOZ_FETCHES_DIR}/geckodriver
|
||||
--output $MOZ_FETCHES_DIR/../artifacts
|
||||
--perfherder
|
||||
--perfherder-metrics name:HttpChannelCompletion_Cache,unit:ms name:HttpChannelCompletion_Network,unit:ms
|
||||
--browsertime-iterations 10
|
||||
--hooks testing/performance/hooks_perfstats.py
|
||||
testing/performance/perftest_perfstats.js
|
||||
|
@ -174,3 +174,26 @@ controlled:
|
||||
--browsertime-geckodriver ${MOZ_FETCHES_DIR}/geckodriver.exe
|
||||
--browsertime-node ${MOZ_FETCHES_DIR}/node/node.exe
|
||||
--output $MOZ_FETCHES_DIR/../artifacts
|
||||
|
||||
perfstats:
|
||||
description: Run PerfStats pageload test
|
||||
treeherder:
|
||||
symbol: perftest(win-perfstats)
|
||||
attributes:
|
||||
batch: false
|
||||
cron: false
|
||||
run:
|
||||
command: >-
|
||||
mkdir -p $MOZ_FETCHES_DIR/../artifacts &&
|
||||
cd $MOZ_FETCHES_DIR &&
|
||||
python3.exe python/mozperftest/mozperftest/runner.py
|
||||
--browsertime-binary ${MOZ_FETCHES_DIR}/firefox/firefox.exe
|
||||
--flavor desktop-browser
|
||||
--browsertime-geckodriver ${MOZ_FETCHES_DIR}/geckodriver.exe
|
||||
--browsertime-node ${MOZ_FETCHES_DIR}/node/node.exe
|
||||
--output $MOZ_FETCHES_DIR/../artifacts
|
||||
--perfherder
|
||||
--perfherder-metrics name:HttpChannelCompletion_Cache,unit:ms name:HttpChannelCompletion_Network,unit:ms
|
||||
--browsertime-iterations 10
|
||||
--hooks testing/performance/hooks_perfstats.py
|
||||
testing/performance/perftest_perfstats.js
|
||||
|
@ -201,5 +201,15 @@ perftest_pageload.js
|
||||
|
||||
**Measures time to load mozilla page**
|
||||
|
||||
perftest_perfstats.js
|
||||
=====================
|
||||
|
||||
:owner: Performance Team
|
||||
:name: perfstats
|
||||
|
||||
**Collect perfstats for the given site**
|
||||
|
||||
This test launches browsertime with the perfStats option (will collect low-overhead timings, see Bug 1553254). The test currently runs a single site, google.com - the top-ranking global Alexa site.
|
||||
|
||||
|
||||
If you have any questions, please see this `wiki page <https://wiki.mozilla.org/TestEngineering/Performance#Where_to_find_us>`_.
|
||||
|
23
testing/performance/hooks_perfstats.py
Normal file
23
testing/performance/hooks_perfstats.py
Normal file
@ -0,0 +1,23 @@
|
||||
# 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/.
|
||||
from __future__ import absolute_import
|
||||
from mozperftest.test.browsertime import add_options
|
||||
from mozperftest.test.browsertime.runner import NodeException
|
||||
|
||||
|
||||
common_options = [("firefox.perfStats", "true")]
|
||||
|
||||
|
||||
def on_exception(env, layer, exc):
|
||||
if not isinstance(exc, NodeException):
|
||||
raise exc
|
||||
return True
|
||||
|
||||
|
||||
def logcat_processor():
|
||||
pass
|
||||
|
||||
|
||||
def before_runs(env, **kw):
|
||||
add_options(env, common_options)
|
@ -5,5 +5,6 @@
|
||||
[perftest_jsconf_cold.js]
|
||||
[perftest_jsconf_warm.js]
|
||||
[perftest_pageload.js]
|
||||
[perftest_perfstats.js]
|
||||
[perftest_politico_link.js]
|
||||
[perftest_youtube_link.js]
|
||||
|
30
testing/performance/perftest_perfstats.js
Normal file
30
testing/performance/perftest_perfstats.js
Normal file
@ -0,0 +1,30 @@
|
||||
/* 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/. */
|
||||
|
||||
const url = "https://www.google.com";
|
||||
|
||||
async function test(context, commands) {
|
||||
await commands.wait.byTime(5000);
|
||||
|
||||
await commands.navigate(url);
|
||||
await commands.wait.byTime(5000);
|
||||
|
||||
return commands.measure.start(url);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
test,
|
||||
owner: "Performance Team",
|
||||
name: "perfstats",
|
||||
description: "Collect perfstats for the given site",
|
||||
longDescription: `
|
||||
This test launches browsertime with the perfStats option (will collect low-overhead timings, see Bug 1553254).
|
||||
The test currently runs a single site, google.com - the top-ranking global Alexa site.
|
||||
`,
|
||||
usage: `
|
||||
./mach perftest --hook testing/performance/hooks_perfstats.py \
|
||||
testing/performance/perftest_perfstats.js --browsertime-iterations 10 \
|
||||
--perfherder-metrics name:HttpChannelCompletion_Cache name:HttpChannelCompletion_Network
|
||||
`,
|
||||
};
|
Loading…
Reference in New Issue
Block a user