Skip to content

Commit

Permalink
Bug 1808032 - Change architecture to arm64 and add focus to mozperfte…
Browse files Browse the repository at this point in the history
…st android startup for CVFF and CVNS. r=perftest-reviewers,sparky

Differential Revision: https://phabricator.services.mozilla.com/D165748
  • Loading branch information
Andrej1198 committed Jan 16, 2023
1 parent 97402b4 commit 99fc9c5
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 10 deletions.
16 changes: 14 additions & 2 deletions python/mozperftest/mozperftest/system/android_startup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
TEST_COLD_MAIN_RESTORE = "cold_main_session_restore"
TEST_COLD_VIEW_FF = "cold_view_first_frame"
TEST_COLD_VIEW_NAV_START = "cold_view_nav_start"
TEST_URI = "https://example.edu"
TEST_URI = "https://example.com"

BASE_URL_DICT = {
PROD_FENIX: (
Expand Down Expand Up @@ -66,6 +66,18 @@
"mobile.v2.focus-android.nightly.{date}.latest.{architecture}/artifacts/"
"public%2Fbuild%2Ffocus%2F{architecture}%2Ftarget.apk"
),
PROD_FOCUS
+ "-v3": (
"https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/"
"mobile.v3.firefox-android.apks.focus-nightly.{date}.latest.{architecture}"
"/artifacts/public%2Fbuild%2Ffocus%2F{architecture}%2Ftarget.apk"
),
PROD_FOCUS
+ "-v3-latest": (
"https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/"
"mobile.v3.firefox-android.apks.focus-nightly.latest.{architecture}"
"/artifacts/public%2Fbuild%2Ffocus%2F{architecture}%2Ftarget.apk"
),
}
PROD_TO_CHANNEL_TO_PKGID = {
PROD_FENIX: {
Expand Down Expand Up @@ -168,7 +180,7 @@ def __init__(self, env, mach_cmd):
self.android_activity = None
self.capture_logcat = self.capture_file = self.app_name = None
self.download_date = date.today()
self.architecture = "armeabi-v7a"
self.architecture = "arm64-v8a"
self.device = mozdevice.ADBDevice(use_root=False)

def run(self, metadata):
Expand Down
48 changes: 48 additions & 0 deletions taskcluster/ci/perftest/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,54 @@ hw-a51-startup-fenix-cold-view-nav-start:
--AndroidStartUp-product=fenix
--AndroidStartUp-release-channel=nightly
hw-a51-startup-focus-cold-main-first-frame:
worker-type: t-bitbar-gw-perf-a51
description: Run android startup perftest on Focus on a Samsung A51
treeherder:
symbol: perftest(startup-focus-cmff)
platform: android-hw-a51-11-0-arm7-shippable/opt
attributes:
cron: true
run:
command: >-
mkdir -p $MOZ_FETCHES_DIR/../artifacts &&
cd $GECKO_PATH &&
python3 python/mozperftest/mozperftest/runner.py
--flavor=mobile-browser
--AndroidStartUp
testing/performance/perftest_android_startup.js
--browsertime-cycles=0
--AndroidStartUp-test-name=cold_main_first_frame
--perfherder
--hooks
testing/performance/hooks_android_startup.py
--AndroidStartUp-product=focus
--AndroidStartUp-release-channel=nightly
hw-a51-startup-focus-cold-view-nav-start:
worker-type: t-bitbar-gw-perf-a51
description: Run android startup perftest on Focus on a Samsung A51
treeherder:
symbol: perftest(startup-focus-cvns)
platform: android-hw-a51-11-0-arm7-shippable/opt
attributes:
cron: true
run:
command: >-
mkdir -p $MOZ_FETCHES_DIR/../artifacts &&
cd $GECKO_PATH &&
python3 python/mozperftest/mozperftest/runner.py
--flavor=mobile-browser
--AndroidStartUp
testing/performance/perftest_android_startup.js
--browsertime-cycles=0
--AndroidStartUp-test-name=cold_view_nav_start
--perfherder
--hooks
testing/performance/hooks_android_startup.py
--AndroidStartUp-product=focus
--AndroidStartUp-release-channel=nightly
hw-a51-aarch64-view-fenix:
worker-type: t-bitbar-gw-perf-a51
description: Run VIEW perftest on Fenix on a Samsung A51
Expand Down
25 changes: 17 additions & 8 deletions testing/performance/hooks_android_startup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
# 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 pathlib
from datetime import date, datetime
from datetime import datetime

import requests
from mozperftest.system.android_startup import (
BASE_URL_DICT,
DATETIME_FORMAT,
KEY_ARCHITECTURE,
KEY_COMMIT,
KEY_DATETIME,
Expand All @@ -18,13 +19,21 @@

def before_iterations(kw):
product = kw["AndroidStartUp_product"]
download_date = date.today()
architecture = "armeabi-v7a"

if product == PROD_FOCUS and download_date >= datetime(2021, 11, 5):
product += "-v2"

nightly_url = BASE_URL_DICT[product + "-latest"].format(architecture=architecture)
download_date = datetime.today()
architecture = "arm64-v8a"

if product == PROD_FOCUS:
if download_date >= datetime(2022, 12, 15):
product += "-v3"
elif download_date >= datetime(2021, 11, 5):
product += "-v2"
# The above sections with v2, v3 are occurring because of change in task cluster indicies
# This is not expected to occur regularly, the new indicies contain both focus and fenix
# android components

nightly_url = BASE_URL_DICT[product + "-latest"].format(
date=download_date.strftime(DATETIME_FORMAT), architecture=architecture
)
filename = f"{product}_nightly_{architecture}.apk"
print("Fetching {}...".format(filename), end="", flush=True)
download_apk_as_date(nightly_url, download_date, filename)
Expand Down

0 comments on commit 99fc9c5

Please sign in to comment.