Testing CPU and Memory usage of Mobile Apps
When an application is developed to run on a particular software platform such as J2ME, Android etc. it can in theory be installed and run on any device that supports that platform. However for any given platform, the supported devices could have a very wide range of capabilities in terms of CPU speed and available memory. For example a J2ME application can be theoretically run on a low end feature phone such as the Nokia 112 with a sub 250 MHz CPU and 16 MB of internal RAM as well as a higher end Nokia ASHA 300 series phone with 1 GHZ+ CPU and 128 MB internal RAM. However if the app has been designed to require a certain minimum CPU power and memory, it will in practice, fail on the Nokia 112 phone. If your application makes extensive use of arithmetic and logic operations such as those involved in streaming and decompression of audio and video and in rich animations, or it lets the user view and manipulate large sets of information or images, you should specify minimum CPU and memory requirements for the application in exactly the same way it is done for desktop applications.
To determine these requirements objectively, you can evaluate each feature in your application from the point of view of its CPU and memory consumption while running it, and accordingly arrive at a lower bound for the entire application from this analysis.
Here’s a list of the CPU and memory profiling tools you can use for some of the common smart phone platforms:
iOS: The XCode development environment comes with a rich suite of performance measurement, analysis and monitoring tools such as Instruments, Shark, Activity Monitor and BigTop that will together provide you everything you need to measure and monitor performance at the finest grain in memory, CPU, network usage and much more.
Android: Android Developer Tools (ADT) comes with the Profiler tool which can help you in tracking memory performance. You can also directly use the very powerful HPROF tool to look at memory usage on Android (hprof output can be generated and analyzed in a variety of different ways. See Android developer documentation for details). Several third party apps are also available on the Play Store to help measure and analyze CPU, memory and battery performance of your app.
Comments
Post a Comment