问题
I'm trying to measure the energy usage level from my ipod when I run my application. I import the data from my device to Instruments app and the Energy usage level displays a bar graph. However, in the detail pane of Instruments the energy usage level don't show any number that indicate the level of energy used by the app in my device. Do you know how to get this energy usage level? I'm followed the steps stated in the Instruments Documentation to get the Energy Usage report from the iOS device; My iOS device is an ipod touch 3G and I'm using Xcode 3.0. Thanks!
回答1:
You have to disconnect your device first, test your app, and reconnect. In instrument, select ->File ->Import Energy diagnostic From Device
It's not accurate anyway, I wonder how to translate from energy level (0-20) to real unit.
回答2:
While you Energy Usage is selected from left hand Instruments list, from your menu select View -> Detail , or command + D for shortcut. You would then see detail view with Energy Usage Level.
Or
Move your inspection head to see Energy usage level
Also note that in your device settings -> Developer -> Energy diagnostics Logging (On/Off switch), turning this switch off would reset previous logs.
回答3:
Energy Diagnostics has other problems, namely it lacks granularity and isn't always accurate. My company wrote Powergremlin to solve those problems and, while very simple, you might find it useful.
回答4:
Finally I found a solution. I was using an ipod labeled as 3rd generation but as it didn't work I decided to try with an iPhone 3GS and it works, the energy level usage is shown in Instruments.
来源:https://stackoverflow.com/questions/8737612/energy-usage-instruments-ios