This article was first published on:Walker AI

As a game testing engineer, in addition to focusing on functional testing, we also need to pay attention to weak network, performance, compatibility, security and other special tests. Recently, the project team is specially optimizing the performance of the game client. Here, I will simply share some methods of client performance testing.

1. The client performance is insufficient

The performance test of the game contain server performance testing, performance testing and client server performance test is mainly to the server before it launched carrying capacity test, load test and stress test, the purpose is to find the performance of the server bottleneck, can ensure that the game under the concurrent of preset normal play, and whether a game can run smoothly, In addition to the support of the server, the performance of the client can not be ignored, perhaps you have heard the game players in the fierce game suddenly out of a “** off frame”, which is said that the client performance is insufficient, seriously affect the game experience.

Especially in a competitive game, without a stable output frame rate, so the game is felt only let person collapse, some students may ask, game CARDS, what is the relationship between frame rate and frame rate refers to the frame as the unit of bitmap images appear on the display of the frequency in a row, that is, on average, a second, the game update shows how many pieces of picture.

2. Reasons for performance stalling

For games, if the FPS is less than 30, the game will be inconsistent, and a high frame rate will give a smoother and more realistic display effect. Generally speaking, 30 FPS will not feel a significant lag, but if it can be increased to 60fps, the picture will be significantly more realistic, and beyond 75fps, there will be no significant improvement. If the frame rate exceeds the screen refresh rate, it wastes graphics processing power and resources, so the average mobile game locks 60 frames.

Frametime refers to the time between two frames, or simply to a single frame rendering. What the player is looking at is the time between screen refreshes, not the time between GPU renders. It can be seen from the figure that the GPU rendering time of picture B frame is longer than the display refresh interval, which means that the picture is not refreshed once. When there are no changes in the picture for many times, the picture performance of the game may be stuck.

Knowing the causes of game lag, here are some of my personal experiences as to how to provide testing data for developers to optimize game performance. Before doing game performance testing, it’s important to understand the basic metrics we need to focus on.

3. What should the test focus on

FPS Frame rate: The number of frames per second displayed by an application

CPU usage: The CPU usage of the application

Memory: How many applications are stored in system memory

GPU: GPU usage: GPU resource usage by applications

Traffic: The total amount of data transmitted through a network port per unit time

Battery: The amount of charge consumed by an application per unit of time

There are also a number of tools available to collect this data, including Emmagee, GT, Wetest, prefDog, and more. Through comparison and comparison, prefDog has made prefDog my preferred choice because the phone doesn’t require root, has complete data, is simple to use, and can produce complete performance reports that are readable.

Search for prefDog download tools, available for Windows and MAC. Download the prefDog extract package for Windows, and double-click to open the prefdog. Exe application

There are two ways to connect, one is to directly plug in the USB link, the other is to connect the wifi link. It should be noted that the power consumption test cannot be carried out in USB mode, because the usb is still charged all the time, and this value does not have much effect.

The Prefdog picks up jank (number of deadbeats in 1s) data, since high frame rates do not necessarily represent smooth or deadbeats. For example, on fps40 frames, only one frame was rendered in the first 200ms and 39 frames in the second 800ms, which can still be deadbeats even at a frame rate of 40.

Calculation method of PerfDog Jank:

If the following two conditions are met at the same time, it is considered to be a stalled jank. the current frame duration is greater than 2 times the average duration of the previous three frames. Current Frame Duration > Two movie frames (1000ms/24*2=84ms).

After running the pre-planned scene, click the pause button in the upper right corner to pop up the save box. Click “confirm” to query the report record on the Web cloud platform

Before the client performance, it is necessary to prepare high, middle and low test equipment. At the beginning of the establishment of each project, the minimum supported equipment will also be defined. In the performance test, it is necessary to ensure that the minimum equipment at the beginning of the setting can run smoothly, so as to lay a foundation for the subsequent good operation.

It should be noted that there are many models on the market at present, and some brands will have their own CPUS, so it is necessary to conduct targeted tests here. The most popular processor in the market should be the Snapdragon processor, common also huawei’s own Kirin, Mediatek, Apple and so on. For example, The Performance of Duoduo Self-move is basically good on low-end snapdragon 435 processors, but the performance of Huawei Kirin 710 and Helio P20 is much worse than that of snapdragon 665 and Snapdragon 650 processors. CPU ranking data from: (www.mydrivers.com/zhuanti/tia…

At this time, we need to test and compare the processors of different mobile phone brands, and provide data development for optimization.

Checking the performance of the client also needs to set up different scenes. Taking self-moving as an example, the game is basically divided into two scenes: inside and outside the office. Outside the office is mainly the function of each peripheral system, such as mall, pass, warehouse and so on. Station is mainly fight, this is also the performance consumption place, when I was doing the comparison and analysis will be the main information and paste to share documents, to facilitate rapid analysis of detailed data in view links, mainly involved in the recent local scenarios, according to different optimization package are the same process output client performance report, The data is saved in a shared document for the project team to view.

As a game tester, not only do you need to focus on performance data at the beginning of a release or during performance specific optimizations, but you also need to do planned performance testing during regular release iterations. For example, with each major version iteration, engine upgrade, art iteration and other major changes, performance testing becomes very important. It can prevent blind spots of performance deviation caused by these major changes, and identify problems in time to solve optimization.


PS: more dry technology, pay attention to the public, | xingzhe_ai 】, and walker to discuss together!