You can use the following methods to analyze the efficiency bottleneck of software performance tests on the Android platform. Currently, Google has introduced a variety of test kits in the Android software development process, such as the unit test project, debugging class, And the dev tools of the simulator can directly reflect the execution performance.
1. Dev tools on the simulator can activate the screen to display the current FPS and CPU usage, which can help us test the performance of some 3D graphic interfaces.
2. network applications are generally involved, and the efficiency has a lot to do with the speed of the network. Here, you need to debug the program multiple times before you can actually understand it.
3. For the efficiency of logical Algorithm Execution, we use the most common android computing execution time to view:
Long start = system. currenttimemillis ();
// Do something
Long Duration = system. currenttimemillis ()-start;
The final duration saves the actual number of milliseconds required to process this method. Similar to gettickcount on Win32, high-precision performance counters and low-level timers are provided on Win 32 and Symbian. the Java layer on Dalvik VM is suitable for general applications.
4. GC efficiency tracking. If the application you run is relatively simple, you can view the memory release status of the logcat VM in ddms, and simulate where data can be cached or the algorithm can be improved.
5. the Android platform provides a wide range of multi-task synchronization methods for thread usage and synchronization. However, there are not many advanced applications such as spin locks in depth, however, for services and appwidgets, their actual products should be processed in multiple threads to release the CPU time. You can view the threads and heap memory in ddms.