Big talk App Test 2.0 notes--memory test

Source: Internet
Author: User

  1. Before you look at the memory data, know exactly what the highest memory value is allocated for each app for the phone you're testing. View the memory of the file below the path to get the highest internal value assigned by the phone to each app.

    /system/build.prop

    Where the size of the heap allocation is dalvik.vm.heapgrowthlimit, this value means that when your app exceeds this memory value, the app's process is forced to terminate on that Android phone.

  2. ADB Shell Procrank

    Can get PID (ID number), VSS (virtual memory occupied), RSS (physical memory occupied), PSS (private memory occupied plus evenly allocated shared memory), USS (private memory)

    The main view of USS is that if the maximum memory value allocated by the application is exceeded, the app's flashback will occur. If the USS is not available, then see PSS.

  3. adb shell Dumpsys meminfo <package name>

  4. The purpose of our data acquisition is to see whether the memory we are applying is a trend that is rising blindly. Normally, each interface of the jump or scene of the switch, the memory value will be passive or active recycling, but if there is a leak there will be a sustained rise, although it may eventually be partially recycled.

  5. Memory monitor to see the risk

    1) Real-time view of the app's internal distribution

    2) quickly determine if the app is stalling due to GC (garbage collection) operations

    3) quickly determine if the app crashes because it's out of memory

  6. When a memory drop occurs within a short time, we can assume that a GC operation has occurred.

  7. Memory Monitor can help us find the problem:

    1) scene with memory jitter found

    2) Discover scenarios where large memory objects are allocated

    3) Discover the growing scene inside

    4) Determine if the lag problem is due to a GC operation

  8. Mat Analyzing memory leaks

    Mat is a Java heaper parser that can be used to analyze memory leaks and reduce internal consumption. Analyze the memory used by/DEV/ASHMEM/DALVIK-HEAP (deleted) in the process Showmap.

    The combination of Android studio and Mat reduces the scope of the memory problem and the code that ultimately locates the specific location.


Big talk App Test 2.0 notes--memory test

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.