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

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

Issue 6627029: Refactor site_power_status, power_strip modules into client/cros. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 9 years, 9 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
OLDNEW
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 # Copyright (c) 2010 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, time 5 import logging, time
6 from autotest_lib.client.bin import test 6 from autotest_lib.client.bin import test
7 from autotest_lib.client.common_lib import site_power_status 7 from autotest_lib.client.cros import power_status
8 8
9 9
10 class power_StatsCPUFreq(test.test): 10 class power_StatsCPUFreq(test.test):
11 version = 1 11 version = 1
12 12
13 13
14 def run_once(self, test_time=60): 14 def run_once(self, test_time=60):
15 cpufreq_stats = site_power_status.CPUFreqStats() 15 cpufreq_stats = power_status.CPUFreqStats()
16 16
17 # log CPU frequency stats since boot 17 # log CPU frequency stats since boot
18 current_stats = cpufreq_stats.refresh(incremental=False) 18 current_stats = cpufreq_stats.refresh(incremental=False)
19 logging.info('CPUFreq stats since boot:\n %s', current_stats) 19 logging.info('CPUFreq stats since boot:\n %s', current_stats)
20 20
21 # sleep for some time to allow the system to go into idle state 21 # sleep for some time to allow the system to go into idle state
22 time.sleep(test_time) 22 time.sleep(test_time)
23 23
24 # get updated CPU frequency stats 24 # get updated CPU frequency stats
25 current_stats = cpufreq_stats.refresh() 25 current_stats = cpufreq_stats.refresh()
26 logging.info('CPUFreq stats in the last %d seconds :\n %s', 26 logging.info('CPUFreq stats in the last %d seconds :\n %s',
27 test_time, current_stats) 27 test_time, current_stats)
28 28
OLDNEW
« no previous file with comments | « client/site_tests/power_LoadTest/power_LoadTest.py ('k') | client/site_tests/power_StatsCPUIdle/power_StatsCPUIdle.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698