"Go" emmagee app Performance test Tool using tutorial

Source: Internet
Author: User

Brief introduction

Emmagee is a simple and easy-to-use Android performance monitoring gadget developed by the QA team at the Hangzhou Institute of NetEase, which is mainly used to monitor the changes in the performance status of single app CPU, memory, traffic, startup time, power, current and so on, and user can customize the frequency of configuration monitoring and real-time display of performance. And eventually generate a performance statistics file.

Implementation principle

1. Monitoring Application CPU Principle

Android system is based on the Linux kernel, so the structure of the system files and Linux, the system of the overall CPU usage information in the/proc/stat file,/proc/cpuinfo file storage CPU other information, including the CPU name, directly read. Emmagee is to pass the PID of the selected application, read the/proc/pid/stat file information and obtain the CPU information of the PID corresponding program.

2. Monitor application consumption flow

The system has stored the overall flow and for when the program's traffic statistics,/proc/net/dev and/proc/uid_stat/uid storage TCP_RCV and Tcp_send files, respectively, storage downstream traffic and upstream traffic, subtraction before and after the operation to obtain results.

3, monitoring memory implementation principle

Get the PID applied to when being tested and then follow the PID call to Android API to get the memory occupied by the currently tested application. The/proc/meminfo file records system memory information.

emmagee-2.2.apk as an example

1. Download EMMAGEE.APK installation package

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

2, installation emmagee.apk

3. Open Emmagee




4, Click the Settings button in the upper left corner, can be collected frequency, email and other related settings




5 . Go back to step 3, select the app you want to test, then click "Start Test"

6, the relevant operation of the app, after the completion of the return to the Emmagee interface, click to stop Testing

After you stop the test, Emmagee automatically generates a. csv test result file.

7, the export of documents, analysis of data and statistics

8, where is the difficulty?

Tool use does not seem difficult, where is the difficulty?

Personal feel difficult in the scene design. I do not practice much, here is a simple talk about design ideas.

Prerequisites: Ensure a clean test environment

First type: Test a relatively independent feature in the app

This is generally to ensure that other conditions are unchanged, repeat the operation of this single function, and then analyze the data.

Example 1:app correlation energy state for first start

Scenario Description: Click the app to launch the app until the app main page appears.

Test action:

1. Open Emmagee

2. Select the app, click "Start Test", and then click "Stop Test" when the main page appears.

3. Use your phone to clean up the software and clean up the "app under test".

4. Repeat steps 2

Data analysis:

In general, the 2.2 version of Emmagee will automatically generate for us CPU, memory, traffic, power, current data, but the start time is not necessarily, in practice, found that startup time is often not acquired, but do performance testing, is very concerned about the response time, can not be obtained? The author is to do so, set the acquisition frequency of the minimum value, such as 1s, so that emmagee can be based on the test report, "Time" column roughly statistics of this function time-consuming situation.

With all of this data, you can find the "mean", "peak" of all types of data based on multiple test data.

Example 2:app correlation energy state of two launches

Scenario Description: Click the app to launch the app until the app main page appears and exit the app

Test action:

1. Open Emmagee

2. Select app, click "Start Test", after the main page appears, exit the app, click "Stop Test"

3. Repeat steps 2

Note: Unlike the example, it is whether to operate on the basis of the previous operation, that is, "test start" is not the same. Fortunately, Emmagee has this "memory" function.

Data analysis:

Reference Example 1

Second: Testing a process to identify performance "bottlenecks"

Perform a complete business process operation for a business flow

Here the key to say the data analysis specific to do. The personal idea is this: according to the test-generated. csv file, plot the graph of the relevant data to see how the curve changes-smooth? Ups and downs? Or "The twists and turns"? If it is not smooth, then there may be bottlenecks in performance, and further analysis is required in that procedure.

About the step, the test results, there is a column "stack top activity name" can see the approximate operation (if you do not understand what to do?) Take a look before testing, compare to see it)

"Go" emmagee app Performance test Tool using tutorial

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.