We introduce a novel, data-driven way for predicting battery consumption of apps.
The state-of-the-art models used to blame battery consumption on apps are based on
micro-benchmark experiments. These experiments are carried out on controlled setups
where one can measure how much battery is consumed by each internal resource (CPU,
bluetooth, WiFi...). The battery blame allocated to an app is simply the sum of the
blames of the resources consumed by the app. We argue that this type of models do
not capture the way phones work "in the wild" and propose instead to train a
regression model using data collected from logs. We show that this type of learning
is correct in the sense that under some assumptions, we can recover the true
battery discharge rate of each component. We present experimental results where we
consistently do better predictions than a model trained on micro-benchmarks.