13

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?

Paul T.
  • 4,938
  • 7
  • 45
  • 93

3 Answers3

13

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.

Stavash
  • 14,244
  • 5
  • 52
  • 80
1

Did you enable energy logging on your iPad?

https://developer.apple.com/library/ios/recipes/Instruments_help_articles/LoggingEnergyUsageinaniOSDevice/LoggingEnergyUsageinaniOSDevice.html

paulbailey
  • 5,328
  • 22
  • 35
Chad Adams
  • 1,319
  • 1
  • 9
  • 14
1

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

nst
  • 3,862
  • 1
  • 31
  • 40
  • apple obviously removed the GAIA.framework with osd battery… do you have any updates or alternatives for doing this programmatically? :-/ – clash Oct 27 '14 at 12:34