Ask / Submit
12

How to test an app's battery consumption [answered]

asked 2014-04-25 18:02:11 +0300

BlueMagma gravatar image

Hi,

I'm a developer, I just developped a game clone for sailfish, because the original android app is a battery ogre.

Now I want to test the batterie consumtpion, the CPU uses.... of my app before I release it.

How can I do that ?

edit retag flag offensive reopen delete

The question has been closed for the following reason "the question is answered, an answer was accepted" by simo
close date 2015-02-26 13:51:10.931144

Comments

can I ask which game you have cloned? :)

Bobsikus ( 2015-02-26 07:40:42 +0300 )edit

4 Answers

Sort by » oldest newest most voted
4

answered 2014-04-25 22:14:39 +0300

vasavr gravatar image

You can test battery consumption e.g. with Hunger Meter:

https://openrepos.net/content/miska/hunger-meter

Lighthouse may also be useful:

https://openrepos.net/content/almindor/lighthouse

Many others around too.

I dont think theres any completely automated way of seeing a single app's battery consumption.

edit flag offensive delete publish link more

Comments

This project should help you but don't know the level of development by Jolla/SailfishOS https://together.jolla.com/question/14126/optimize-sailfish-with-mageec-project-which-profiles-and-generates-energy-efficient-code/

redge73 ( 2014-04-25 23:53:24 +0300 )edit

Thank you, this are useful app

BlueMagma ( 2014-04-26 00:18:11 +0300 )edit
2

answered 2015-02-25 17:33:02 +0300

System Monitor

https://openrepos.net/content/basil/system-monitor

edit flag offensive delete publish link more
1

answered 2015-02-25 23:54:04 +0300

penpen gravatar image

There is also powertop command that you can run in Terminal app: pkcon install powertop

edit flag offensive delete publish link more
0

answered 2015-02-25 10:35:20 +0300

lakutalo gravatar image

updated 2015-02-25 23:58:00 +0300

Alternative method: Measurement of electric current.

You get most accurate results if using a laboratory power supply and a capacitor as a fake battery, since software-side energy monitoring always measures also intrinsic consumption by the app itself.

By sampling the current at different events you are able to directly quantify energy consumption. An example of a measurement like this is described here.

But beware that warranty could be voided, as you would do that on your own risk.

ps.: To avoid any risk of damage: If you had access to a high voltage laboratory power supply you could also sample current from there, using a standard charger as supply for the phone. Still you need the capacitor to simulate the battery. Of course, part of the current may be consumed by the charger but at least you could sample relatively to idle current.

edit flag offensive delete publish link more

Question tools

Follow
4 followers

Stats

Asked: 2014-04-25 18:02:11 +0300

Seen: 888 times

Last updated: Feb 25 '15