Skip to content

Commit

Permalink
Bug 1677559 - Run visual-metrics in the browsertime test task. r=perf…
Browse files Browse the repository at this point in the history
…test-reviewers,kshampur

This patch runs the visual-metrics processing within the test task rather than the (deleted) `-vismet` tasks. It also updates the browsertime version to v15. It requires an update to node16 so new code was added to pull, and install the *-node-16 toolchain artifacts from CI.

This patch is possible because the browsertime update gives us the new `visualmetrics-portable.py` script which doesn't require ImageMagick anymore (they've been converted to Python dependencies). We did this conversion here: sitespeedio/browsertime#1741

Furthermore, some changes are made to handle timeouts better, and increase the timeout for an interactive test.

Depends on D143502

Differential Revision: https://phabricator.services.mozilla.com/D142838
  • Loading branch information
Gregory Mierzwinski committed May 2, 2022
1 parent 62b8079 commit 0ab99d5
Show file tree
Hide file tree
Showing 19 changed files with 283 additions and 318 deletions.
2 changes: 1 addition & 1 deletion taskcluster/ci/toolchain/misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ browsertime:
toolchain-artifact: public/build/browsertime.tar.zst
fetches:
toolchain:
- linux64-node
- linux64-node-16

wrench-deps:
description: "Downloads all the crates needed for building wrench"
Expand Down
1 change: 1 addition & 0 deletions taskcluster/gecko_taskgraph/transforms/test/raptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ def add_extra_options(config, tests):

if test["raptor"].pop("run-visual-metrics", False):
extra_options.append("--browsertime-video")
extra_options.append("--browsertime-visualmetrics")
test["attributes"]["run-visual-metrics"] = True

if "app" in test:
Expand Down
42 changes: 23 additions & 19 deletions testing/mozharness/mozharness/mozilla/testing/raptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -680,13 +680,6 @@ def __init__(self, **kwargs):
if value and arg not in self.config.get("raptor_cmd_line_args", []):
setattr(self, details["dest"], value)

if (
not self.run_local
and self.browsertime_visualmetrics
and self.browsertime_video
):
self.error("Cannot run visual metrics in the same CI task as the test.")

# We accept some configuration options from the try commit message in the
# format mozharness: <options>. Example try commit message: mozharness:
# --geckoProfile try: <stuff>
Expand Down Expand Up @@ -1064,20 +1057,31 @@ def create_virtualenv(self, **kwargs):
)

modules = ["pip>=1.5"]
if self.run_local and self.browsertime_visualmetrics:
# Add modules required for visual metrics
py3_minor = sys.version_info.minor

if py3_minor <= 7:
modules.extend(
["numpy==1.16.1", "Pillow==6.1.0", "scipy==1.2.3", "pyssim==0.4"]
)
else: # python version >= 3.8
modules.extend(
["numpy==1.22.0", "Pillow==9.0.0", "scipy==1.7.3", "pyssim==0.4"]
)
# these versions above seem to work for python 3.8 - 3.10
# Add modules required for visual metrics
py3_minor = sys.version_info.minor
if py3_minor <= 7:
modules.extend(
[
"numpy==1.16.1",
"Pillow==6.1.0",
"scipy==1.2.3",
"pyssim==0.4",
"opencv-python==4.5.4.60",
]
)
else: # python version >= 3.8
modules.extend(
[
"numpy==1.22.0",
"Pillow==9.0.0",
"scipy==1.7.3",
"pyssim==0.4",
"opencv-python==4.5.4.60",
]
)

if self.run_local:
self.setup_local_ffmpeg()

# Require pip >= 1.5 so pip will prefer .whl files to install
Expand Down
Loading

0 comments on commit 0ab99d5

Please sign in to comment.