Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: telemetry/telemetry/internal/platform/linux_platform_backend.py

Issue 3016533002: Disable power monitoring on all desktop platforms (Closed)
Patch Set: Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | telemetry/telemetry/internal/platform/mac_platform_backend.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import logging 5 import logging
6 import os 6 import os
7 import platform 7 import platform
8 import subprocess 8 import subprocess
9 import sys 9 import sys
10 10
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 self._InstallIpfw() 93 self._InstallIpfw()
94 elif application == 'avconv': 94 elif application == 'avconv':
95 self._InstallBinary(application) 95 self._InstallBinary(application)
96 elif application in _POSSIBLE_PERFHOST_APPLICATIONS: 96 elif application in _POSSIBLE_PERFHOST_APPLICATIONS:
97 self._InstallBinary(application) 97 self._InstallBinary(application)
98 else: 98 else:
99 raise NotImplementedError( 99 raise NotImplementedError(
100 'Please teach Telemetry how to install ' + application) 100 'Please teach Telemetry how to install ' + application)
101 101
102 def CanMonitorPower(self): 102 def CanMonitorPower(self):
103 return self._power_monitor.CanMonitorPower() 103 # TODO(charliea): This is a stopgap until all desktop power monitoring code
104 # can be removed. (crbug.com/763263)
105 return False
104 106
105 def CanMeasurePerApplicationPower(self): 107 def CanMeasurePerApplicationPower(self):
106 return self._power_monitor.CanMeasurePerApplicationPower() 108 return self._power_monitor.CanMeasurePerApplicationPower()
107 109
108 def StartMonitoringPower(self, browser): 110 def StartMonitoringPower(self, browser):
109 self._power_monitor.StartMonitoringPower(browser) 111 self._power_monitor.StartMonitoringPower(browser)
110 112
111 def StopMonitoringPower(self): 113 def StopMonitoringPower(self):
112 return self._power_monitor.StopMonitoringPower() 114 return self._power_monitor.StopMonitoringPower()
113 115
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 assert self.CanLaunchApplication('ipfw'), 'Failed to install ipfw. ' \ 158 assert self.CanLaunchApplication('ipfw'), 'Failed to install ipfw. ' \
157 'ipfw provided binaries are not supported for linux kernel < 3.13. ' \ 159 'ipfw provided binaries are not supported for linux kernel < 3.13. ' \
158 'You may proceed by manually building and installing dummynet for ' \ 160 'You may proceed by manually building and installing dummynet for ' \
159 'your kernel. See: http://info.iet.unipi.it/~luigi/dummynet/' 161 'your kernel. See: http://info.iet.unipi.it/~luigi/dummynet/'
160 162
161 def _InstallBinary(self, bin_name): 163 def _InstallBinary(self, bin_name):
162 bin_path = binary_manager.FetchPath( 164 bin_path = binary_manager.FetchPath(
163 bin_name, self.GetArchName(), self.GetOSName()) 165 bin_name, self.GetArchName(), self.GetOSName())
164 os.environ['PATH'] += os.pathsep + os.path.dirname(bin_path) 166 os.environ['PATH'] += os.pathsep + os.path.dirname(bin_path)
165 assert self.CanLaunchApplication(bin_name), 'Failed to install ' + bin_name 167 assert self.CanLaunchApplication(bin_name), 'Failed to install ' + bin_name
OLDNEW
« no previous file with comments | « no previous file | telemetry/telemetry/internal/platform/mac_platform_backend.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698