History log of /external/autotest/client/cros/power_rapl.py
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
0e53e639598c2e660a18d183370e1bfaa9dd0c07 08-Jun-2012 Todd Broch <tbroch@chromium.org> autotest: power_Consumption: Add RAPL measurements.

RAPL measurements facilitated by:
https://gerrit.chromium.org/gerrit/24502
https://gerrit.chromium.org/gerrit/24558
https://gerrit.chromium.org/gerrit/24627

This CL adds check, has_rapl_support(), and if true then adds RAPL
measurements to the power logger's measurements instances in the test.

BUG=chromium-os:31503
TEST=run power_Consumption, see results for RAPL. For example:
speaker_test_spk_pkg_duration{perf}=30.3810629845
speaker_test_spk_pkg_power_cnt{perf}=29
speaker_test_spk_pkg_power_max{perf}=3.03294596257
speaker_test_spk_pkg_power_min{perf}=2.80171829904
speaker_test_spk_pkg_power_std{perf}=0.0458808322527
speaker_test_spk_pkg_power{perf}=2.83150531631
speaker_test_spk_pp0_duration{perf}=30.3810629845
speaker_test_spk_pp0_power_cnt{perf}=29
speaker_test_spk_pp0_power_max{perf}=0.369391644656
speaker_test_spk_pp0_power_min{perf}=0.145280589451
speaker_test_spk_pp0_power_std{perf}=0.0437684787244
speaker_test_spk_pp0_power{perf}=0.172127189172
speaker_test_spk_pp1_duration{perf}=30.3810629845
speaker_test_spk_pp1_power_cnt{perf}=29
speaker_test_spk_pp1_power_max{perf}=0.0457786827333
speaker_test_spk_pp1_power_min{perf}=0.0456316429262
speaker_test_spk_pp1_power_std{perf}=2.8166938314e-05
speaker_test_spk_pp1_power{perf}=0.0456792613554
speaker_test_spk_system_duration{perf}=30.3810629845
speaker_test_spk_system_power_cnt{perf}=29
speaker_test_spk_system_power_max{perf}=8.38344
speaker_test_spk_system_power_min{perf}=7.990433
speaker_test_spk_system_power_std{perf}=0.0919470867921
speaker_test_spk_system_power{perf}=8.09486724138

Change-Id: I1a48f7166cfa7f237c80bb871b725b494423661b
Reviewed-on: https://gerrit.chromium.org/gerrit/24887
Commit-Ready: Todd Broch <tbroch@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>
Tested-by: Todd Broch <tbroch@chromium.org>
/external/autotest/client/cros/power_rapl.py
585f5733b98a2042cd7e3af957e10ee0c2d44632 05-Jun-2012 Todd Broch <tbroch@chromium.org> autotest: power: Add RAPL measurement facility.

Intel processors (Sandybridge and beyond) provide access to a set of registers
via the MSR interface to control and measure energy/power consumption. These
RAPL ( Running Average Power Limit ) registers can be queried and written to
change and evaluate power consumption on the CPU.

See 'Intel 64 and IA-32 Architectures Software Developer's Manual Volume 3'
(Section 14.7) for complete details.

Additionally, as a first order check the CL adds crude max/min checks
of these values to power_x86Settings. As the test basically operates
at 'idle' the values are expected to be much lower than TDP but
greater than zero.

BUG=chromium-os:31503
TEST=run power_x86Settings on Sandybridge based system and compare
results with previous measurements

./run_remote_tests.sh --remote=<remote> power_x86Settings

Results look like,
$ grep -i rapl /tmp/run_remote_tests.latest/power_x86Settings/power_x86Settings/debug/power_x86Settings.DEBUG
06/05 13:45:02 INFO |power_x86S:0116| SUBTEST = rapl
06/05 13:45:02 DEBUG|power_rapl:0112| RAPL pp1 joules_per_lsb = 1.526e-05
06/05 13:45:02 DEBUG|power_rapl:0112| RAPL pp0 joules_per_lsb = 1.526e-05
06/05 13:45:02 DEBUG|power_rapl:0112| RAPL pkg joules_per_lsb = 1.526e-05
06/05 13:45:04 INFO |power_x86S:0359| RAPL pp1 power during 2secs was: 0.046W
06/05 13:45:04 INFO |power_x86S:0359| RAPL pp0 power during 2secs was: 0.145W
06/05 13:45:04 INFO |power_x86S:0359| RAPL pkg power during 2secs was: 2.534W

Change-Id: I2e51cb0b177e09ebd55dc821ef66200355fccc8a
Reviewed-on: https://gerrit.chromium.org/gerrit/24502
Commit-Ready: Todd Broch <tbroch@chromium.org>
Tested-by: Todd Broch <tbroch@chromium.org>
Reviewed-by: Mark Koudritsky <kamrik@chromium.org>
/external/autotest/client/cros/power_rapl.py