Android Performance Testing Methods

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.