Closed Bug 2083734 Opened 1 month ago Closed 1 month ago

Only install visual metrics packages in the raptor virtualenv when visual metrics run

Categories

(Testing :: Raptor, enhancement, P1)

enhancement

Tracking

(firefox161 fixed)

RESOLVED FIXED
161 Branch
Tracking Status
firefox161 --- fixed

People

(Reporter: aglavic, Assigned: aglavic)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 external file)

While experimenting with a local test-harness profiler I created, I found that the mozharness raptor script (testing/mozharness/mozharness/mozilla/testing/raptor.py) installs numpy, Pillow, scipy, opencv-python and pyssim for every browsertime task, even when the task doesn't compute visual metrics. On Android hardware these wheels (about 115 MiB) are downloaded on every run because the uv cache is always cold.

The packages should only be installed when browsertime_visualmetrics is set (or for local runs).

Measured on try with 3 runs per task across all Android browsertime tasks that skip visual metrics:

Device create-virtualenv before after saved
a55 46.7 s 14.8 s 31.9 s
s24 75.8 s 35.2 s 40.6 s
p6 75.1 s 36.4 s 38.7 s

We can save 30 seconds roughly per android job that does not require visual metrics this way. A nice small performance win!

Assignee: nobody → aglavic

Most browsertime tasks don't compute visual metrics, but every run installed
numpy, Pillow, scipy, opencv-python and pyssim, which Android hardware
downloads each time.

Raptor's geometric mean used scipy, so it now uses the statistics module,
keeping scipy's results for empty, negative and zero input.

Pushed by aglavic@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/e65fd19f7d44 https://hg.mozilla.org/integration/autoland/rev/645d6102dd4c Only install visual metrics packages in the raptor virtualenv when visual metrics run. r=perftest-reviewers,kshampur
Pushed by agoloman@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/97416095f9fc https://hg.mozilla.org/integration/autoland/rev/95c1e8e840ef Revert "Bug 2083734 - Only install visual metrics packages in the raptor virtualenv when visual metrics run. r=perftest-reviewers,kshampur" for causing python failures.

Backed out for causing python failures.

Flags: needinfo?(aglavic)
Pushed by aglavic@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/d5936f36003a https://hg.mozilla.org/integration/autoland/rev/dcdaed87a502 Only install visual metrics packages in the raptor virtualenv when visual metrics run. r=perftest-reviewers,kshampur

Resolve backout, merged now

Flags: needinfo?(aglavic)
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 161 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: