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

Side by Side Diff: client/site_tests/power_LoadTest/power_LoadTest.py

Issue 6800002: power_Draw/Idle/LoadTest: Support temperature sensing for x86 (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git
Patch Set: Added temp logging during each query Created 9 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « client/site_tests/power_Idle/power_Idle.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. 1 # Copyright (c) 2011 The Chromium OS 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, os, shutil, time 5 import logging, os, shutil, time
6 from autotest_lib.client.bin import utils 6 from autotest_lib.client.bin import utils
7 from autotest_lib.client.common_lib import error 7 from autotest_lib.client.common_lib import error
8 from autotest_lib.client.cros import backchannel, cros_ui, cros_ui_test 8 from autotest_lib.client.cros import backchannel, cros_ui, cros_ui_test
9 from autotest_lib.client.cros import httpd, login, power_status 9 from autotest_lib.client.cros import httpd, login, power_status
10 from autotest_lib.client.cros import flimflam_test_path 10 from autotest_lib.client.cros import flimflam_test_path
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 keyvals['v_voltage_min_design'] = \ 227 keyvals['v_voltage_min_design'] = \
228 self._power_status.battery[0].voltage_min_design 228 self._power_status.battery[0].voltage_min_design
229 keyvals['v_voltage_now'] = self._power_status.battery[0].voltage_now 229 keyvals['v_voltage_now'] = self._power_status.battery[0].voltage_now
230 230
231 keyvals.update(self._tmp_keyvals) 231 keyvals.update(self._tmp_keyvals)
232 232
233 keyvals['a_current_rate'] = keyvals['ah_charge_used'] * 60 / \ 233 keyvals['a_current_rate'] = keyvals['ah_charge_used'] * 60 / \
234 keyvals['minutes_battery_life'] 234 keyvals['minutes_battery_life']
235 keyvals['w_energy_rate'] = keyvals['wh_energy_used'] * 60 / \ 235 keyvals['w_energy_rate'] = keyvals['wh_energy_used'] * 60 / \
236 keyvals['minutes_battery_life'] 236 keyvals['minutes_battery_life']
237 keyvals['mc_min_temp'] = self._power_status.min_temp
238 keyvals['mc_max_temp'] = self._power_status.max_temp
237 239
238 self.write_perf_keyval(keyvals) 240 self.write_perf_keyval(keyvals)
239 241
240 242
241 def cleanup(self): 243 def cleanup(self):
242 # remove json file after test to stop external extension launch. 244 # remove json file after test to stop external extension launch.
243 if self._json_path: 245 if self._json_path:
244 jsonfile = os.path.join(self._json_path, 'external_extensions.json') 246 jsonfile = os.path.join(self._json_path, 'external_extensions.json')
245 if os.path.exists(jsonfile): 247 if os.path.exists(jsonfile):
246 os.system('rm -f %s' % jsonfile) 248 os.system('rm -f %s' % jsonfile)
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 # set backlight level to 40% of max 332 # set backlight level to 40% of max
331 cmd = 'backlight-tool --set_brightness %d ' % ( 333 cmd = 'backlight-tool --set_brightness %d ' % (
332 int(self._max_backlight * 0.4)) 334 int(self._max_backlight * 0.4))
333 os.system(cmd) 335 os.system(cmd)
334 336
335 # record brightness level 337 # record brightness level
336 cmd = 'backlight-tool --get_brightness' 338 cmd = 'backlight-tool --get_brightness'
337 level = int(utils.system_output(cmd).rstrip()) 339 level = int(utils.system_output(cmd).rstrip())
338 logging.info('backlight level is %d' % level) 340 logging.info('backlight level is %d' % level)
339 self._tmp_keyvals['level_backlight_current'] = level 341 self._tmp_keyvals['level_backlight_current'] = level
OLDNEW
« no previous file with comments | « client/site_tests/power_Idle/power_Idle.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698