App Performance (Android phone): Memory and CPU

Source: Internet
Author: User

1 App Performance test

The frame rate size affects the smoothness of the page.

Different models of testing, there will be gaps, poor configuration of the mobile phone performance test will be poor, do not need a horizontal comparison.

The same phone, the new and old version of the app for comparison testing, choose to configure a less than the model for testing.

1.1 Memory and CPU
    • Memory leak: Not released after application is exhausted, wasted
    • Memory overflow: Excessive memory consumption, unable to limit, causing memory crash

They can cause the program to lag or even be unusable.

    • CPU: High consumption
1.1.1 Execution

Memory jitter: A bit high, low

Memory continues to rise: Open the page after several times, whether to release memory in a timely manner, releasing the presence of memory continues to rise, cannot stop the situation

High CPU consumption: Check the CPU's mean and trend, 20% below acceptable

1.1.2 Strategy

    • Does the new feature cause the problem above
    • Whether the backbone process is causing the above problem: the video app looks at the video scene, and the app reads the book and sees the message in a row;
1.1.3 Tool Emmagee

Detects CPU usage and overall CPU usage for the current time tested application

: https://github.com/NetEase/Emmagee/releases

1.1.3.1 use

After installing the Emmagee on the phone, the phone opens the Emmagee, selects the corresponding application, carries on the operation, emmagee the suspension box to display the real-time CPU, the memory data, after the operation completes, the click Stops, Emmagee will save the data to the mobile phone memory card, the path will give.

Use Excel on your computer to open the file.

1.1.3.2 Settings

Go to Emmagee, click Settings in the upper right corner:

Stop listening after exiting: The background operation is still listening, only after exiting to stop listening.

Statistics Heap Data: In the location of the role, tick will have a heap size of data.

1.1.3.3 Getting permissions

1.1.3.4 Results

PSS: Application actually consumes memory

CPU Results (multicore)

1.1.4 Example 1

Memory BUG: After multiple turn-off, memory keeps rising and memory is not freed

Memory bug: jitter, risk of memory leaks

App Performance (Android phone): Memory and CPU

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.