Learn the performance test of PerfDog Android (Android) APP (1)

1. Performance standard reference instructions

People often ask, "What is the performance standard of my game or APP, and how much CPU and memory are suitable?"
Different similar apps, different similar games, and different gear models have completely different CPU and memory usage, which may not be of the same order of magnitude. It is difficult to have a unified standard.
Take memory as an example: the Android platform has no special restrictions on a single process, as long as VirtulMomory does not exceed the process address space (usually 4G), and the remaining system memory Ram is not less than LKM, the process will not OOM.
Model 1:
[Performance Baseline] OPPO Reno/Honor 9X
[Memory Consumption] Maximum PSS <= 1400MB
[Frame Rate] >= 25FPS [ Fluency] Stall Rate <= 2%
Model
2: [ Performance Baseline] Huawei
P20/VIVO X20
[Memory Consumption] Maximum PSS <= 1200MB
[Frame Rate] >= 25FPS [Fluency] Stall Rate <= 2% Play 7X 【Memory consumption】Maximum PSS<=1000MB 【Frame rate】>=18FPS 【Smoothness】Stutter rate<=10%





[CPU occupancy rate] (does not distinguish between models)
the average comprehensive CPU occupancy (90%) is less than 60%
and the single-core CPU peak occupancy (90%) is less than 90%

Reference: 2020 China Mobile Game Quality White Paper
insert image description here

2. Explanation of terms related to software performance data collection

1. Definition of FPS
: The real average number of refreshes of the game screen or application interface within 1 second, commonly known as frame rate/FPS
Avg (FPS): average frame rate (average FPS over a period of time), traditionally often referred to as FPS, the average number of screen refreshes within 1 second.
Var(FPS): Frame rate variance (FPS variance over a period of time)
Drop(FPS): Number of frame drops (average number of adjacent two FPS points per hour dropped by more than 8 frames

2. Jank
definition: the number of jams within 1s
Note: A high frame rate FPS does not reflect smoothness or no jams. For example: FPS is 50 frames, one frame is rendered in the first 200ms, and 49 frames are rendered in the last 800ms. Although the frame rate is 50, it still feels very stuck. At the same time, low frame rate FPS does not mean freeze, for example, the average FPS is 15 frames when there is no freeze. Therefore, the average frame rate FPS has no direct relationship with Caton.

One-time Jank:
①Display FrameTime> The average time spent on the first three frames is 2 times.
②Display FrameTime>Time-consuming of two movie frames (1000ms/24*2≈83.33ms).

A severe freeze of BigJank:
①Display FrameTime > The average time spent on the first three frames is 2 times.
②Display FrameTime >Three frame movie frame time-consuming (1000ms/24*3=125ms).

Remarks: The low frame rate is not a freeze. If the frame rate is only a few frames, what else is there to freeze?

3.Definition of FrameTime
: the time-consuming interval between two frames (it can also be simply considered as time-consuming for single-frame rendering).

4. Vsync
Android display system: Vsync mechanism
VSync is the abbreviation of Vertical Synchronization (vertical synchronization). In Android 4.1 (JB), the VSync mechanism has been introduced to synchronize rendering, so that AppUI and SurfaceFlinger can work according to the VSync rhythm generated by the hardware.
Vsync=16ms

5. Movie frame
Movie frame rate (18-24), generally 24 frames. Time-consuming for a single movie frame: 1000ms/24≈41.67ms. Movie frame rate is a tipping point. Below this frame rate, the human eye can basically feel the discontinuity of the picture, that is, it feels stuck.

6. Stutter (stutter rate)
definition: during the test process, the proportion of stuttering time. That is, Stutter (stutter rate) = stutter duration/total duration

Stutter calculation idea: Based on PerfDog Jank, once Jank is stuck, there will be a Jank time. There may be multiple Jank freezes during the test, that is, multiple Jank time. The total test duration is Time.

Stutter(卡顿率) = ∑Jank time / Time

Explanation: Jank is the number of stalls, and Stutter is the stall rate. The trends of Jank and Stutter are consistent, but not completely linear, because the severity of each Jank is different. At the same time, it also shows that if there is no Jank lag, the lag rate will naturally be 0

Related questions:
1. Is there any relationship between FPS frame rate and lag?
Summary: High frame rate may not be smooth.

3. Impact

Do APPs and games need to pay attention to Jank lag and lag rate? The answer is needed, and it is still important to pay attention!
APP also needs to pay attention to FPS, Jank and freeze rate. Just need to distinguish usage scenarios, such as:

1) The static page window
only needs to pay attention to the FPS, the theoretical FPS should be 0, otherwise, it means that there are redundant refreshes, which will easily cause the phone to heat up and consume power.

2) There is a scrolling animation page window.
Just pay attention to the FPS, and the FPS is at an appropriate value, and there is no need to refresh frequently.

3) Quickly slide the page window.
You need to pay attention to FPS, Jank and freeze rate. The sensitivity of mobile phone interaction comes from this, and the Android system has released the butter plan Jank. Generally, in the sliding state, the higher the frame rate, the better, and the smaller the Jank, the better.

4) Play video page window
Need to pay attention to FPS, Jank and freeze rate, video freeze directly affects users. The general frame rate of the video is 18-24 frames, Jank=0. For example, WeChat plays videos, video players, etc.

Guess you like

Origin blog.csdn.net/daxiangaifashi/article/details/116055371