Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone battery drain issue

I think my question will be useful for others. I have battery drain issue and want to find out where it is.

I use xcode instruments: Enter profile enter image description here then Energy Diagnostics, but I see nothing in energy usage section. enter image description here

How can I enable information in Energy Usage section?

like image 320
Paul T. Avatar asked Jan 04 '13 04:01

Paul T.


2 Answers

Energy profiling is a bit more tricky. You need to:

  1. Enable energy logging via the device's developer settings
  2. Disconnect device from ANY power source (this of course means that you can't see the stats live in instruments)
  3. Start logging via the device developer settings
  4. Perform the actions you wish to profile
  5. Stop logging via the device developer settings
  6. Connect device to Mac, open instruments and select File->Import logged data from device

Now you'll see the energy usage statistics.

like image 180
Stavash Avatar answered Oct 01 '22 09:10

Stavash


You can also try to log the power consumption programatically.

Several ways of doing this can be found in the BatteryChart project: https://github.com/nst/BatteryChart

like image 32
nst Avatar answered Oct 01 '22 10:10

nst