зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1625169 - Make it possible to disable performance tuning in Raptor Android tests r=sparky,perftest-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D69385 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
0495be8c50
Коммит
4d6c2325d8
|
@ -237,6 +237,12 @@ class Raptor(TestingMixin, MercurialScript, CodeCoverageMixin, AndroidMixin):
|
|||
"default": False,
|
||||
"help": "Use Raptor to measure CPU usage."
|
||||
}],
|
||||
[["--disable-perf-tuning"], {
|
||||
"action": "store_true",
|
||||
"dest": "disable_perf_tuning",
|
||||
"default": False,
|
||||
"help": "Disable performance tuning on android.",
|
||||
}],
|
||||
[["--debug-mode"], {
|
||||
"dest": "debug_mode",
|
||||
"action": "store_true",
|
||||
|
@ -359,6 +365,7 @@ class Raptor(TestingMixin, MercurialScript, CodeCoverageMixin, AndroidMixin):
|
|||
self.power_test = self.config.get('power_test')
|
||||
self.memory_test = self.config.get('memory_test')
|
||||
self.cpu_test = self.config.get('cpu_test')
|
||||
self.disable_perf_tuning = self.config.get('disable_perf_tuning')
|
||||
self.extra_prefs = self.config.get('extra_prefs')
|
||||
self.is_release_build = self.config.get('is_release_build')
|
||||
self.debug_mode = self.config.get('debug_mode', False)
|
||||
|
@ -540,6 +547,8 @@ class Raptor(TestingMixin, MercurialScript, CodeCoverageMixin, AndroidMixin):
|
|||
options.extend(['--memory-test'])
|
||||
if self.config.get('cpu_test', False):
|
||||
options.extend(['--cpu-test'])
|
||||
if self.config.get('disable_perf_tuning', False):
|
||||
options.extend(['--disable-perf-tuning'])
|
||||
if self.config.get('cold', False):
|
||||
options.extend(['--cold'])
|
||||
if self.config.get('enable_webrender', False):
|
||||
|
|
|
@ -58,6 +58,7 @@ class RaptorRunner(MozbuildObject):
|
|||
self.memory_test = kwargs['memory_test']
|
||||
self.power_test = kwargs['power_test']
|
||||
self.cpu_test = kwargs['cpu_test']
|
||||
self.disable_perf_tuning = kwargs['disable_perf_tuning']
|
||||
self.device_name = kwargs['device_name']
|
||||
|
||||
if Conditions.is_android(self) or kwargs["app"] in ANDROID_BROWSERS:
|
||||
|
@ -156,6 +157,7 @@ class RaptorRunner(MozbuildObject):
|
|||
'power_test': self.power_test,
|
||||
'memory_test': self.memory_test,
|
||||
'cpu_test': self.cpu_test,
|
||||
'disable_perf_tuning': self.disable_perf_tuning,
|
||||
'is_release_build': self.is_release_build,
|
||||
'device_name': self.device_name,
|
||||
}
|
||||
|
|
|
@ -121,7 +121,8 @@ class BrowsertimeAndroid(PerftestAndroid, Browsertime):
|
|||
def setup_adb_device(self):
|
||||
if self.device is None:
|
||||
self.device = ADBDevice(verbose=True)
|
||||
tune_performance(self.device, log=LOG)
|
||||
if not self.config.get("disable_perf_tuning", False):
|
||||
tune_performance(self.device, log=LOG)
|
||||
|
||||
self.clear_app_data()
|
||||
self.set_debug_app_flag()
|
||||
|
|
|
@ -164,6 +164,8 @@ def create_parser(mach_interface=False):
|
|||
help="Flag which indicates if Raptor should not offer to install Android APK.")
|
||||
add_arg('--installerpath', dest="installerpath", default=None, type=str,
|
||||
help="Location where Android browser APK was extracted to before installation.")
|
||||
add_arg('--disable-perf-tuning', dest='disable_perf_tuning', default=False,
|
||||
action="store_true", help="Disable performance tuning on android.")
|
||||
|
||||
# for browsertime jobs, cold page load is determined by a '--cold' cmd line argument
|
||||
add_arg('--cold', dest="cold", action="store_true",
|
||||
|
|
|
@ -93,6 +93,7 @@ either Raptor or browsertime."""
|
|||
results_handler_class=RaptorResultsHandler,
|
||||
no_conditioned_profile=False,
|
||||
device_name=None,
|
||||
disable_perf_tuning=False,
|
||||
extra_prefs={},
|
||||
**kwargs
|
||||
):
|
||||
|
@ -123,6 +124,7 @@ either Raptor or browsertime."""
|
|||
"no_conditioned_profile": no_conditioned_profile,
|
||||
"device_name": device_name,
|
||||
"enable_fission": extra_prefs.get("fission.autostart", False),
|
||||
"disable_perf_tuning": disable_perf_tuning,
|
||||
"extra_prefs": extra_prefs,
|
||||
}
|
||||
|
||||
|
|
|
@ -132,6 +132,7 @@ def main(args=sys.argv[1:]):
|
|||
extra_prefs=args.extra_prefs or {},
|
||||
device_name=args.device_name,
|
||||
no_conditioned_profile=args.no_conditioned_profile,
|
||||
disable_perf_tuning=args.disable_perf_tuning,
|
||||
)
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
|
|
@ -52,7 +52,9 @@ class WebExtensionAndroid(PerftestAndroid, WebExtension):
|
|||
def setup_adb_device(self):
|
||||
if self.device is None:
|
||||
self.device = ADBDevice(verbose=True)
|
||||
tune_performance(self.device, log=LOG)
|
||||
if not self.config.get("disable_perf_tuning", False):
|
||||
tune_performance(self.device, log=LOG)
|
||||
|
||||
if self.config['power_test']:
|
||||
disable_charging(self.device)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче