Resource occupation determination method and device, computing equipment and machine readable storage medium
By processing time-axis-based data recording and playback, the problem of inefficient application resource usage was solved, achieving more efficient and accurate resource usage statistics.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NOBO AUTOMOTIVE TECH CO LTD
- Filing Date
- 2024-10-16
- Publication Date
- 2026-04-24
AI Technical Summary
The existing technology for determining application resource usage is inefficient and prone to configuration anomalies, resulting in inefficient resource usage statistics.
By responding to the received data recording command, data in the data pool is recorded based on the timeline to obtain resource usage values. When the target peak is reached, the replay data is read and the resource usage information is obtained using the test node in the loading state to generate resource usage statistics.
It improves the efficiency of determining application resource usage, reduces the impact of differences in manually configured test environments, and obtains more accurate resource usage values.
Smart Images

Figure CN121918972A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data detection, and more specifically to a method, apparatus, computing device, and machine-readable storage medium for determining resource occupancy. Background Technology
[0002] With the continuous development of vehicle control technology, vehicles are becoming increasingly intelligent. Users can interact with vehicles using the Human Machine Interface (HMI) provided by applications (apps), enabling the vehicle to offer various functions and improving the user experience. During application execution, each node consumes resources such as video memory and RAM during rendering, which can easily lead to excessive resource consumption. Engineers typically monitor the resource usage of applications during runtime to optimize them.
[0003] When calculating resource usage, engineers need to manually disable individual nodes and provide external signals to eliminate their impact on memory and video memory resources during application runtime. The resource usage of each individual node is then determined based on the detected resource usage values after disabling it. However, determining memory and video memory usage by disabling each node sequentially is time-consuming, leading to inefficiency in determining application resource usage. Furthermore, applications typically contain numerous nodes, and determining the resource usage of each requires application configuration, which can easily result in configuration errors, further complicating the determination of application resource usage. Summary of the Invention
[0004] The purpose of this invention is to provide a method, apparatus, computing device, and machine-readable storage medium for determining resource usage. The method for determining resource usage solves the problem of inefficiency in determining the resource usage value of an application.
[0005] To achieve the above objectives, firstly, this application provides a method for determining resource occupancy, the method comprising:
[0006] In response to the received data recording instruction, the system records data from the data pool based on the timeline to obtain playback data. The data pool stores business logic data obtained by the application during runtime.
[0007] Get the resource usage of the application during runtime, including memory resources and video memory resources;
[0008] When resource usage reaches the target peak, the application reads and replays the data.
[0009] By utilizing test nodes in the loading state, resource usage information when the application reads playback data is obtained, so as to obtain resource usage statistics for all test nodes.
[0010] In the embodiments of this application, when the resource occupancy reaches the target peak, the application reads the playback data, including:
[0011] When the resource occupancy reaches the target peak, respond to the received occupancy statistics command and check whether there is replay data;
[0012] If playback data is available, the application reads the playback data.
[0013] In the embodiments of this application, the resource occupancy determination method further includes:
[0014] If no playback data is available, a prompt message is generated, indicating that no playback data exists.
[0015] In the embodiments of this application, resource usage information when the application reads playback data is obtained using test nodes in a loading state, so as to obtain resource usage statistics for all test nodes, including:
[0016] Each test node is configured to be in a loading state in turn, and the resource usage information when the application reads playback data is obtained using the test node in the loading state.
[0017] Based on the resource usage information obtained from the test nodes, the name of the test nodes, and the status of the test nodes, resource usage statistics for all test nodes are obtained.
[0018] In the embodiments of this application, the resource occupancy determination method further includes:
[0019] Get the sorted list of all plugin nodes in the application;
[0020] Based on the sorted list and the relationship between plugin nodes and test nodes, each test node is configured to be in a loaded state in turn.
[0021] In the embodiments of this application, the resource occupancy determination method further includes:
[0022] Determine the status of each plugin node;
[0023] When the state of a plugin node changes, the state and name of each plugin node are sent to the application to display the application's business logic interface.
[0024] In the embodiments of this application, the resource occupancy determination method further includes:
[0025] Based on resource usage statistics, perform memory resource release and / or video memory resource release for the application.
[0026] Secondly, this application provides a resource occupancy determination device, which includes:
[0027] The data recording module is used to respond to the received data recording command, record the data in the data pool based on the time axis, and obtain the playback data. The data pool stores the business logic data obtained by the application during runtime.
[0028] The resource usage acquisition module is used to acquire the resource usage value of the application during runtime, including memory resources and video memory resources;
[0029] The data reading module is used to read and replay data using the application when the resource usage reaches the target peak.
[0030] The resource usage statistics module is used to obtain resource usage information when the application reads playback data from test nodes that are in a loading state, so as to obtain resource usage statistics information for all test nodes.
[0031] Thirdly, this application provides a computing device, comprising:
[0032] The memory is configured to store instructions;
[0033] The processor is configured to retrieve instructions from memory and, when executing instructions, to implement the resource occupancy determination method described above.
[0034] Fourthly, this application provides a machine-readable storage medium storing instructions that cause a machine to execute the resource occupancy determination method described above.
[0035] Other features and advantages of the embodiments of the present invention will be described in detail in the following detailed description section.
[0036] This application provides a method for determining resource usage. The method includes: responding to a received data recording instruction; recording data from a data pool based on a timeline to obtain playback data; obtaining the resource usage value during application runtime; when the resource usage value reaches a target peak, using the application to read the playback data; and using test nodes in a loading state to obtain resource usage information when the application reads the playback data, thereby obtaining resource usage statistics for all test nodes. By reading playback data based on the timeline, engineers do not need to manually configure the test environment. When determining memory and video memory usage, only the node status needs to be configured, simplifying the operation and improving the efficiency of determining the application's resource usage value. Simultaneously, reading playback data no longer relies on external signals and avoids the influence of differences in test environment configuration caused by engineers manually configuring the test environment. By precisely controlling variables and reducing the influence of other factors on resource usage analysis, more accurate application resource usage values can be obtained. Attached Figure Description
[0037] The accompanying drawings are provided to further illustrate embodiments of the present invention and form part of the specification. They are used together with the following detailed description to explain the embodiments of the present invention, but do not constitute a limitation thereof. In the drawings:
[0038] Figure 1 A flowchart of a first method for determining resource occupancy provided in an embodiment of this application is shown;
[0039] Figure 2 A second flowchart of the resource occupancy determination method provided in an embodiment of this application is shown;
[0040] Figure 3 A schematic diagram of the resource occupancy determination device provided in an embodiment of this application is shown. Detailed Implementation
[0041] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustrative and explanatory purposes only and are not intended to limit the scope of the present invention.
[0042] The components of the embodiments of the invention described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0043] In the following, the terms “comprising,” “having,” and their cognates, which may be used in various embodiments of the invention, are intended only to indicate a particular feature, number, step, operation, element, component, or combination thereof, and should not be construed as excluding, firstly, the presence of one or more other features, numbers, steps, operations, elements, components, or combinations thereof, or adding the possibility of one or more features, numbers, steps, operations, elements, components, or combinations thereof.
[0044] Furthermore, the terms "first," "second," and "third" are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.
[0045] Unless otherwise specified, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of the invention pertain. Terms (such as those defined in commonly used dictionaries) shall be interpreted as having the same meaning as in their contextual meaning in the relevant technical field and shall not be interpreted as having an idealized or overly formal meaning, unless clearly defined in the various embodiments of the invention.
[0046] Example 1
[0047] Please see Figure 1 , Figure 1 A flowchart of a first method for determining resource occupancy provided in an embodiment of this application is shown. Figure 1 The methods for determining resource usage include:
[0048] S110, responding to the received data recording instruction, records data in the data pool based on the timeline to obtain playback data, wherein the data pool stores business logic data obtained by the application during runtime.
[0049] Engineers typically analyze application resource usage during runtime to optimize the application. When analyzing resource usage, engineers need to manually disable individual nodes to eliminate their impact on memory and video memory resources during application execution. It's important to understand that the application type is determined based on actual needs and is not limited here. For ease of understanding, the application in this embodiment is a KANZI application. Each node in a KANZI application consumes memory and video memory resources during rendering, making it inefficient to determine the application's resource usage.
[0050] The resource occupancy determination method in the embodiments of this application is applied to a computing device, which can unload and load nodes through a test plugin. For ease of understanding, the state of the test plugin in the embodiments of this application can be configured as a normal operating state, a data recording state, and a node testing state. Under normal operating conditions related to the application's business logic, the application will receive external signals. The application receives business logic data and stores it in a data pool. Business logic data refers to data related to business logic processed by the application, including user information and geographic location data, etc., which are not limited here.
[0051] Data recording refers to the process of recording data generated by a specific event or process for later reference, analysis, or auditing. Upon receiving a data recording instruction, the test plugin is configured to data recording mode in response. Data is recorded from the data pool based on a timeline, and the recorded data is used as playback data to analyze the application's memory and video memory usage. Furthermore, the application's business logic can still function normally during data recording, which will not be elaborated upon here.
[0052] S120: Obtain the resource usage value of the application during runtime, including memory resources and video memory resources.
[0053] The resources consumed by an application during runtime can include memory resources and video memory resources, etc., which are not limited here. During the data recording process of the data in the data pool, the resource usage values of the application during runtime are obtained. It should be understood that the resource usage value can be the total memory resources used by all nodes in the application and / or the total video memory resources used. The computing device actively detects whether the resource usage value has reached its peak. In addition, the obtained resource usage value can be displayed through a test node, so that users can quickly determine whether the resource usage value has reached the target peak by looking at the usage value displayed on the interface.
[0054] S130: When the resource usage reaches the target peak, the application reads the playback data.
[0055] When resource usage reaches the target peak, data recording in the data pool is stopped based on the received instruction. The test plugin is configured to node test mode, replay data is stored in the data pool, and then the application reads the replay data from the data pool.
[0056] S140: Use the test nodes in the loading state to obtain the resource usage information when the application reads playback data, so as to obtain the resource usage statistics information corresponding to all test nodes.
[0057] When a test node is configured to be unloaded, it does not run and therefore resource usage information cannot be obtained. However, when a test node is configured to be loaded, resource usage information can be obtained. Each test node is configured to be loaded, and resource usage information when the application reads playback data is obtained from the loaded test nodes. Based on the resource usage information obtained from each test node, resource usage statistics for all test nodes are obtained. Using these statistics, nodes with high resource usage values are optimized to improve the application and enhance the user experience.
[0058] When analyzing resource usage, engineers manually disabled individual nodes to eliminate their impact on memory and video memory resources during application execution. The resource usage of a single node was then determined based on the detected resource usage values after disabling it. However, each time a node was disabled, external signals needed to be provided for testing, requiring engineers to repeat the process and impacting the efficiency of determining application resource usage. Furthermore, differences in external signals each time individual nodes were disabled and the application was run for testing affected the accuracy of the determined resource usage values. By reading timeline-based playback data, engineers no longer need to manually configure the test environment. When determining memory and video memory resource usage, only the node status needs to be configured, simplifying the process and improving the efficiency of determining application resource usage. Additionally, reading playback data no longer relies on external signals and avoids the impact of differences in manually configured test environments. By precisely controlling variables and reducing the influence of other factors on resource usage analysis, more accurate application resource usage values can be obtained.
[0059] Please see Figure 2 , Figure 2 A second flowchart of the resource occupancy determination method provided in the embodiments of this application is shown.
[0060] In the embodiments of this application, resource usage information when the application reads playback data is obtained using test nodes in a loading state, so as to obtain resource usage statistics for all test nodes, including:
[0061] S141, each test node is configured to be in a loading state in sequence, and the resource usage information when the application reads the playback data is obtained by using the test node in the loading state;
[0062] S142. Based on the resource usage information obtained from the test nodes, the name of the test nodes, and the status of the test nodes, obtain the resource usage statistics for all test nodes.
[0063] Each test node is configured to be in a loaded state in turn, and the resource usage information when the application reads playback data is obtained using the test nodes in the loaded state. It should be understood that each test node can be designated as the target test node, configured to be in a loaded state, and all other test nodes can be configured to be in an unloaded state. This further reduces the impact of other factors on the analysis of resource usage, so as to obtain a more accurate value of the application's resource usage.
[0064] Based on the resource usage information, test node names, and test node status obtained from the test nodes, resource usage statistics for all test nodes are obtained. The resource usage information represents the resource usage value that changes over time. For ease of understanding, this embodiment assumes two test nodes, with the first test node named Node A and the second test node named Node B. When the application reads and replays data for 5 seconds, the resource usage statistics include the resource usage value of test node A within 5 seconds, and Node A's status being either unloaded or loaded; and the resource usage value of test node B within 5 seconds, and Node B's status being either unloaded or loaded. The resource usage statistics can be sent to the server, which writes the received statistics to a file and saves them. It should be understood that the resource usage statistics may also include other information, such as the test node order, which is not limited here.
[0065] In the embodiments of this application, when the resource occupancy reaches the target peak, the application reads the playback data, including:
[0066] S131, when the resource occupancy value reaches the target peak, respond to the received occupancy statistics command and check whether there is replay data;
[0067] S132, if playback data exists, use the application to read the playback data.
[0068] During the process of obtaining resource usage values during application runtime, users can actively determine whether resource usage has reached the target peak and manually send usage statistics commands to obtain resource usage statistics. However, without recording data from the data pool and receiving a usage statistics command, it is impossible to read replay data using the application. When resource usage reaches the target peak and a usage statistics command is received, the system responds to the received command, checks for replay data, and then determines whether data recording has been performed on the data pool based on the timeline. If replay data exists, data recording in the data pool is stopped. The test plugin's state is configured to node test state, the replay data is stored in the data pool, and then the application reads the replay data from the data pool.
[0069] In the embodiments of this application, the resource occupancy determination method further includes:
[0070] S133, if no playback data exists, generate a prompt message, wherein the prompt message is used to indicate that no playback data exists.
[0071] If no playback data is available, it is determined that no data recording has been performed on the data pool based on the timeline. A prompt message is generated to inform the user that no playback data exists. The user can then initiate a data recording operation based on the generated prompt message. The computing device responds to the user's operation by receiving the data recording command and records the data in the data pool based on the timeline to obtain the playback data.
[0072] In the embodiments of this application, the resource occupancy determination method further includes:
[0073] S101, Get the sorted list of all plugin nodes in the application;
[0074] S102, based on the sorted list and the relationship between the plugin node and the test node, configure each test node to be in a loading state in turn.
[0075] Applications typically include multiple plugin nodes. The type of plugin node is set according to actual needs; it can be an asynchronously loaded plugin node, a synchronously loaded plugin node, or other types of plugin nodes, etc., without being limited here. Asynchronously loaded plugin nodes usually refer to plugin nodes that are loaded and executed asynchronously in the application or system, while synchronously loaded plugin nodes usually refer to plugin nodes that are loaded and executed synchronously in the application or system.
[0076] Typically, some plugin nodes in an application need to be loaded and executed in a specific order. This involves obtaining the order in which all plugin nodes in the application are loaded and executed, and retrieving the sorted list corresponding to all plugin nodes in the application.
[0077] A test node typically refers to a specific environment, device, or component used in software development to perform various types of tests. In the embodiments of this application, a test node is used to obtain resource usage information for a corresponding plugin node during runtime. Based on the sorted list and the relationship between plugin nodes and test nodes, each test node is sequentially configured to a loaded state. It should be understood that, without receiving instructions related to the test node's state, test nodes are typically configured to an unloaded state by default during application runtime; that is, test nodes are not loaded, while plugin nodes are configured to a loaded state by default.
[0078] In the embodiments of this application, the resource occupancy determination method further includes:
[0079] S150 performs memory resource release and / or video memory resource release processing on the application based on resource usage statistics.
[0080] Based on resource usage statistics, identify nodes with excessive memory and / or video memory usage. If a node is consuming excessive memory, it can be configured to be unloaded to release memory resources for the application. If a node is consuming excessive video memory, the video memory cannot be actively released after the node is unloaded. The status and name of the node whose video memory needs to be released are sent to the application. If the node is configured to be unloaded, the application will then release the video memory resources.
[0081] In the embodiments of this application, the resource occupancy determination method further includes:
[0082] S160, determine the status of each plugin node;
[0083] S170: When the status of a plugin node changes, the status and name of each plugin node are sent to the application to display the application's business logic interface.
[0084] With the test plugin configured in a normal running state, the application's business logic runs normally. Test nodes are configured in an unloaded state by default, while plugin nodes are configured in a loading state by default. The main KANZI application project is divided into multiple plugin nodes to implement business logic functions, and the status of each plugin node is determined in real time. When a plugin node's status changes, the status and name of each plugin node are sent to the application to display the application's business logic interface. Specifically, after memory and / or video memory resource release is completed, and all test nodes are configured in an unloaded state, the status and name of each plugin node are broadcast as information, which is then captured by the KANZI application.
[0085] This application provides a method for determining resource usage. The method includes: responding to a received data recording instruction; recording data from a data pool based on a timeline to obtain playback data; obtaining the resource usage value during application runtime; when the resource usage value reaches a target peak, using the application to read the playback data; and using test nodes in a loading state to obtain resource usage information when the application reads the playback data, thereby obtaining resource usage statistics for all test nodes. By reading playback data based on the timeline, engineers do not need to manually configure the test environment. When determining memory and video memory usage, only the node status needs to be configured, simplifying the operation and improving the efficiency of determining the application's resource usage value. Simultaneously, reading playback data no longer relies on external signals and avoids the influence of differences in test environment configuration caused by engineers manually configuring the test environment. By precisely controlling variables and reducing the influence of other factors on resource usage analysis, more accurate application resource usage values can be obtained.
[0086] Example 2
[0087] Please see Figure 3 , Figure 3 A schematic diagram of the resource occupancy determination device provided in an embodiment of this application is shown. Figure 3 The resource occupancy determination device 200 includes:
[0088] The data recording module 210 is used to respond to the received data recording command, record data in the data pool based on the time axis, and obtain playback data. The data pool stores business logic data obtained by the application during runtime.
[0089] The resource occupancy acquisition module 220 is used to acquire the resource occupancy value of the application during runtime, wherein the resources include memory resources and video memory resources;
[0090] The data reading module 230 is used to read playback data using the application when the resource usage reaches the target peak.
[0091] The resource usage statistics module 240 is used to obtain resource usage information when the application reads playback data using the test nodes in the loading state, so as to obtain resource usage statistics information for all test nodes.
[0092] In embodiments of this application, the data reading module 230 includes:
[0093] The replay data detection submodule is used to detect whether replay data exists when the resource occupancy value reaches the target peak value in response to the received occupancy statistics command.
[0094] The playback data execution submodule is used to read playback data using the application, if playback data is available.
[0095] In embodiments of this application, the resource occupancy determination device 200 further includes:
[0096] The prompt message generation module is used to generate a prompt message when there is no playback data. The prompt message is used to indicate that there is no playback data.
[0097] In embodiments of this application, the occupancy statistics module 240 includes:
[0098] The status configuration submodule is used to configure each test node to the loading state in sequence, and to obtain the resource usage information when the application reads playback data using the test node in the loading state.
[0099] The statistics information acquisition submodule is used to obtain resource usage statistics for all test nodes based on the resource usage information obtained from the test nodes, the name of the test nodes, and the status of the test nodes.
[0100] In embodiments of this application, the resource occupancy determination device 200 further includes:
[0101] The sorting list retrieval module is used to retrieve the sorting list corresponding to all plugin nodes in the application;
[0102] The test node configuration module is used to configure each test node to be in a loaded state according to the sorted list and the relationship between the plugin nodes and the test nodes.
[0103] In embodiments of this application, the resource occupancy determination device 200 further includes:
[0104] The status determination module is used to determine the status of each plugin node;
[0105] The interface display module is used to send the status and name of each plugin node to the application when the status of the plugin node changes, so as to display the application's business logic interface.
[0106] In embodiments of this application, the resource occupancy determination device 200 further includes:
[0107] The resource release module is used to release memory resources and / or video memory resources of the application based on resource usage statistics.
[0108] The resource occupancy determination device 200 is used to execute the corresponding steps in the resource occupancy determination method described above. The specific implementation of each function will not be described in detail here. In addition, the optional examples in the resource occupancy determination method are also applicable to the resource occupancy determination device 200.
[0109] This application embodiment also provides a computing device, including:
[0110] The memory is configured to store instructions;
[0111] The processor is configured to retrieve instructions from memory and, when executing instructions, to implement the resource occupancy determination method described above.
[0112] In this embodiment, the data recording module 210, the occupancy value acquisition module 220, the data reading module 230, and the occupancy statistics module 240 are all stored as program units in the memory, and the processor executes the above-mentioned program units stored in the memory to realize the corresponding functions.
[0113] The processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured; by adjusting kernel parameters, the inefficiency of determining application resource consumption can be addressed.
[0114] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0115] This application also provides a machine-readable storage medium storing instructions that cause a machine to execute the resource occupancy determination method described above.
[0116] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0117] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0118] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0119] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0120] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0121] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, like read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0122] Machine-readable storage media include both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0123] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0124] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for determining resource occupancy, characterized in that, The method for determining resource occupancy includes: In response to the received data recording instruction, the system records data from the data pool based on the timeline to obtain playback data. The data pool stores business logic data obtained during application runtime. Obtain the resource usage value of the application during runtime, wherein the resources include memory resources and video memory resources; When the resource usage reaches the target peak, the application reads the playback data. By utilizing the test nodes in the loading state to obtain the resource usage information when the application reads the playback data, resource usage statistics for all test nodes can be obtained.
2. The resource occupancy determination method according to claim 1, characterized in that, When the resource occupancy reaches the target peak, the process of reading the playback data using the application includes: When the resource occupancy reaches the target peak, respond to the received occupancy statistics command and check whether there is replay data; If the playback data is available, the application reads the playback data.
3. The resource occupancy determination method according to claim 2, characterized in that, The method for determining resource occupancy also includes: If the playback data is not available, a prompt message is generated, wherein the prompt message is used to indicate that the playback data is not available.
4. The resource occupancy determination method according to claim 1, characterized in that, The method involves using test nodes in a loading state to obtain resource usage information when the application reads the playback data, in order to obtain resource usage statistics for all test nodes, including: Each test node is configured to be in a loading state in sequence, and the resource usage information when the application reads the playback data is obtained using the test node in the loading state; Based on the resource usage information obtained from the test nodes, the name of the test nodes, and the status of the test nodes, resource usage statistics for all the test nodes are obtained.
5. The resource occupancy determination method according to claim 1, characterized in that, The method for determining resource occupancy also includes: Obtain the sorted list corresponding to all plugin nodes in the application; Based on the sorted list and the relationship between the plugin node and the test node, each test node is configured to be in a loading state in sequence.
6. The resource occupancy determination method according to claim 5, characterized in that, The method for determining resource occupancy also includes: Determine the state of each of the aforementioned plugin nodes; When the status of a plugin node changes, the status and name of each plugin node are sent to the application to display the application's business logic interface.
7. The resource occupancy determination method according to claim 1, characterized in that, The method for determining resource occupancy also includes: Based on the resource usage statistics, the application is processed to release memory resources and / or video memory resources.
8. A resource occupancy determination device, characterized in that, The resource occupancy determination device includes: The data recording module is used to respond to the received data recording command, record data in the data pool based on the time axis, and obtain playback data. The data pool stores business logic data obtained by the application during runtime. The resource usage acquisition module is used to acquire the resource usage value of the application during runtime, wherein the resources include memory resources and video memory resources; The data reading module is used to read the playback data using the application when the resource occupancy value reaches the target peak. The resource usage statistics module is used to obtain resource usage information when the application reads the playback data using the test nodes in the loading state, so as to obtain resource usage statistics information corresponding to all the test nodes.
9. A computing device, characterized in that, include: The memory is configured to store instructions; A processor is configured to retrieve the instructions from the memory and, when executing the instructions, to implement the resource occupancy determination method according to any one of claims 1 to 7.
10. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores instructions for causing the machine to perform the resource occupancy determination method according to any one of claims 1 to 7.