CPU power analysis overview

Wattson is a software-based tool that provides trace-based analysis of CPU power and energy estimates for apps running on supported Android devices. Wattson is designed to make power testing as straightforward, scalable , and reproducible as performance testing, overcoming the significant hardware challenges traditionally associated with power measurement.

Power testing challenges

Performance analysis can be done with a standard development device, but there are significant challenges when testing power:

  • Complex hardware: Power testing requires expensive, custom-built, measurement hardware which is prone to setup and calibration errors.
  • Limited scalability: The cost and maintenance overhead of this hardware make it difficult to scale across a test lab.
  • Poor reproducibility: Power consumption is sensitive to manufacturing differences, ambient temperature, and hardware calibration, making results difficult to reproduce consistently.
  • Coarse attribution: Even with the best hardware, power attribution is often limited to the entire device or, at best, a specific power rail, making it difficult to pinpoint which software threads are responsible for energy consumption.

Wattson: Power analysis with software

Wattson solves these power analysis challenges by moving the analysis from hardware to software. Wattson is built on top of Perfetto, Android's system-wide tracing tool, to analyze CPU activity and provide high-fidelity power estimates without any external measurement equipment.

How Wattson works

Wattson leverages existing kernel tracepoints captured by Perfetto, specifically cpufreq, cpuidle, and thread scheduling events. By processing this trace data, Wattson generates detailed, time-series power estimates for each CPU core. The key benefits of this approach include:

  • Zero setup cost: Wattson requires no additional hardware or expense. If you can capture a Perfetto trace, you can use Wattson.
  • Thread-Level attribution: Developers can see precise energy consumption estimates for individual threads, enabling targeted optimization.
  • High resolution and fidelity: Wattson's estimates correlate extremely well with ground-truth hardware measurements, making it reliable for A/B testing and comparative analysis.
  • Scalability: Wattson can be integrated into automated testing and continuous integration (CI) pipelines to catch power regressions early.

Supported devices

Supported devices include the following:

  • Pixel 6, 6 Pro, and 6a
  • Pixel 9, 9 Pro, and 9 Pro XL
  • Pixel Fold
  • Pixel Watch 2 and 3

To have additional devices supported, reach out to wattson-external@google.com

What's next?