问题
I have followed the Apple steps to get my app energy usage level from my device using Energy Diagnostics Instruments (https://developer.apple.com/library/ios/#documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/Built-InInstruments/Built-InInstruments.html#//apple_ref/doc/uid/TP40004652-CH6-SW63).
I have tried with my own app and with several apps from the AppStore and I always get all the info expected (including time flags) except the Energy Usage Info. Simply, the Energy Usage Bar doesn't show any graph (it does show the running time) and the Energy Consumption table (detail view) is always blank.
I am using an iPodTouch4 and XCode 4.2. What could be the problem? Do I need to do anything apart from Apple steps?
Thanks in advance.
回答1:
I'm very new to the iOS Energy Diagnostics myself, so I may be wrong here...
The only time I've gotten an empty Energy Usage is when the device is connected to power. Unplug the device and have it log for a while, then connect it to Instruments and reimport your logs.
回答2:
I've found Energy Diagnostics to have lackluster accuracy, so my company made Powergremlin which is simple, but much more accurate in our tests. It's open source, so just download & build it in Xcode.
回答3:
You have to do view snap track to fit to see the energy usage off the app. Then go to where the flag states, on battery and you will bars in the energy using statistics screen.
Now I'm also new to this and therefore do not really now how to interpret the data. If anyone could elaborate about his the answer would be better :)
来源:https://stackoverflow.com/questions/9646238/instruments-doesnt-show-energy-usage-level-it-is-empty