Bug 1552000 - move root-required tuning commands to its appropriate location for Raptor Android r=acreskey
authorEdwin Gao <egao@mozilla.com>
Thu, 16 May 2019 11:57:31 +0000
changeset 532952 3ebc795b98bac8c64597369f65b7774d18111a93
parent 532951 96802be91766718fa33fe2e98f7a910e4dd1bb5e
child 532953 1177f0af9ec0c7500ca5419a88de6b62cc07caf4
push id11276
push userrgurzau@mozilla.com
push dateMon, 20 May 2019 13:11:24 +0000
treeherdermozilla-beta@847755a7c325 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersacreskey
bugs1552000
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1552000 - move root-required tuning commands to its appropriate location for Raptor Android r=acreskey Changes: - move the I/O scheduler modification subroutine under the block that checks for `root` availability of device. This change should not be visible on CI systems; all devices there are already rooted. Where this change makes an impact is for developers running Raptor Android tests on non-rooted devices. Differential Revision: https://phabricator.services.mozilla.com/D31339
testing/raptor/raptor/raptor.py
--- a/testing/raptor/raptor/raptor.py
+++ b/testing/raptor/raptor/raptor.py
@@ -681,27 +681,29 @@ class RaptorAndroid(Raptor):
         self.clear_app_data()
 
     def tune_performance(self):
         """Set various performance-oriented parameters, to reduce jitter.
 
         For more information, see https://bugzilla.mozilla.org/show_bug.cgi?id=1547135.
         """
         self.log.info("tuning android device performance")
-        self.set_scheduler()
         self.set_svc_power_stayon()
-        device_name = self.device.shell_output('getprop ro.product.model')
         if (self.device._have_su or self.device._have_android_su):
+            self.log.info("executing additional tuning commands requiring root")
+            device_name = self.device.shell_output('getprop ro.product.model')
             # all commands require root shell from here on
+            self.set_scheduler()
             self.set_virtual_memory_parameters()
             self.turn_off_services()
             self.set_cpu_performance_parameters(device_name)
             self.set_gpu_performance_parameters(device_name)
             self.set_kernel_performance_parameters()
         self.device.clear_logcat()
+        self.log.info("android device performance tuning complete")
 
     def _set_value_and_check_exitcode(self, file_name, value, root=False):
         self.log.info('setting {} to {}'.format(file_name, value))
         process = self.device.shell(' '.join(['echo', str(value), '>', str(file_name)]), root=root)
         if process.exitcode == 0:
             self.log.info('successfully set {} to {}'.format(file_name, value))
         else:
             self.log.warning('command failed with exitcode {}'.format(str(process.exitcode)))