Skip to content

Commit

Permalink
[Telemetry] Improve Android cycle time.
Browse files Browse the repository at this point in the history
There's no need to eagerly install the file_poller. This ensure we only do it
when we're running a measurement that needs it.

BUG=

Review URL: https://codereview.chromium.org/298873006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272575 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
tonyg@chromium.org committed May 23, 2014
1 parent 1ea0175 commit 7dadd85
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ def __init__(self, device):
super(DS2784PowerMonitor, self).__init__()
self._device = device
self._powermonitor_process_port = None
android_prebuilt_profiler_helper.InstallOnDevice(device, 'file_poller')
self._file_poller_binary = android_prebuilt_profiler_helper.GetDevicePath(
'file_poller')

Expand All @@ -43,6 +42,8 @@ def CanMonitorPower(self):
def StartMonitoringPower(self, browser):
assert not self._powermonitor_process_port, (
'Must call StopMonitoringPower().')
android_prebuilt_profiler_helper.InstallOnDevice(
self._device, 'file_poller')
self._powermonitor_process_port = int(
self._device.old_interface.RunShellCommand(
'%s %d %s %s %s' % (self._file_poller_binary, SAMPLE_RATE_HZ,
Expand Down

0 comments on commit 7dadd85

Please sign in to comment.