the Chromium logo

The Chromium Projects

Power testing

Description

Modern mobile computers are sold with an advertised battery life, ranging from a few to tens of hours. Nonetheless, when these devices are used on a daily basis, many users report that their actual battery life doesn’t match up with the advertised numbers. For ChromeOS devices, we wanted to try and report battery life that is as close as possible to what an average user experiences. Thus power_LoadTest was created to emulate average user behavior and measure the resultant battery life. This test is as an open source Chrome extension anyone can install and run. The power_LoadTest runs as a series of one hour long iterations until battery exhaustion. Within each iteration, a load mix known as 60/20/10/10 is run:

Running

Via cros_sdk & autotest

If you are interested in running power_LoadTest on a ChromeOS system, you will need a ChromiumOS test image that can be built by following Build your own Chromium image instruction with ./build_image --board=${BOARD} test command. After the test image is built, you can follow the Installing Chromium OS on your device instruction to install the test image to your DUT. Since running power_LoadTest requires that the device is disconnected from the wired Ethernet (including USB-Ethernet) as well as from the AC power source, it is trickier to run it compared to running other autotests if you do not have both the build machine and the DUT under a same private WiFi network connected to the Internet. If your build machine and the DUT are in the same WiFi network, you can run power_LoadTest by running the following command in scripts directory inside chroot. (Make sure you have battery fully charged with AC power source and Ethernet disconnected from the DUT before running the test.)

test_that ${DUT_ipaddr} power_LoadTest

If your build machine is not on the same private WiFi network as the DUT (applicable for most Googlers and any who have the build machine connected to a corporate network), follow the instructions below.

Via extension only

As mentioned earlier, power_LoadTest uses chrome extension to drive the various workloads. As such it can be run directly on a 'normal mode' machine once the extension is installed. To run with this method,

Interpreting Results

If you ran via cros_sdk & autotest there will be a keyvals file at power_LoadTest/results/keyval. The test will publish minutes_battery_life which we use to track platforms battery life. However that only tells part of the story. As with any other real world test, the results have other measurements that should be examined to ensure the battery life estimate is genuine. Keyvals of particular interest beyond minutes_battery_life to judge quality of test results are:

Conclusion

While the initial version of power_LoadTest seems to emulate well what users experience every day on ChromeOS devices, this test will be constantly improved. As we learn more about how users use ChromeOS devices and how experienced battery life differs from tested battery life, we will use this data to refine the test, potentially changing the load mix or the parameters of the test. Our goal is to ensure that when you purchase a device, you know - with reasonable certainty - how long that device will last in your daily use.