I think the title says Enough. For example Unity can generate you a report how much CPU/GPU power it's using or how fast it's going to drain device battery, but what about the applications developed using Cocos2d or the ones you develop directly using OpenGL? How should you profile them? In general what should you profile? or Should I simply run the application and wait for it's battery to run out?
|
On the iPhone, you can go to Settings > Developer > Energy Diagnostics and turn logging on. You can then use the Energy Diagnostics template in Instruments to analyze the data from this log. It will break it down into several kinds of events and graph it over time, correlate it with CPU and network spikes, and generally work like any other Instruments session. As far as I know (and I have looked, but not exhaustively) there is no equivalent tool for Android. There are some third-party apps that can sample battery across a long period of time to give you an idea of what the discharge curve looks like if you do choose to run your program for a long time. On shorter time scales DDMS can help you figure out some details like your general CPU usage and network usage, which you can then work on batching or reducing. But this is just general optimization help and a big step removed from detailed energy consumption data. |
|||||||
|
|
On Android you can:
I do not know about iPhone, but since it's a closed platform and only uses Xcode for development, you probably only have this only one choice. |
|||||||||||||||||
|