Performance test method and device for application program

By detecting and subdividing multiple memory statistics of the application, the problem of inaccurate memory analysis in the existing technology is solved, and the automated detailed analysis of memory allocation is realized, and the performance testing efficiency is improved.

CN119862104APending Publication Date: 2025-04-22TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311340411.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-17
Publication Date
2025-04-22

AI Technical Summary

Technical Problem

During the performance acceptance of program, the analysis of excessive memory or abnormal growth in the prior art is not accurate enough, resulting in unclear optimization direction and low performance testing efficiency.

Method used

By obtaining multiple memory statistics, performing memory detection on multiple memory statistics of the application to be tested, multiple current memory statistics values ​​are obtained, and the test results are determined based on these values.

Benefits of technology

It further subdivides the memory values ​​of different memory statistics dimensions, can automatically analyze memory allocation, and improve the performance testing efficiency of the application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119862104A_ABST
    Figure CN119862104A_ABST
Patent Text Reader

Abstract

The invention discloses a performance testing method and device for an application program, and the method comprises the steps: obtaining a plurality of memory statistical items, enabling the memory statistical items to be obtained through carrying out the dimension subdivision of preset memory statistical dimensions, and enabling each memory statistical dimension to be subdivided into at least two memory statistical items; performing memory detection on the plurality of memory statistical items of the to-be-tested application program to obtain a plurality of current memory statistical values corresponding to the plurality of memory statistical items; and determining a test result of the to-be-tested application program based on the plurality of current memory statistical values. According to the method and the device, the memory values counted by different memory statistical dimensions can be further subdivided and counted to obtain the statistical values of the plurality of memory statistical items under the memory statistical dimensions, and then program testing is performed according to the statistical values of the plurality of memory statistical items under the memory statistical dimensions, so that automatic detailed analysis of memory allocation can be realized, and the memory allocation efficiency is improved. The performance testing efficiency of the application program can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of program testing technology, and in particular to a performance testing method and device for an application program. Background Art

[0002] During the program performance acceptance, the perfdog tool will be used to collect the overall memory, and the footprint indicator will be used to measure the overall program memory; you can check whether the current program memory is too high; at this time, the Memreport tool provided by the engine will be used for analysis; if some memory anomalies are found, trial optimization will be performed; after the optimization is implemented, it will be merged into the program version; then the next round of program performance acceptance will be entered until the performance meets the standard. The disadvantage of the current technology is that during the program performance acceptance, the excessive or abnormal growth of memory is based on the footprint value of the operating system, but the memory data statistics in Memreport are based on the estimated value of the engine, not the footprint value. It is generally believed that if a resource has a large statistical value on Memreport, its footprint value in memory will also have a large trend. This kind of analysis based on trends will be very inaccurate. Some resources may have a relatively large value estimated by the engine, but the proportion in the footprint is very small, which will seriously affect the optimization analysis direction; continuous attempts are needed to explore the optimization direction; the existing technical solutions do not have a memory usage segmentation, and cannot realize the automatic and detailed analysis of memory allocation, resulting in low efficiency in application performance testing.

[0003] That is, the performance testing efficiency of the application program in the prior art is low. Summary of the invention

[0004] The embodiments of the present application provide a method and device for performance testing of an application program, which can improve the performance testing efficiency of the application program.

[0005] In a first aspect, the performance testing method of an application provided by the present application includes:

[0006] Acquire multiple memory statistics items, wherein the memory statistics items are obtained by subdividing a preset memory statistics dimension, and each memory statistics dimension is subdivided to obtain at least two memory statistics items;

[0007] Perform memory detection on the multiple memory statistics items of the application to be tested, and obtain multiple current memory statistics values ​​corresponding to the multiple memory statistics items;

[0008] A test result of the application to be tested is determined based on the multiple current memory statistics.

[0009] In an optional embodiment, the preset memory statistical dimension includes at least one of a system statistical dimension at a system level, an engine statistical dimension at an engine level, and a virtual statistical dimension at a virtual machine level.

[0010] In an optional embodiment, the preset memory statistical dimension includes a system statistical dimension at the system level and an engine statistical dimension at the engine level, and the memory detection is performed on the multiple memory statistical items of the application to be tested to obtain multiple current memory statistical values ​​corresponding to the multiple memory statistical items, including:

[0011] Constructing statistical item statistical tags corresponding to each of the memory statistical items, wherein the codes corresponding to the statistical item statistical tags are used to count the statistical values ​​of the memory statistical items;

[0012] Inserting a plurality of statistical item statistical tags into the application to be tested to obtain a target application;

[0013] The statistical values ​​returned by the statistical tags of multiple statistical items when the target application is running are aggregated to obtain multiple current memory statistical values ​​corresponding to the multiple memory statistical items.

[0014] In an optional embodiment, the aggregating statistical values ​​returned by statistical tags of multiple statistical items when the target application is running to obtain multiple current memory statistical values ​​corresponding to the multiple memory statistical items includes:

[0015] Obtain statistical values ​​returned by multiple statistical tags of statistical items when the target application is running;

[0016] Put the statistical values ​​of the memory statistical items under the system statistical dimension into the system memory statistical file corresponding to the system statistical dimension;

[0017] Put the statistical values ​​of the memory statistics items under the engine statistics dimension into the engine memory statistics file corresponding to the engine statistics dimension;

[0018] The statistical values ​​of the system memory statistical file and the engine memory statistical file are aggregated to obtain a plurality of current memory statistical values ​​corresponding to the plurality of memory statistical items.

[0019] In an optional embodiment, the preset memory statistical dimension includes a virtual statistical dimension at the virtual machine level, and the memory detection is performed on the multiple memory statistical items of the application to be tested to obtain multiple current memory statistical values ​​corresponding to the multiple memory statistical items, including:

[0020] Setting the running state of the target application to debug mode;

[0021] Running the target application into a target test scenario;

[0022] Start the screenshot command to get a screenshot of the current memory status;

[0023] The frame capture is parsed to obtain a plurality of current memory statistical values ​​corresponding to the plurality of memory statistical items of the virtual statistical dimension.

[0024] In an optional embodiment, determining the test result of the application to be tested based on the multiple current memory statistics includes:

[0025] Acquire multiple historical memory statistical values ​​obtained by performing memory detection on multiple memory statistical items of historical versions of the application to be tested;

[0026] A test result of the application to be tested is determined based on a difference between the plurality of historical memory statistical values ​​and the plurality of current memory statistical values.

[0027] In a second aspect, the application program performance testing device provided by the present application includes:

[0028] An acquisition module, used for acquiring a plurality of memory statistics items, wherein the memory statistics items are obtained by subdividing a preset memory statistics dimension, and each memory statistics dimension is subdivided to obtain at least two memory statistics items;

[0029] A memory detection module, used for performing memory detection on a plurality of memory statistics items of the application to be tested, and obtaining a plurality of current memory statistics values ​​corresponding to the plurality of memory statistics items;

[0030] A determination module is used to determine a test result of the application to be tested based on the multiple current memory statistics.

[0031] In an optional embodiment, the preset memory statistical dimension includes at least one of a system statistical dimension at a system level, an engine statistical dimension at an engine level, and a virtual statistical dimension at a virtual machine level.

[0032] In an optional embodiment, the preset memory statistical dimension includes a system statistical dimension at the system level and an engine statistical dimension at the engine level, and the memory detection module is used to:

[0033] Constructing statistical item statistical tags corresponding to each of the memory statistical items, wherein the codes corresponding to the statistical item statistical tags are used to count the statistical values ​​of the memory statistical items;

[0034] Inserting a plurality of statistical item statistical tags into the application to be tested to obtain a target application;

[0035] The statistical values ​​returned by the statistical tags of multiple statistical items when the target application is running are aggregated to obtain multiple current memory statistical values ​​corresponding to the multiple memory statistical items.

[0036] In an optional embodiment, the memory detection module is used to:

[0037] Obtain statistical values ​​returned by multiple statistical tags of statistical items when the target application is running;

[0038] Put the statistical values ​​of the memory statistical items under the system statistical dimension into the system memory statistical file corresponding to the system statistical dimension;

[0039] Put the statistical values ​​of the memory statistics items under the engine statistics dimension into the engine memory statistics file corresponding to the engine statistics dimension;

[0040] The statistical values ​​of the system memory statistical file and the engine memory statistical file are aggregated to obtain a plurality of current memory statistical values ​​corresponding to the plurality of memory statistical items.

[0041] In an optional embodiment, the preset memory statistical dimension includes a virtual statistical dimension at the virtual machine level, and the memory detection module is used to:

[0042] Setting the running state of the target application to debug mode;

[0043] Running the target application into a target test scenario;

[0044] Start the screenshot command to get a screenshot of the current memory status;

[0045] The frame capture is parsed to obtain a plurality of current memory statistical values ​​corresponding to the plurality of memory statistical items of the virtual statistical dimension.

[0046] In an optional embodiment, the determining module is used to:

[0047] Acquire multiple historical memory statistical values ​​obtained by performing memory detection on multiple memory statistical items of historical versions of the application to be tested;

[0048] A test result of the application to be tested is determined based on a difference between the plurality of historical memory statistical values ​​and the plurality of current memory statistical values.

[0049] In a third aspect, the electronic device provided in the present application includes a memory and a processor, wherein the memory stores a computer program, and the processor is used to run the computer program in the memory to implement the steps in the performance testing method of the application provided in the present application.

[0050] In a fourth aspect, the computer-readable storage medium provided in the present application stores a plurality of instructions, which are suitable for loading by a processor to implement the steps in the performance testing method of the application provided in the present application.

[0051] In a fifth aspect, the computer program product provided in the present application includes a computer program or instructions, which, when executed by a processor, implement the steps in the performance testing method of the application provided in the present application.

[0052] In the present application, compared with the related art, after first obtaining at least two memory statistical items by subdividing the memory statistical dimension, memory detection is performed on multiple memory statistical items of the application to be tested to obtain multiple current memory statistical values ​​corresponding to the multiple memory statistical items, and then the test result of the application to be tested is determined based on the multiple current memory statistical values. The memory values ​​counted by different memory statistical dimensions can be further subdivided and counted to obtain the statistical values ​​of multiple memory statistical items under the memory statistical dimension, and then the program is tested according to the statistical values ​​of the multiple memory statistical items under the memory statistical dimension, which can realize automatic and detailed analysis of memory allocation and improve the performance testing efficiency of the application. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0054] Figure 1 It is a schematic diagram of a scenario of a performance testing system for an application program provided in an embodiment of the present application;

[0055] Figure 2 It is a flow chart of a performance testing method for an application program provided in an embodiment of the present application;

[0056] Figure 3 It is a flow chart of performing memory detection on multiple memory statistical items of an application to be tested and obtaining multiple current memory statistical values ​​corresponding to the multiple memory statistical items in a performance testing method for an application provided in an embodiment of the present application;

[0057] Figure 4 It is a schematic diagram of a label macro definition of a statistical item statistical label in a performance testing method for an application program provided in an embodiment of the present application;

[0058] Figure 5 It is a schematic diagram of enabling tag statistics in the performance testing method of an application provided in an embodiment of the present application;

[0059] Figure 6 It is a schematic diagram of inserting statistical item statistical tags into the application to be tested in the performance testing method of the application provided in the embodiment of the present application;

[0060] Figure 7 It is a schematic diagram of inserting sub-item labels split from UI statistical items into an application to be tested in the performance testing method for an application provided in an embodiment of the present application;

[0061] Figure 8 It is a schematic diagram of statistical values ​​of multiple memory statistical items stored in an LLMPlatform file in a performance testing method for an application provided in an embodiment of the present application;

[0062] Fig. 9 It is a schematic diagram of statistical values ​​of multiple memory statistical items stored in an LLMFULL file in a performance testing method for an application program provided in an embodiment of the present application;

[0063] Fig.10 It is another flow chart of performing memory detection on multiple memory statistical items of an application to be tested and obtaining multiple current memory statistical values ​​corresponding to the multiple memory statistical items in the performance testing method of an application provided in an embodiment of the present application;

[0064] Fig.11 is a schematic diagram of a frame capture in a performance testing method for an application provided in an embodiment of the present application;

[0065] Fig.12 It is a flowchart of another embodiment of the performance testing method of an application provided in an embodiment of the present application;

[0066] Fig.13 It is a schematic diagram of another embodiment of the performance testing method of an application provided by an embodiment of the present application, for obtaining statistical values ​​returned by statistical tags of multiple statistical items when a target application is running;

[0067] Fig.14 It is a schematic diagram of multiple memory statistics items summarized in the performance testing method of an application provided in an embodiment of the present application;

[0068] Fig.15 is a schematic diagram of the structure of a performance testing device for an application program provided in an embodiment of the present application;

[0069] Fig.16 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0070] It should be noted that the principles of the present application are illustrated by implementing them in an appropriate computing environment. The following description is based on the illustrated specific embodiments of the present application and should not be considered as limiting other specific embodiments of the present application that are not described in detail herein.

[0071] In the following description of the present application, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0072] In the following description of the present application, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.

[0073] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0074] In order to improve the efficiency of performance testing of an application, the embodiments of the present application provide a performance testing method of an application, a performance testing device of an application, an electronic device, a computer-readable storage medium, and a computer program product. The performance testing method of an application can be performed by the performance testing device of the application, or by an electronic device integrated with the performance testing device of the application.

[0075] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0076] Please refer to Figure 1 ,This application also provides a performance testing system for an application program, such as Figure 1As shown, the performance test system of the application includes an electronic device 100, and the performance test device of the application provided by the present application is integrated in the electronic device 100. For example, the electronic device 100 can obtain multiple memory statistics items, wherein the memory statistics items are obtained by subdividing the preset memory statistics dimension, and each memory statistics dimension is subdivided to obtain at least two memory statistics items; perform memory detection on the multiple memory statistics items of the application to be tested, and obtain multiple current memory statistics values ​​corresponding to the multiple memory statistics items; determine the test result of the application to be tested based on the multiple current memory statistics values.

[0077] Among them, the electronic device 100 can be any device equipped with a processor and has processing capabilities, such as mobile electronic devices with processors such as smart phones, tablet computers, PDAs, laptops, smart speakers, or fixed electronic devices with processors such as desktop computers, televisions, servers, industrial equipment, etc.

[0078] In addition, if Figure 1 As shown, the performance testing system of the application may also include a memory 200 for storing original data, intermediate data and result data in the audio processing process. For example, the electronic device 100 obtains multiple memory statistical items (original data) and performs memory detection on multiple memory statistical items of the application to be tested, and obtains multiple current memory statistical values ​​(intermediate data) corresponding to the multiple memory statistical items, and stores the test results (result data) of the application to be tested determined based on the multiple current memory statistical values ​​in the memory 200.

[0079] In the embodiment of the present application, the memory 200 can be a cloud storage. Cloud storage is a new concept extended and developed from the concept of cloud computing. A distributed cloud storage system (hereinafter referred to as the storage system) refers to a storage system that uses cluster applications, grid technology, and distributed storage file systems to bring together a large number of different types of storage devices (storage devices are also called storage nodes) in the network through application software or application interfaces to work together and provide external data storage and business access functions.

[0080] At present, the storage method of the storage system is: create a logical volume, and when creating a logical volume, allocate physical storage space for each logical volume. The physical storage space may be composed of disks of a storage device or several storage devices. The client stores data on a logical volume, that is, stores the data on the file system. The file system divides the data into many parts, each of which is an object. The object contains not only data but also additional information such as data identification (ID entity, ID). The file system writes each object into the physical storage space of the logical volume, and the file system records the storage location information of each object, so that when the client requests to access the data, the file system can allow the client to access the data according to the storage location information of each object.

[0081] The process of the storage system allocating physical storage space to a logical volume is as follows: based on the estimated capacity of the objects stored in the logical volume (this estimate often has a large margin relative to the actual capacity of the objects to be stored) and the grouping of the Redundant Array of Independent Disks (RAID), the physical storage space is divided into stripes in advance. A logical volume can be understood as a stripe, thereby allocating physical storage space to the logical volume.

[0082] It should be noted that Figure 1 The scenario diagram of the performance testing system of the application shown is merely an example. The performance testing system and scenario of the application described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided in the embodiment of the present application. A person of ordinary skill in the art can appreciate that with the evolution of the performance testing system of the application and the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is equally applicable to similar technical problems.

[0083] It should be noted that the serial numbers of the following embodiments are not intended to limit the preferred order of the embodiments.

[0084] Please refer to Figure 2 , Figure 2 is a flow chart of a performance testing method for an application program provided in an embodiment of the present application, such as Figure 2 As shown, the process of the performance testing method of the application provided by this application is as follows:

[0085] 201. Get multiple memory statistics items.

[0086] The memory statistics items are obtained by subdividing the preset memory statistics dimensions, and each memory statistics dimension is subdivided into at least two memory statistics items.

[0087] In an embodiment of the present application, the preset memory statistical dimension may include at least one of a system statistical dimension at the system level, an engine statistical dimension at the engine level, and a virtual statistical dimension at the virtual machine level. The system statistical dimension at the system level is the overall memory counted from the operating system level, and the statistical items of the engine statistical dimension at the engine level are statistical items counted from the engine level. For example, the preset memory statistical dimension may include a system statistical dimension at the system level, an engine statistical dimension at the engine level, and a virtual statistical dimension at the virtual machine level. Among them, the engine statistical dimension at the engine level is represented by llmplatform, the engine statistical dimension at the engine level is represented by llmfull, and the virtual statistical dimension is represented by vmtracker.

[0088] The engine may be a UE (Unreal Engine) engine or a Unity engine.

[0089] UE engine is currently the world's most well-known and widely licensed top game engine. The game engine is a complex system composed of multiple subsystems. It covers almost all important links in the game development process and is the core of the game development process. Since its official birth in 1998, after continuous development, Unreal Engine has become the game engine with the widest application range, the highest overall application degree, and the highest next-generation graphics standards in the entire gaming industry. UE4 is a 3A-level next-generation game engine developed by Epic Games in the United States.

[0090] The Unity engine is a cross-platform 2D / 3D game engine developed by Unity Technologies, also known as U3D, which was born in 2005. It can be used to develop stand-alone games for Windows, MacOS and Linux platforms, video games for game console platforms such as PlayStation, XBox, Wii, 3DS, or games for mobile devices such as iOS and Android. The game platforms supported by Unity also extend to the HTML5 web platform based on WebGL technology, as well as new generation multimedia platforms such as tvOS, Oculus Rift, and ARKit. In addition to being used for the development of electronic games, Unity is also a comprehensive creation tool that is widely used for interactive content such as architectural visualization and real-time 3D animation.

[0091] In a specific embodiment, the memory statistics dimension includes a system statistics dimension at the system level. The system statistics dimension is subdivided to obtain multiple memory statistics items. For example, the multiple memory statistics items are: a total footprint statistics item, a metal buffer statistics item, a metal texture statistics item, etc.

[0092] In another specific embodiment, the memory statistics dimension includes an engine statistics dimension at the engine level. The engine statistics dimension is subdivided to obtain multiple memory statistics items. For example, the multiple memory statistics items are: uobject statistics items, phyx statistics items, lua statistics items, wwise statistics items, etc.

[0093] In another specific embodiment, the memory statistics dimension includes a virtual statistics dimension at the virtual machine level. The virtual statistics dimension is subdivided to obtain multiple memory statistics items. For example, the multiple memory statistics items are: link_edit statistics item, text statistics item, data statistics item, etc.

[0094] 202. Perform memory detection on multiple memory statistic items of the application program to be tested to obtain multiple current memory statistic values ​​corresponding to the multiple memory statistic items.

[0095] In the embodiment of the present application, the preset memory statistical dimensions include the system statistical dimensions at the system level and the engine statistical dimensions at the engine level. The LLM (Low Level Memory Tracker) tool is used to perform memory detection on multiple memory statistical items of the application to be tested, and multiple current memory statistical values ​​corresponding to the multiple memory statistical items are obtained. Specifically, the current memory statistical value is footprint, and footprint is an indicator of memory measurement and optimization recommended by Apple. When the value of MemoryFootprint reaches the Limit line, a memory warning will be triggered. Of course, in other embodiments, the memreport tool can also be used to detect multiple memory statistical items, which can be set according to the specific situation. Among them, the program to be tested can be a game program or other program, which can be set according to the specific situation.

[0096] The LLM tool is a new memory statistics tool for the UE engine, which is more detailed and accurate than memreport statistics. Through LLM, you can know which modules of the engine consume the memory of the game, so that developers can optimize the modules with high memory usage in a targeted manner. Only the Debug and Development packages will enable the ENABLE_LOW_LEVEL_MEM_TRACKER macro, and the statistical logic will be compiled into the executable binary, and the LLM-related functions can be used. The Shipping package does not have the LLM function. For the Test package, you can #define ALLOW_LOW_LEVEL_MEM_TRACKER_IN_TEST 1 to compile the LLM code into the package-related logic. LLM assigns all the memory to be counted to a certain tag by inserting various tags. The implementation principle is: the inserted tag will form a tag stack, and the memory allocated by FMalloc will be counted under the tag at the top of the current stack. LLM establishes each FMalloc statistic at the bottom layer. If there is no tag in the current stack, all memory is counted under the untagged tag. LLM uses the TLS mechanism to implement tag multi-threaded safe reading and writing, avoiding unnecessary lock mechanisms and improving efficiency. If we insert a scoped tag into the code, we can count the exclusive memory under this scope into this ag. Through LLM, we will not miss any memory allocated by FMalloc. In addition, when the program is just initialized, LLM will record a memory that is estimated to be the memory of the executable program itself, recorded in the ProgramSize tag. The creation of GPU resources will also be recorded by LLM. Under additional texture, buffer and other tags, they are not part of the FMalloc memory, but an estimate of the GPU's memory usage. LLM currently has two Trackers: Default Tracker and Platform Tracker. They both have their own independent allocation maps and tag stacks. The Default Tracker (ELLMTracker::Default) is at a higher level and records the allocations made by the Malloc function of FMemory in the engine. Provides statistical information for the stat LLM and stat LLMFULL console commands. The Platform Tracker (ELLMTracker::Platform) is at a lower level and records all allocations made from the OS. For example, it detects internal allocations made by FMemory's Malloc function. Therefore, the Default Tracker is a subset of the PlatformTracker statistics.

[0097] After turning on LLM at compile time, if you want to use the LLM function at runtime, you must also add the startup command line -LLM and -LLMCSV. -LLM: Turn on LLM statistics at runtime or by defining #define LLM_AUTO_ENABLE 1. It is turned on by default. After turning it on, it will cause the fps to drop by 23.7%, which has a great impact on performance. -LLMCSV outputs memory statistics to a CSV file. The CSV file is saved in the Saved\Profiling\LLM directory. Set the console variable LLM.LLMWriteIntervalxx and change the frequency of writing csv files to xx seconds. The default is to write a line every 5 seconds. You will get two csv files, one with the LLM_ prefix and the other with the LLMPlatform_ prefix. These two files are generated by two Trackers respectively, and the two files have different focuses. LLM mainly focuses on consumers of FMalloc memory, mainly the memory overhead of various parts in the engine. LLMPlatform only focuses on consumers of system memory, which are mainly divided into several categories: ProgramSize, FMalloc, and LLMOverhead. -LLMTAGSETS=Assets: Displays statistics for each resource allocation, not just the broad categories.

[0098] 203. Determine a test result of the application to be tested based on multiple current memory statistics.

[0099] In a specific embodiment, preset thresholds of multiple memory statistic items are obtained, the difference between the current memory statistic value of each memory statistic item and the preset threshold is calculated, and the test result of the application to be tested is determined based on the difference between the current memory statistic value of each memory statistic item and the preset threshold.

[0100] In another specific embodiment, in order to improve accuracy, multiple historical memory statistical values ​​are obtained by performing memory detection on multiple memory statistical items of historical versions of the application to be tested; and the test result of the application to be tested is determined based on the difference between the multiple historical memory statistical values ​​and the multiple current memory statistical values.

[0101] In the present application, compared with the related art, after first obtaining at least two memory statistical items by subdividing the memory statistical dimension, memory detection is performed on multiple memory statistical items of the application to be tested to obtain multiple current memory statistical values ​​corresponding to the multiple memory statistical items, and then the test result of the application to be tested is determined based on the multiple current memory statistical values. The memory values ​​counted by different memory statistical dimensions can be further subdivided and counted to obtain the statistical values ​​of multiple memory statistical items under the memory statistical dimension, and then the program is tested according to the statistical values ​​of the multiple memory statistical items under the memory statistical dimension, which can realize automatic and detailed analysis of memory allocation and improve the performance testing efficiency of the application.

[0102] See also Figure 3 In a specific embodiment, memory detection is performed on multiple memory statistics items of the application to be tested to obtain multiple current memory statistics values ​​corresponding to the multiple memory statistics items, including:

[0103] 301. Construct statistical item statistical labels corresponding to each memory statistical item.

[0104] The code corresponding to the statistical item statistical tag is used to count the statistical value of the memory statistical item.

[0105] In the embodiment of the present application, multiple memory statistical items are manually set in advance, and the multiple memory statistical items are statistical items that are subdivided on the dimensions allocated by the engine.

[0106] In the embodiment of the present application, a label macro definition of multiple statistical item statistical labels is added in the LLM tool. Figure 4As shown, multiple statistical items are Total statistical items, Untracked statistical items, PlatformTotal statistical items, TrackedTotal statistical items, and UI statistical items. Among them, Total represents the total memory. Untracked represents unknown memory allocation, that is, memory that cannot be detected by LLM, such as memory allocation in third-party libraries. PlatformTotal represents the actual memory obtained from the operating system, not from LLM. On Android, it is Private Dirty in meminfo, excluding Private Clean and Swap parts. TrackedTotal represents all memory counted by calling LLM OnLowLevelAlloc / OnLowLevelFree, that is, all memory detected by LLM. PlatformTrackedTotal represents all memory counted by Platform Tracker, and the counted memory value PlatformTrackedTotal is larger than TrackedTotal. ELLMTag::UI represents Slate-related memory. This application adds the UI statistical item to the dimension allocated by the engine, and the label attribute belongs to STAT_UILLM.

[0107] In an embodiment of the present application, after adding label macro definitions of multiple statistical item statistical labels in the LLM tool, label statistics for multiple statistical item statistical labels are enabled in the LLM tool, and label statistics are used to count multiple statistical item statistical labels to corresponding memory statistical dimensions. Specifically, the statistical values ​​of the memory statistical items belonging to the engine statistical dimension are placed in the engine memory statistical file. For example, the system memory statistical file is named LLMPlatform file. The statistical values ​​of the statistical items belonging to the engine statistical dimension are placed in the engine memory statistical file. For example, the engine memory statistical file is named LLMFULL file.

[0108] like Figure 5 As shown in the figure, the memory statistics of the UI statistics items are integrated into the LLMFULL file, and the memory statistics of the Total statistics items are integrated into the LLMPlatform file.

[0109] 302. Insert multiple statistical item statistical tags into the application to be tested to obtain a target application.

[0110] In a specific embodiment, the LLM_SCOPE function is used to insert a range tag LLMTag of multiple statistical item statistical tags into the application to be tested, so as to insert multiple statistical item statistical tags into the application to be tested and obtain the target application. When a python function is running, it will create its own scope (or the function has its own namespace). When executing a function, if a variable name is encountered in the function body, python will first look for the variable in the namespace of the function. Figure 6 As shown, add the statistics item statistics tag of the statistics UI statistics item in takewidget, and the memory allocation of this block will be counted in the UI statistics item in LLMFULL. When LLM_SCOPE(ELLMTag::UI) is used for statistics, ELLMTag::UI will automatically accumulate statistics. If you want to write statistics to a CSV file, you need to trigger LLM_SCOPE(ELLMTag::ANR) once before starting to write the CSV file, and trigger heap memory allocation within its scope.

[0111] Furthermore, each statistical item is divided twice to obtain sub-items of the statistical item. Figure 7 As shown, through Figure 7 It can be seen that this application also subdivides multiple UI statistical items, divides UI related memory into UI_Slate, UI_Font, UI_Atlas and UI_Widget, etc., and inserts the statistical item statistical tags of each statistical item into the application to be tested.

[0112] 303. Summarize the statistical values ​​returned by the statistical tags of multiple statistical items when the target application is running, and obtain multiple current memory statistical values ​​corresponding to the multiple memory statistical items.

[0113] In a specific embodiment, the statistical values ​​returned by the statistical tags of multiple statistical items when the target application is running are aggregated by an LLM tool to obtain multiple current memory statistical values ​​corresponding to the multiple memory statistical items.

[0114] In another specific embodiment, the statistical values ​​returned by the statistical tags of multiple statistical items when the target application is running are aggregated to obtain multiple current memory statistical values ​​corresponding to the multiple memory statistical items, including:

[0115] (1) Obtain the statistical values ​​returned by the statistical tags of multiple statistical items when the target application is running.

[0116] In an embodiment of the present application, after inserting each statistical item statistical tag in the target application, the target application is running. When various engine memory allocations occur, such as using the FMemory::Malloc function, the memory allocation will be counted into the definition of the statistical item statistical tag, thereby obtaining the statistical values ​​returned by each statistical item statistical tag.

[0117] (2) The statistical values ​​of the memory statistical items under the system statistical dimension are put into the system memory statistical file.

[0118] In the embodiment of the present application, since label statistics are added in the LLM tool, the LLM tool will capture the memory dimension labels within the statistical range in real time. The statistical values ​​of the statistical items belonging to the system statistical dimension are placed in the system memory statistical file. For example, the system memory statistical file is named LLMPlatform file.

[0119] (3) The statistical values ​​of the memory statistics items under the engine statistics dimension are placed in the engine memory statistics file.

[0120] In the embodiment of the present application, the statistical values ​​of the statistical items under the engine statistical dimension are put into the engine memory statistical file. Even if some engine memory allocations are not marked with labels, they can be summarized into the engine memory statistical file by relying on OnLowLevelAlloc, for example, the engine memory statistical file is named LLMFULL file.

[0121] like Figure 8 and Fig. 9 As shown in the figure, the LLMPlatform file stores the statistical values ​​of multiple memory statistical items, and the LLMFULL file also stores the statistical values ​​of multiple memory statistical items. The multiple memory statistical items are:

[0122] PagefileUsed, which indicates the process virtual memory.

[0123] WorkingSetSize, which represents the physical memory of the process.

[0124] Total: indicates the total memory.

[0125] TrackedTotal indicates all memory counted by calling LLM OnLowLevelAlloc / OnLowLevelFree, that is, all memory detected by LLM.

[0126] Untagged means unclassified memory, that is, the memory is not within the scope of the LLM_SCOPE macro when it is allocated.

[0127] Untracked indicates unknown memory allocation, that is, memory that LLM cannot detect, such as memory allocation in third-party libraries.

[0128] LLMOverhead, which indicates the memory consumed by LLM itself.

[0129] FName, indicates the memory occupied by FName.

[0130] ThreadStack, which represents the Windows thread stack memory.

[0131] ELLMTag::Stats, which indicates the memory usage related to stat statistics.

[0132] OOMBackupPool, which indicates the backup memory pool.

[0133] ELLMTag::EngineMisc, which represents the memory allocated during the execution of the following functions, AActor::ProcessEvent, FEngineLoop::Tick.

[0134] ELLMTag::Textures represents the memory usage related to textures, including the texture-related memory on the CPU side + the estimated GPU memory.

[0135] ELLMTag::TextureMetaData, which represents the memory allocated during the execution of the UTexture2D::Serialize function.

[0136] ELLMTag::RenderTargets, which represents RT-related memory, including the memory used for rendering in the Viewport.

[0137] ELLMTag::Shaders, which indicates the memory usage of various types of Shander.

[0138] ELLMTag::Total (Default Tracker): PlatformTotal-LLMOverhead. This is the memory above minus the memory consumed by LLM itself. This memory value can be considered as the process memory value without opening the LLM function.

[0139] ELLMTag::UObject, which indicates the memory occupied by UObject, including UClass, etc.

[0140] FMalloc represents the memory allocated by the FMemory memory allocator, that is, the memory allocated by the engine in the general sense, such as the memory occupied by various UObjects, textures, animations, etc.

[0141] ELLMTag::Localization, represents localization-related memory.

[0142] ELLMTag::AssetRegistry, which represents the AssetRegistryModule memory.

[0143] FMallocUnused / / ELLMTag::FMalloc, represents the memory of the memory allocator - the memory obtained through FMemory, that is, the unused memory in the memory allocator.

[0144] ProgramSize, which indicates the memory occupied when the program is just started (the specific time is when a staticFName variable is initialized, before entering the main function), is used to make up for the part that is not detected before LLM initialization.

[0145] GenericPlatformMallocCrash, which represents pre-allocated crash-related memory, is used to replace GMalloc when a crash occurs.

[0146] OSAvailable, which indicates the physical memory currently available to the system.

[0147] LLMTag::TaskGraphTasksMisc, represents the memory allocated during the execution of the FTaskThreadAnyThread::ProcessTasks function.

[0148] Audio, which represents audio-related memory, including audio resources and memory allocated in the audio thread. Specifically, it also includes the following subcategories: ELLMTag::AudioMisc, ELLMTag::AudioSoundWaves, ELLMTag::AudioMixer, ELLMTag::AudioPrecache, ELLMTag::AudioDecompress, ELLMTag::AudioRealtimePrecache, ELLMTag::AudioFullDecompress, and ELLMTag::AudioVoiceChat.

[0149] ELLMTag::Networking, which represents network-related memory, including network packet processing, connection object memory, etc.

[0150] ELLMTag::Meshes, represents the memory occupied by the vertex buffer and vertex index buffer of Mesh, and the following subcategories Note: Includes VertexBuffer related memory on the CPU side + estimated GPU memory.

[0151] ELLMTag::StaticMesh, represents the memory related to StaticMesh.

[0152] ELLMTag::PSO, which indicates the memory usage of the Pipeline State Object cache.

[0153] ELLMTag::SceneRender, represents the memory usage related to scene rendering, including window rendering of Slate RHI Render.

[0154] ELLMTag::RHIMisc, represents other rendering-related memory usage, such as various rendering states and memory during the operation of the RHI Thread.

[0155] ELLMTag::AsyncLoading, which indicates the memory usage during asynchronous resource loading, including AsyncLoadingThread and Event Driven Loader.

[0156] ELLMTag::Animation, represents animation-related memory, including AnimInstance, AnimSequence, AnimationAsset, AnimBlueprint, MorphTarget.

[0157] ELLMTag::Materials, represents the memory related to materials, including MaterialInterface and MaterialFunction.

[0158] ELLMTag::Particles, represents the memory related to special effects, including ParticleSystemComponent.

[0159] ELLMTag::GC, which indicates the memory during the GC process.

[0160] ELLMTag::UI represents Slate-related memory, TextureAltas are the altas inside the slate, not the textures of the UI in TEXTGROUP.

[0161] ELLMTag::PhysX, represents PhysX physics-related memory.

[0162] ELLMTag::EnginePreInitMemory, which represents the memory during the execution of the FEngineLoop::PreInit function.

[0163] ELLMTag::EngineInitMemory, which represents the memory during the execution of the FEngineLoop::Init function.

[0164] ELLMTag::RenderingThreadMemory, represents the memory during the execution of the rendering thread (RenderingThreadMain).

[0165] ELLMTag::LoadMapMisc, represents the memory during the map loading process, which are the following two functions.

[0166] ELLMTag::StreamingManager, which represents the memory related to StreamableManager, mainly the memory during the execution of resource streaming functions.

[0167] ELLMTag::FileSystem, represents the memory related to the file system, mainly the buffer when reading files, such as Pak files.

[0168] ELLMTag::ConfigSystem, represents the memory related to the configuration file.

[0169] ELLMTag::InitUObject, represents the memory during the execution of the InitUObject function.

[0170] ELLMTag::MaterialInstance, which means MaterialInstance, MaterialInstanceDynamic including the memory usage of material parameters.

[0171] ELLMTag::Lua, which represents Lua memory.

[0172] (4) Summarize the statistical values ​​of the system memory statistical file and the engine memory statistical file to obtain multiple current memory statistical values ​​corresponding to the multiple memory statistical items.

[0173] For further information, please refer to Fig.10 , Fig.10This is a flow chart of performing memory detection on multiple memory statistics items of an application to be tested and obtaining multiple current memory statistics values ​​corresponding to the multiple memory statistics items in a performance testing method for an application provided in an embodiment of the present application. Fig.10 As shown, in the embodiment of the present application, the preset memory statistical dimension includes a virtual statistical dimension at the virtual machine level, and memory detection is performed on multiple memory statistical items of the application to be tested to obtain multiple current memory statistical values ​​corresponding to the multiple memory statistical items, including:

[0174] 401. Set the running state of the target application to debug mode.

[0175] 402. Run the target application into the target test scenario.

[0176] The target test scenario of this application can be determined according to the specific situation and is not limited here.

[0177] 403. Start a screenshot command to obtain a screenshot of the current memory status.

[0178] like Fig.11 As shown, starting the capture command can obtain a capture XX.memgraph of the current memory status.

[0179] 404. Parse the frame capture to obtain multiple current memory statistical values ​​corresponding to multiple memory statistical items of the virtual statistical dimension.

[0180] In the embodiment of the present application, multiple current memory statistical values ​​corresponding to multiple memory statistical items of the virtual statistical dimension can be obtained by using vmmap-summary XX.memgraph to perform frame analysis.

[0181] like Fig.11 As shown, the footprint memory statistic of the current scene is 111.3mb; by parsing the memory screenshot, you can extract the statistical values ​​of the memory occupied by the own code such as link_edit statistic items, text statistic items, and data statistic items, and you can also get the memory occupied by IOS Metal and third-party library malloc by obtaining Malloc_Nano, Malloc_Tiny, Malloc_Small, and Malloc_Large. This application will summarize the memory occupied by the own game code such as link_edit statistic items, text statistic items, and data statistic items, as well as the game resource memory occupied by the third-party library such as Malloc_Nano statistic items, Malloc_Tiny statistic items, Malloc_Small statistic items, and Malloc_Large statistic items, and will also extract the test tool overhead.

[0182] For further information, please refer to Fig.12 , Fig.12 FIG. 2 is a flow chart of another embodiment of the performance testing method for an application program provided in an embodiment of the present application. Fig.12 As shown, in the embodiment of the present application, the performance testing method of the application includes:

[0183] 501. Get multiple memory statistics items.

[0184] The memory statistics items are obtained by subdividing the preset memory statistics dimensions, and each memory statistics dimension is subdivided into at least two memory statistics items.

[0185] In an embodiment of the present application, the preset memory statistical dimensions may include system statistical dimensions at the system level, engine statistical dimensions at the engine level, and virtual statistical dimensions at the virtual machine level. The system statistical dimensions at the system level are the overall memory counted from the operating system level, and the statistical items of the engine statistical dimensions at the engine level are statistical items counted from the engine level. For example, the preset memory statistical dimensions may include system statistical dimensions at the system level, engine statistical dimensions at the engine level, and virtual statistical dimensions at the virtual machine level. Among them, the engine statistical dimensions at the engine level are represented by llmplatform, the engine statistical dimensions at the engine level are represented by llmfull, and the virtual statistical dimensions are represented by vmtracker.

[0186] In a specific embodiment, the system statistical dimension is subdivided to obtain multiple memory statistical items. For example, the multiple memory statistical items are: total footprint statistical items, metal buffer statistical items, metal texture statistical items, etc. The engine statistical dimension is subdivided to obtain multiple memory statistical items. For example, the multiple memory statistical items are: uobject statistical items, phyx statistical items, lua statistical items, wwise statistical items, etc. The virtual statistical dimension is subdivided to obtain multiple memory statistical items. For example, the multiple memory statistical items are: link_edit statistical items, text statistical items, data statistical items, etc.

[0187] 502. Add label macro definitions for multiple statistical item statistical labels in the LLM tool and enable label statistics.

[0188] like Fig.13As shown, add label macro definitions of multiple statistical item statistical labels in the LLM tool and enable label statistics. Specifically, add the LLMTag macro in the LLM tool. After adding label macro definitions of multiple statistical item statistical labels in the LLM tool, enable label statistics for multiple statistical item statistical labels in the LLM tool. Label statistics are used to count multiple statistical item statistical labels to corresponding memory statistical dimensions. Specifically, put the statistical values ​​of memory statistical items belonging to the engine statistical dimension into the engine memory statistical file. For example, the system memory statistical file is named LLMPlatform file. Put the statistical values ​​of statistical items belonging to the engine statistical dimension into the engine memory statistical file. For example, the engine memory statistical file is named LLMFULL file.

[0189] 503. Insert multiple statistical item statistical tags into the application to be tested to obtain a target application.

[0190] In the embodiment of the present application, the LLM_SCOPE function is used to insert a range tag LLMTag of multiple statistical item statistical tags into the application to be tested, so as to insert the multiple statistical item statistical tags into the application to be tested to obtain a target application.

[0191] like Fig.13 As shown, the application to be tested is a game program, and the range tag LLMTag of the statistical tags of multiple statistical items is inserted into the game code of the application to be tested to obtain the code of the target application.

[0192] 504. Obtain statistical values ​​returned by statistical tags of multiple statistical items when the target application is running.

[0193] like Fig.13 As shown in the figure, when the target application is running, the memory requested in the statistical code is counted by the LLM tool to obtain the statistical values ​​returned by the statistical tags of multiple statistical items.

[0194] 505. Put the statistical values ​​of the memory statistical items under the system statistical dimension into the system memory statistical file corresponding to the system statistical dimension.

[0195] In the embodiment of the present application, since label statistics are added in the LLM tool, the LLM tool will capture the memory dimension labels within the statistical range in real time. The statistical values ​​of the statistical items belonging to the system statistical dimension are placed in the system memory statistical file. For example, the system memory statistical file is named LLMPlatform file.

[0196] like Figure 8 As shown in the figure, the LLMPlatform file stores the statistical values ​​of multiple memory statistical items.

[0197] 506. Put the statistical value of the memory statistical item under the engine statistical dimension into the engine memory statistical file corresponding to the engine statistical dimension.

[0198] In the embodiment of the present application, the statistical values ​​of the statistical items under the engine statistical dimension are put into the engine memory statistical file. For example, the engine memory statistical file is named as LLMFULL file.

[0199] like Fig. 9 As shown, the LLMFULL file also stores statistical values ​​of multiple memory statistics items.

[0200] 507. Set the running state of the target application to debug mode.

[0201] 508. Run the target application into the target test scenario.

[0202] The target test scenario of this application can be determined according to the specific situation and is not limited here.

[0203] 509. Start the screenshot command to obtain a screenshot of the current memory status.

[0204] like Fig.11 As shown, starting the capture command can obtain a capture XX.memgraph of the current memory status.

[0205] 510. Parse the frame capture to obtain multiple current memory statistical values ​​corresponding to multiple memory statistical items of the virtual statistical dimension.

[0206] 511. Summarize the statistical values ​​of the system memory statistical file, the statistical values ​​of the engine memory statistical file, and multiple current memory statistical values ​​corresponding to multiple memory statistical items of the virtual statistical dimension to obtain multiple current memory statistical values ​​corresponding to the multiple memory statistical items.

[0207] In the embodiment of the present application, the memory data of the LLMPlatform file can directly obtain the total footprint, metal buffer, metal texture, etc.; the LLMFULL file is mainly used as a tool for obtaining various custom data, such as uobject, phyx, lua, wwise, etc.; the multiple current memory statistical values ​​corresponding to the multiple memory statistical items of the virtual statistical dimension utilize the detailed analysis of the memory snapshot to obtain the memory information of the code segments such as link_edit and data; the various memory segmentation data are summarized and uploaded to the server for final storage.

[0208] like Fig.14 As shown, Fig.14 It illustrates the meaning, acquisition methods, and current statistical values ​​of multiple memory statistics items in the current version.

[0209] The memory statistic item is the actual total memory, which indicates the real total footprint (excluding the footprint of the test tool). It is calculated by the formula. The current memory statistic value of the current version is 1326.5M.

[0210] The memory statistics item is the total footprint, which indicates the first metric of memory statistics: the measured total footprint, which is obtained through the Total statistics item in the LLMPlatform file. The current memory statistics value of the current version is 1578.89M, and the historical memory statistics value of the previous version is 1397.63M.

[0211] The memory statistic item is stats overhead, which indicates the stat tool overhead. It is obtained through the stat statistic items in the LLMFULL file. The current memory statistic value of the current version is 87.76M, and the historical memory statistic value of the previous version is 57.64M.

[0212] The memory statistic item is _DATA, which indicates the global variable of the code. It is obtained through the _DATA statistic item in the virtual statistical dimension. The current memory statistic value of the current version is 14.27M, and the historical memory statistic value of the previous version is 15.33M.

[0213] 512. Obtain multiple historical memory statistical values ​​obtained by performing memory detection on multiple memory statistical items of historical versions of the application to be tested.

[0214] like Fig.14 As shown, Fig.14 The meaning, acquisition methods, and previous version data of multiple memory statistics items are illustrated. For example, the memory statistics item is actual total memory, which indicates the real total footprint (excluding the footprint of the test tool). The historical memory statistics value of the previous version is 1187.91M, which is calculated by the formula. The memory statistics item is stats overhead, which indicates the stat tool overhead. It is obtained through the stat statistics item in the LLMFULL file. The historical memory statistics value of the previous version is 57.64M.

[0215] 513. Determine a test result of the application to be tested based on a difference between a plurality of historical memory statistical values ​​and a plurality of current memory statistical values.

[0216] like Fig.14 As shown, Fig.14It illustrates the meaning of multiple memory statistics items, how to obtain them, the current statistics value of the current version, the data of the previous version, and the memory comparison. For example, the memory statistics item is the actual total memory, which indicates the real total footprint (excluding the footprint of the test tool). It is calculated by the formula. The current memory statistics value of the current version is 1326.5M, the historical memory statistics value of the previous version is 1187.91M, and the memory comparison file is 138.59M. The memory statistics item is the total footprint, which indicates the first memory statistics caliber: the measured total footprint. It is obtained through the Total statistics item in the LLMPlatform file. The current memory statistics value of the current version is 1578.89M, the historical memory statistics value of the previous version is 1397.63M, and the memory comparison file is 181.26M. The memory statistics item is stats overhead, which indicates the stat tool overhead. It is obtained through the stat statistics item in the LLMFULL file. The current memory statistics value of the current version is 87.76M, the historical memory statistics value of the previous version is 57.64M, and the memory comparison file is 30.12M. The memory statistic item is _DATA, which indicates the global variables of the code. It is obtained through the _DATA statistic item in the virtual statistic dimension. The current memory statistic value of the current version is 14.27M, the historical memory statistic value of the previous version is 15.33M, and the memory comparison file is -1.06M. The memory statistic item is Lua, which indicates the Lua script. It is obtained through the Lua statistic item in the LLMFULL file. The current memory statistic value of the current version is 73.63M, the historical memory statistic value of the previous version is 76.31M, and the memory comparison file is -2.68M.

[0217] Fig.14 What is shown is a schematic diagram summarizing various memory data. We will extract and summarize the memory usage of overhead, metal buffer, metal texture and fmalloc in llmplatform; llmfull will subdivide the memory of resources such as wwise, animation, ui, etc.; vmtracker will subdivide and summarize its own game code memory (link_edit, text, data, etc.) and the memory usage of game resources in the third library (Malloc_Nano, Malloc_Tiny, Malloc_Small, Malloc_Large), and will also subdivide and extract the test tool overhead; the memory of each module is summarized for the final full memory display, and it can also be compared with historical versions to find specific memory growth points. For example, in the figure above, you can see that the overall memory of the two versions has increased by 138.59MB, mainly in buffer, texture, malloc unused and ui.

[0218] The existing technical solutions do not have resource memory usage breakdown, and cannot see the impact of game resources on memory usage; the existing technical solutions cannot obtain the memory usage breakdown of various codes, and cannot see the impact of various codes on memory usage; the existing technical solutions cannot see the memory usage breakdown of various test tools, and cannot see the impact of various test tools on memory usage. This technical solution will capture the memory allocation of the entire engine, and will perform segmentation statistics from the operating system and engine layers. The data can be accurately footprinted, and there will be a clear direction for memory optimization; it can obtain resource memory usage breakdown, and view the specific values ​​of game resources for memory usage; it can obtain the memory usage breakdown of various codes, and view the specific data of memory usage of various codes; it can obtain the memory usage breakdown of various test tools, and view the specific values ​​of memory usage of various test tools, so that game developers can perform automated and detailed analysis of footprint memory allocation, facilitate overall memory hotspot identification and memory anomaly comparison between versions, and improve program testing efficiency.

[0219] In the present application, compared with the related art, after first obtaining at least two memory statistical items by subdividing the memory statistical dimension, memory detection is performed on multiple memory statistical items of the application to be tested to obtain multiple current memory statistical values ​​corresponding to the multiple memory statistical items, and then the test result of the application to be tested is determined based on the multiple current memory statistical values. The memory values ​​counted by different memory statistical dimensions can be further subdivided and counted to obtain the statistical values ​​of multiple memory statistical items under the memory statistical dimension, and then the program is tested according to the statistical values ​​of the multiple memory statistical items under the memory statistical dimension, which can realize automatic and detailed analysis of memory allocation and improve the performance testing efficiency of the application.

[0220] In order to better implement the performance testing method of the application provided in the embodiment of the present application, the embodiment of the present application also provides a performance testing device for the application based on the performance testing method of the application. The meanings of the terms are the same as those in the performance testing method of the application. For specific implementation details, please refer to the description in the above method embodiment.

[0221] Please refer to Fig.15 , Fig.15 80 is a schematic diagram of the structure of a performance testing device for an application provided in an embodiment of the present application. The performance testing device for the application may include an acquisition module 801, a memory detection module 802, and a determination module 803, wherein:

[0222] An acquisition module, used for acquiring a plurality of memory statistics items, wherein the memory statistics items are obtained by subdividing a preset memory statistics dimension, and each memory statistics dimension is subdivided to obtain at least two memory statistics items;

[0223] A memory detection module, used for performing memory detection on a plurality of memory statistics items of the application to be tested, and obtaining a plurality of current memory statistics values ​​corresponding to the plurality of memory statistics items;

[0224] A determination module is used to determine a test result of the application to be tested based on the multiple current memory statistics.

[0225] In an optional embodiment, the preset memory statistical dimension includes at least one of a system statistical dimension at a system level, an engine statistical dimension at an engine level, and a virtual statistical dimension at a virtual machine level.

[0226] In an optional embodiment, the preset memory statistical dimension includes a system statistical dimension at the system level and an engine statistical dimension at the engine level, and the memory detection module is used to:

[0227] Constructing statistical item statistical tags corresponding to each of the memory statistical items, wherein the codes corresponding to the statistical item statistical tags are used to count the statistical values ​​of the memory statistical items;

[0228] Inserting a plurality of statistical item statistical tags into the application to be tested to obtain a target application;

[0229] The statistical values ​​returned by the statistical tags of multiple statistical items when the target application is running are aggregated to obtain multiple current memory statistical values ​​corresponding to the multiple memory statistical items.

[0230] In an optional embodiment, the memory detection module is used to:

[0231] Obtain statistical values ​​returned by multiple statistical tags of statistical items when the target application is running;

[0232] Put the statistical values ​​of the memory statistical items under the system statistical dimension into the system memory statistical file corresponding to the system statistical dimension;

[0233] Put the statistical values ​​of the memory statistics items under the engine statistics dimension into the engine memory statistics file corresponding to the engine statistics dimension;

[0234] The statistical values ​​of the system memory statistical file and the engine memory statistical file are aggregated to obtain a plurality of current memory statistical values ​​corresponding to the plurality of memory statistical items.

[0235] In an optional embodiment, the preset memory statistical dimension includes a virtual statistical dimension at the virtual machine level, and the memory detection module is used to:

[0236] Setting the running state of the target application to debug mode;

[0237] Running the target application into a target test scenario;

[0238] Start the screenshot command to get a screenshot of the current memory status;

[0239] The frame capture is parsed to obtain a plurality of current memory statistical values ​​corresponding to the plurality of memory statistical items of the virtual statistical dimension.

[0240] In an optional embodiment, the determining module is used to:

[0241] Acquire multiple historical memory statistical values ​​obtained by performing memory detection on multiple memory statistical items of historical versions of the application to be tested;

[0242] A test result of the application to be tested is determined based on a difference between the plurality of historical memory statistical values ​​and the plurality of current memory statistical values.

[0243] The specific implementation of each of the above modules can be found in the previous embodiments and will not be described in detail here.

[0244] In this embodiment, first, the acquisition module 801 acquires multiple memory statistics items, wherein the memory statistics items are obtained by subdividing the preset memory statistics dimension, and each memory statistics dimension is subdivided to obtain at least two memory statistics items; then, the memory detection module 802 performs memory detection on the multiple memory statistics items of the application to be tested, and obtains multiple current memory statistics values ​​corresponding to the multiple memory statistics items; finally, the determination module 803 determines the test result of the application to be tested based on the multiple current memory statistics values. Compared with the related art, after first obtaining at least two memory statistics items by subdividing the memory statistics dimension, memory detection is performed on the multiple memory statistics items of the application to be tested, and multiple current memory statistics values ​​corresponding to the multiple memory statistics items are obtained, and then the test result of the application to be tested is determined based on the multiple current memory statistics values, the memory values ​​counted by different memory statistics dimensions can be further subdivided and counted, and the statistical values ​​of multiple memory statistics items under the memory statistics dimension are obtained, and then the program test is performed according to the statistical values ​​of the multiple memory statistics items under the memory statistics dimension, which can realize the automatic and detailed analysis of memory allocation and improve the performance test efficiency of the application.

[0245] Please refer to Fig.16 , Fig.16 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0246] The electronic device may include components such as a processor 101 with one or more processing cores, a memory 102 with one or more computer-readable storage media, a power supply 103, and an input unit 104. Those skilled in the art will appreciate that the electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:

[0247] The processor 101 is the control center of the electronic device, which uses various interfaces and lines to connect various parts of the entire electronic device, and executes various functions of the electronic device and processes data by running or executing software programs and / or modules stored in the memory 102, and calling data stored in the memory 102. Optionally, the processor 101 may include one or more processing cores; optionally, the processor 101 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 101.

[0248] The memory 102 can be used to store software programs and modules. The processor 101 executes various functional applications and data processing by running the software programs and modules stored in the memory 102. The memory 102 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 102 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 102 may also include a memory controller to provide the processor 101 with access to the memory 102.

[0249] The electronic device also includes a power supply 103 for supplying power to each component. Optionally, the power supply 103 can be logically connected to the processor 101 through a power management system, so as to manage charging, discharging, power consumption and other functions through the power management system. The power supply 103 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.

[0250] The electronic device may further include an input unit 104, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0251] Although not shown, the electronic device may also include a display unit, an image acquisition element, etc., which will not be described in detail here. Specifically in this embodiment, the processor 101 in the electronic device will load the executable code corresponding to one or more computer programs into the memory 102 according to the following instructions, and the processor 101 will execute the steps in the performance testing method of the application provided in this application, such as:

[0252] Acquire multiple memory statistics items, wherein the memory statistics items are obtained by subdividing a preset memory statistics dimension, and each memory statistics dimension is subdivided into at least two memory statistics items; perform memory detection on the multiple memory statistics items of the application to be tested to obtain multiple current memory statistics values ​​corresponding to the multiple memory statistics items; and determine a test result of the application to be tested based on the multiple current memory statistics values.

[0253] It should be noted that the electronic device provided in the embodiment of the present application and the performance testing method of the application in the above embodiment belong to the same concept, and its specific implementation process is detailed in the above related embodiments and will not be repeated here.

[0254] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program stored therein is executed on a processor of an electronic device provided in an embodiment of the present application, the processor of the electronic device executes the steps in the performance testing method of the application provided in the present application. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0255] The present application also provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes various optional implementations of the performance testing method of the above-mentioned application program.

[0256] The above is a detailed introduction to the performance testing method and device for an application provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

[0257] It should be noted that when the above embodiments of the present application are applied to specific products or technologies, the relevant data of the user is involved, and the user's permission or consent is required, and the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

Claims

1. A performance testing method for an application, characterized in that: include: Acquire multiple memory statistics items, wherein the memory statistics items are obtained by subdividing a preset memory statistics dimension, and each memory statistics dimension is subdivided to obtain at least two memory statistics items; Perform memory detection on the multiple memory statistics items of the application to be tested, and obtain multiple current memory statistics values ​​corresponding to the multiple memory statistics items; A test result of the application to be tested is determined based on the multiple current memory statistics.

2. The performance testing method of an application according to claim 1, characterized in that: The preset memory statistical dimension includes at least one of a system statistical dimension at a system level, an engine statistical dimension at an engine level, and a virtual statistical dimension at a virtual machine level.

3. The performance testing method of an application according to claim 2, characterized in that: The preset memory statistics dimension includes a system statistics dimension at the system level and an engine statistics dimension at the engine level. The memory detection is performed on the multiple memory statistics items of the application to be tested to obtain multiple current memory statistics values ​​corresponding to the multiple memory statistics items, including: Constructing statistical item statistical tags corresponding to each of the memory statistical items, wherein the codes corresponding to the statistical item statistical tags are used to count the statistical values ​​of the memory statistical items; Inserting a plurality of statistical item statistical tags into the application to be tested to obtain a target application; The statistical values ​​returned by the statistical tags of multiple statistical items when the target application is running are aggregated to obtain multiple current memory statistical values ​​corresponding to the multiple memory statistical items.

4. The performance testing method of an application according to claim 3, characterized in that: The aggregating statistical values ​​returned by statistical tags of multiple statistical items when the target application is running to obtain multiple current memory statistical values ​​corresponding to the multiple memory statistical items includes: Obtain statistical values ​​returned by multiple statistical tags of statistical items when the target application is running; Put the statistical values ​​of the memory statistical items under the system statistical dimension into the system memory statistical file corresponding to the system statistical dimension; Put the statistical values ​​of the memory statistics items under the engine statistics dimension into the engine memory statistics file corresponding to the engine statistics dimension; The statistical values ​​of the system memory statistical file and the engine memory statistical file are aggregated to obtain a plurality of current memory statistical values ​​corresponding to the plurality of memory statistical items.

5. The performance testing method of an application according to claim 2, characterized in that: The preset memory statistics dimension includes a virtual statistics dimension at the virtual machine level, and the memory detection is performed on the multiple memory statistics items of the application to be tested to obtain multiple current memory statistics values ​​corresponding to the multiple memory statistics items, including: Setting the running state of the target application to debug mode; Running the target application into a target test scenario; Start the screenshot command to get a screenshot of the current memory status; The frame capture is parsed to obtain a plurality of current memory statistical values ​​corresponding to the plurality of memory statistical items of the virtual statistical dimension.

6. The performance testing method of an application according to claim 1, characterized in that: The determining the test result of the application to be tested based on the multiple current memory statistics values ​​includes: Acquire multiple historical memory statistical values ​​obtained by performing memory detection on multiple memory statistical items of historical versions of the application to be tested; A test result of the application to be tested is determined based on a difference between the plurality of historical memory statistical values ​​and the plurality of current memory statistical values.

7. A performance testing device for an application, characterized in that: include: An acquisition module, used for acquiring a plurality of memory statistics items, wherein the memory statistics items are obtained by subdividing a preset memory statistics dimension, and each memory statistics dimension is subdivided to obtain at least two memory statistics items; A memory detection module, used for performing memory detection on a plurality of memory statistics items of the application to be tested, and obtaining a plurality of current memory statistics values ​​corresponding to the plurality of memory statistics items; A determination module is used to determine a test result of the application to be tested based on the multiple current memory statistics.

8. An electronic device, characterized in that: It comprises a memory and a processor, wherein the memory stores a computer program, and the processor is used to run the computer program in the memory to execute the steps in the performance testing method of the application program described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the performance testing method of an application program according to any one of claims 1 to 6.

10. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps in the performance testing method of the application program described in any one of claims 1 to 6 are implemented.