Performance test method, system and equipment for forwarding software product and medium
By collecting the usage of system resources and key process resources in real time and adopting an adaptive adjustment algorithm, the problems of non-dynamic parameter adjustment and inaccurate results in the performance testing of forwarding software products are solved, and automated and intelligent performance testing is realized, which improves test efficiency and accuracy.
Patent Information
- Application Number
- CN202510718444.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-09-26
AI Technical Summary
In the performance testing of existing forwarding software products, test parameters lack the ability to be dynamically adjusted, test results are not accurate enough, there is a lack of intelligent resource monitoring and analysis, reliance on manual analysis, test intervention time points are inappropriate, manual intervention is frequent, and it is difficult to achieve an automated closed loop.
A key indicator analysis mechanism is introduced to collect the usage of system resources and key process resources in real time, and test parameters are automatically adjusted through adaptive adjustment algorithms to achieve automation and intelligence of performance testing.
It improves the automation level of performance testing, reduces manual intervention, improves the accuracy and reliability of test results, optimizes resource utilization, reduces testing costs, and improves test efficiency and convergence speed.
Smart Images

Figure CN120705033A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of software testing, and in particular relates to a performance testing method, system, equipment and medium for a forwarding software product. Background Art
[0002] In the performance testing process of forwarding software products, traditional manual performance testing and existing performance testing tools have the following major problems.
[0003] Performance test parameter settings lack dynamic adjustment capabilities. Existing testing methods typically rely on predefined test parameters (such as the number of new connections, throughput, number of concurrent connections, and packet loss rate). These parameters are typically fixed and cannot be adjusted in real time based on the resource utilization of the system under test. If the initial test load is too high, it may cause resource bottlenecks and distort test results; if the load is too low, it may not fully test the system's maximum performance capabilities.
[0004] Test results are inaccurate, making it difficult to find optimal performance parameters. Because test parameters are fixed, it's impossible to find the optimal performance configuration through automated means, impacting the accuracy and stability of test results. Manual parameter adjustment requires multiple experiments and is susceptible to human error, making it difficult to converge on the optimal performance configuration.
[0005] Existing tools lack intelligent resource monitoring and analysis. Existing performance testing tools (such as Ixia Instruments, JMeter, and LoadRunner) primarily focus on stress testing and load generation, but lack intelligent monitoring and analysis of system resources (CPU, memory, I / O, network, etc.). These tools cannot automatically determine whether the resource utilization of the system under test is reasonable, nor can they adjust testing strategies based on resource usage.
[0006] Performance optimization relies on manual analysis, making it difficult to achieve an automated closed-loop. Existing testing methods often require manual analysis of test data, adjustment of test parameters, and rerunning of tests. This entire process relies heavily on the test engineer's experience, resulting in low efficiency and long turnaround times. This makes it difficult to achieve efficient automated tuning and quickly converge to stable and reliable performance test results.
[0007] Performance testing should generally begin only after product quality is relatively stable. Performance-related issues may be discovered late in the project, risking project delays.
[0008] While there are some commercial and open-source performance testing tools on the market, they fall short in certain scenarios. Common pain points include: These tools require significant manual intervention, such as writing and debugging test scripts and optimizing parameters. They cannot dynamically adjust load parameters based on real-time test data. Data analysis often relies on manual review, making automated problem identification difficult. The large number of parameters and indicators that require inspection can lead to omissions. Summary of the Invention
[0009] An object of the present invention is to provide a performance testing method, system, device and medium for a forwarding software product, which can solve at least one of the above-mentioned technical problems in the prior art.
[0010] According to a first aspect of the present invention, a performance testing method for a forwarding software product is provided, comprising:
[0011] Start performance testing according to the initial load parameters;
[0012] Obtaining usage of various resources during the test, including system resources and key process resources, wherein the key process is a process that implements forwarding capabilities;
[0013] When the usage of the multiple resources is abnormal, adjusting the load parameters according to the usage of the multiple resources;
[0014] Re-run the performance test based on the adjusted load parameters.
[0015] Optionally, the system resource usage includes the CPU usage of the entire machine, the memory usage of the entire machine, and the I / O load, and the resource usage of the key process includes the CPU usage of the key process;
[0016] When the usage of the multiple resources is abnormal, adjusting the load parameters according to the usage of the multiple resources includes:
[0017] Determine whether there are any abnormalities in the usage of each resource;
[0018] Adjust load parameters based on the usage of the resource experiencing the anomaly.
[0019] Optionally, obtaining usage of multiple resources during the test process includes:
[0020] Periodically obtain the usage of multiple resources at preset time intervals;
[0021] Determining whether the usage of each resource is abnormal includes:
[0022] When the usage of the target resource obtained three times in a row meets the preset conditions corresponding to the target resource, it is determined that there is no abnormality in the usage of the target resource;
[0023] When, in three consecutive acquisitions of target resource usage, at least one instance of target resource usage not meeting a preset condition corresponding to the target resource occurs, it is determined that the target resource usage is abnormal.
[0024] Optionally, adjusting the load parameters according to the abnormal resource usage includes:
[0025] Calculate the load parameter adjustment range corresponding to each abnormal resource usage;
[0026] The adjusted load parameter is calculated according to the weight corresponding to each abnormal resource and the load parameter adjustment range.
[0027] Optionally, the load parameter includes the number of newly established connections, and the respectively calculating the load parameter adjustment range corresponding to each abnormal usage of the resource includes:
[0028] Calculate the difference between the usage of the resource where the abnormality occurs and the threshold value corresponding to the resource where the abnormality occurs;
[0029] The load parameter adjustment amplitude is calculated according to the phase difference multiple and the load parameter.
[0030] Optionally, the method further includes:
[0031] Periodically obtain the PID record of the key process according to a preset time interval;
[0032] In the three consecutive acquired PID records of the key process, the PID of the key process changes in at least one case, and it is determined that the PID record of the key process is abnormal;
[0033] When an abnormality occurs in the PID record of the key process, the performance test is stopped.
[0034] Optionally, the method further includes:
[0035] Obtaining pre-configuration, including key process error log path, system error log path, system crash file path, and system error type;
[0036] Determine the number of key process error logs, the number of system error logs, the number of system crash files, and the number of errors of each system error type according to the pre-configuration;
[0037] The performance test is stopped when the number of critical process error logs, the number of system error logs, the number of system crash files, and the number of errors of each system error type continue to increase.
[0038] According to a second aspect of the present invention, a performance testing system for a forwarding software product is provided, comprising:
[0039] Performance testing module, used to start performance testing according to initial load parameters;
[0040] A resource monitoring module is used to obtain the usage of various resources during the test process, including system resources and key process resources. The key process is the process that realizes the forwarding capability;
[0041] An intelligent decision-making module, configured to adjust load parameters according to the usage of the multiple resources when an abnormality occurs in the usage of the multiple resources;
[0042] The performance testing module is further used to re-perform the performance test according to the adjusted load parameters.
[0043] According to a third aspect of the present invention, an electronic device is provided, comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of a performance testing method for a forwarding software product as described in the first aspect of the present invention are implemented.
[0044] According to a fourth aspect of the present invention, a readable storage medium is provided, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of a performance testing method for a forwarding software product as described in the first aspect of the present invention are implemented.
[0045] The beneficial effects of the present invention are as follows: the present invention introduces a key indicator analysis mechanism to collect the usage of system resources and key process resources in real time, and automatically adjusts test parameters based on resource occupancy through an adaptive adjustment algorithm to avoid resource overload or underutilization. The present invention can improve the degree of automation of performance testing, reduce manual intervention, and enable the adjustment and optimization process of test parameters to be automatically completed by the system. It improves the accuracy and reliability of test results and ensures that the test load meets the actual capabilities of the system under test. It optimizes resource utilization, improves test efficiency, reduces test costs, and reduces invalid tests and improves test convergence speed through key indicator perception and intelligent adjustment. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 The present invention provides a flow chart of a method for testing the performance of a forwarding software product.
[0047] Figure 2 Schematic diagram of a performance testing system in an embodiment of the present invention. DETAILED DESCRIPTION
[0048] Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that unless otherwise specifically stated, the relative arrangement of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention.
[0049] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
[0050] Techniques, methods, and apparatus known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and apparatus should be considered part of the specification. In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0051] It should be noted that like reference numerals and letters refer to like items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0052] In the present description, references to features referred to as "first" or "second" may explicitly or implicitly include one or more of these features. In the present description, unless otherwise specified, "plurality" means two or more. Furthermore, the term "and / or" in this specification refers to at least one of the connected entities, and the character " / " generally indicates an "or" relationship between the connected entities.
[0053] like Figure 1 As shown, this embodiment introduces a performance testing method for a forwarding software product, including steps 1100-1400.
[0054] Step 1100: Start performance testing according to initial load parameters.
[0055] Step 1200: Obtain usage of various resources during the test process, wherein the various resources include system resources and key process resources, and the key process is a process that implements forwarding capability.
[0056] like Figure 2As shown, the present invention performs performance testing on a WAF (Web Application Firewall) cluster system. System resources can include parameters such as the CPU (Central Processing Unit) usage rate of the entire machine, the memory usage rate of the entire machine, and the I / O (Input / Output) load. System resources are the resources occupied by all processes in the system under test. Key processes are the main processes that implement forwarding capabilities, such as nginx. Key process resources can include the CPU usage rate of key processes, the PID (Process Identifier) records of key processes, etc.
[0057] Monitoring key process resources ensures that processes are functioning as expected during stress testing. For example, if the overall CPU utilization during a stress test is 90%, the nginx process should be utilizing at least 85% of the CPU to indicate proper forwarding. If another process is utilizing 85% of the CPU while the nginx process is utilizing only 5%, this indicates an anomaly requiring investigation.
[0058] Step 1300: When the usage of the multiple resources is abnormal, adjust the load parameters according to the usage of the multiple resources.
[0059] Setting the load parameters too high or too low will cause abnormal usage of various resources.
[0060] Step 1400: Re-perform the performance test according to the adjusted load parameters.
[0061] After each round of testing, record the test results to facilitate analysis of abnormal situations. For example, you can set a fixed number of iterations and stop testing when continuous iterative testing still yields no results. You can then use the test data from each round to troubleshoot system issues.
[0062] After multiple rounds of testing, if the performance data is stable and the analysis data meets expectations, testing can be stopped. After analyzing the optimal load parameters, perform stress tests on these optimal load parameters 3-5 times to ensure that the test results are relatively stable. Only then can this load parameter be used as the final result. If a single unstable result occurs, record it in the test report for manual analysis.
[0063] The present invention introduces a key indicator analysis mechanism to collect the usage of system resources and key process resources in real time, and automatically adjusts test parameters based on resource occupancy through an adaptive adjustment algorithm to avoid resource overload or underutilization.
[0064] This invention improves the automation level of performance testing, reduces manual intervention, and enables the system to automatically adjust and optimize test parameters. This improves the accuracy and reliability of test results, ensuring that the test load matches the actual capabilities of the system under test. It also optimizes resource utilization, improves test efficiency, and reduces testing costs. Through key indicator awareness and intelligent adjustment, it reduces ineffective testing and accelerates test convergence.
[0065] This system uses an automated feedback loop to analyze key performance indicators during each test to see if they meet expectations. It automatically adjusts parameters and reruns the test until the results stabilize. Through multiple rounds of testing iterations, it automatically finds the optimal performance configuration without manual intervention, improving test efficiency and accuracy.
[0066] In this embodiment, the system resource usage includes the entire machine CPU usage, the entire machine memory usage, and the I / O load, and the resource usage of the key process includes the key process CPU usage.
[0067] The step 1300 includes steps 1310-1320.
[0068] Step 1310: Determine whether the usage of each resource is abnormal.
[0069] First, obtain the pre-configuration, expressed as a key and value. For example, if the machine's CPU usage threshold is 85%-95%, record the key a_CPU and the value 85_95. If the machine's memory usage is 85%-95%, record the key a_MEM and the value 85_95. If the disk usage is 0-95%, record the key a_DISK and the value 0_95.
[0070] The front-end configuration records the relevant information of various system resources and key process resources, and then determines whether anomalies occur based on the real-time resource usage.
[0071] During the test, the usage of various resources is periodically collected at preset intervals, for example, every 30 seconds. All indicators are monitored simultaneously, and the collection period remains consistent.
[0072] The step 1310 includes steps 1311 - 1312 .
[0073] Step 1311: When the usage of the target resource obtained three times in succession all meets the preset conditions corresponding to the target resource, it is determined that there is no abnormality in the usage of the target resource.
[0074] Step 1312: When, in three consecutive acquisitions of target resource usage, at least one instance of target resource usage not meeting a preset condition corresponding to the target resource occurs, it is determined that the target resource usage is abnormal.
[0075] For example, if the key a_CPU is sent and the value 80_95 is issued, it indicates that the overall CPU usage of the machine cannot fall below 85% and does not exceed 95%. If the overall CPU usage for 30 seconds returned by the resource monitoring module is 87%, it indicates that the primary threshold is met. Similarly, if the overall CPU usage for 30 seconds does not meet the threshold, it indicates that the primary threshold is not met. Once the primary threshold is met, another 30-second probe is performed to determine whether the primary threshold is met. If all three primary probes meet the threshold, the overall CPU task is considered to meet the threshold. If there is even one non-compliance, it is considered to be a multiple non-compliance, and the reason is recorded: the overall CPU usage does not meet the threshold.
[0076] The keys issued are a_MEM and a_DISK, and the judgment method is the same as a_CPU.
[0077] Step 1320: Adjust the load parameters according to the usage of the abnormal resource.
[0078] For abnormal indicators, you need to adjust the load parameters based on the abnormal indicators. For example, if the CPU usage and memory usage of the entire machine are abnormal, while other indicators are normal, adjust the load parameters based on the CPU usage and memory usage of the entire machine.
[0079] In this embodiment, step 1320 includes steps 1321-1322.
[0080] Step 1321: Calculate the load parameter adjustment range corresponding to each abnormal resource usage.
[0081] For example, the resource experiencing an abnormality is the overall CPU usage. This abnormality could be due to either excessive or insufficient CPU usage. In this case, adjust the load parameters based on the overall CPU usage. If the overall CPU usage is too high, the test stress is excessive, and the load parameters need to be lowered. If the overall CPU usage is too low, the test stress is insufficient, and the load parameters need to be increased.
[0082] Specifically, the load parameter includes the number of newly created connections, and step 1321 includes: calculating the difference multiple between the usage of the abnormal resource and the threshold corresponding to the abnormal resource; and calculating the load parameter adjustment range based on the difference multiple and the load parameter.
[0083] For example, if the CPU usage of the critical process nginx does not meet the 80%-95% threshold, and the current load parameter for new connections is 1000 CPS, the CPU usage of the critical process is 40%, which is twice as much as 80%, indicating that nginx is twice as idle. The algorithm can then directly double the load parameter, i.e., adjust the number of new connections to 2000 CPS. If, after adjusting to 2000 CPS, the CPU usage of the critical process nginx is 100%, indicating that nginx is too busy, the algorithm can then reduce the load parameter by 10%, i.e., 2000 CPS * (100% - 10%) = 1800 CPS. This process is repeated until the CPU usage of the critical process meets the expected threshold.
[0084] Step 1322: Calculate the adjusted load parameter according to the weight corresponding to each abnormal resource and the load parameter adjustment range.
[0085] When there are multiple resource usage anomalies, a weighted calculation is used to determine the final adjusted load parameter. For example, if there are abnormal CPU usage for a critical process, abnormal CPU usage for the entire machine, abnormal memory usage for the entire machine, or abnormal I / O load, and the load parameter adjustment for the critical process CPU usage is 1000 and the weight for the critical process CPU usage is 40%, then the weighted adjustment for the load parameter for the critical process CPU usage is 400. Similarly, a weighted calculation is performed for each of the remaining abnormal indicators to determine the final adjusted load parameter.
[0086] The present invention calculates the load parameter adjustment amplitudes corresponding to multiple abnormal indicators respectively, and then obtains the final adjusted load parameters through weighted calculation, fully considering the influence of different indicators. It can quickly obtain the load parameters that make all indicators meet the expectations, thereby improving test efficiency.
[0087] In this embodiment, the method also includes: periodically obtaining the PID record of the key process at a preset time interval; if the PID record of the key process has changed at least once in three consecutive times, determining that the PID record of the key process is abnormal; when the PID record of the key process is abnormal, stopping the performance test.
[0088] Use the PID records of key processes to determine whether a key process has restarted. If the PID of a key process changes, it indicates that the key process has restarted. During testing, key processes should not restart under any stress. If a key process restarts, stop the test and investigate the anomaly.
[0089] Information about key processes is also delivered in the form of keys and values, including the key process keyword, the number of key processes, and the CPU usage of key processes. For example, a key of "process_cpu_nginx_4" with a value of "80_99" is recorded, while a key of "process_cpu_vdata_1" with a value of "0_90" is recorded. The key contains the key process keyword and the number of key processes. For example, "process_cpu_nginx_4" indicates four Nginx processes, and the value indicates the CPU usage of the key process.
[0090] When the key issued is process_cpu_nginx_4, the key test needs to determine whether the critical process PID has changed. The resource monitoring module retrieves all PID records of the nginx process after extracting the nginx key. Each time the CPU usage of a critical process is determined, a PID record is obtained and compared with the previous record. If the PID remains unchanged, it indicates that the initial level meets expectations. Three checks are also required. If any of these checks fail, it is considered multiple failures and the reason is recorded: the PID of the critical process nginx has changed, and the process has restarted abnormally.
[0091] In this embodiment, the method further includes:
[0092] Obtaining pre-configuration, including key process error log path, system error log path, system crash file path, and system error type;
[0093] Determine the number of key process error logs, the number of system error logs, the number of system crash files, and the number of errors of each system error type according to the pre-configuration;
[0094] The performance test is stopped when the number of critical process error logs, the number of system error logs, the number of system crash files, and the number of errors of each system error type continue to increase.
[0095] The pre-configuration is expressed in key and value format.
[0096] Key process error log path, record key: log_nginx, value: / home / work / nginx / logs, record key: log_vdata, value: / home / work / vdata / logs. The key represents the key process, and the value represents the key process error log path.
[0097] System error log path, record key: log_sys, value: / var / logs / .
[0098] System crash file path, record key: core, value: / home / work / coredump.
[0099] System errors are recorded with the key "dmesg" and the value "segfault_out". The keyword in the value indicates the system error type and can include multiple system error types.
[0100] Based on the delivered key, value, and statistical data, analyze whether the number of error logs for each type of log is continuously increasing. If so, immediately record a non-conformance and explain the reason: "Continued increase in error logs; resolve first, then retest." The number of system crash files is determined in the same way as the number of error logs. For system error types, primarily determine the number of errors corresponding to each keyword in the value.
[0101] During performance testing, it is expected that no error logs should be generated. If the error logs continue to increase, it means that there may be an abnormality in the system function, and the problem needs to be investigated and resolved before continuing.
[0102] The present invention monitors various error log data during the test process, identifies errors and abnormal situations, assists in decision-making and optimizes the test, and can adjust the test strategy in time when errors and abnormalities occur, thereby improving test efficiency.
[0103] like Figure 2 As shown, this embodiment introduces a performance testing system for forwarding software products, including:
[0104] Performance testing module, used to start performance testing according to initial load parameters;
[0105] A resource monitoring module is used to obtain the usage of various resources during the test process, including system resources and key process resources. The key process is the process that realizes the forwarding capability;
[0106] An intelligent decision-making module, configured to adjust load parameters according to the usage of the multiple resources when an abnormality occurs in the usage of the multiple resources;
[0107] The performance testing module is further used to re-perform the performance test according to the adjusted load parameters.
[0108] The log analysis module collects various logs and determines whether any anomalies have occurred. The load control module and the intelligent decision-making module work together to adjust load parameters. The intelligent decision-making module calculates the load parameter adjustment range and sends it to the load control module for adjustment.
[0109] This embodiment introduces an electronic device, including a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of a performance testing method for a forwarding software product as described in any embodiment of the present invention are implemented.
[0110] This embodiment introduces a readable storage medium, which stores a program or instruction. When the program or instruction is executed by a processor, the steps of a performance testing method for a forwarding software product as described in any embodiment of the present invention are implemented.
[0111] Although some specific embodiments of the present invention have been described in detail by way of examples, it should be understood by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present invention. It should be understood by those skilled in the art that the above embodiments may be modified without departing from the scope and spirit of the present invention.
[0112] Those skilled in the art will appreciate that the modules and algorithm steps described in conjunction with the embodiments disclosed herein can be implemented using electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0113] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and equipment can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0114] In the embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules is merely a logical function division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0115] The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed across multiple network modules. Some or all of these modules may be selected according to actual needs to achieve the objectives of the embodiments of the present invention.
[0116] In addition, each functional module in the embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0117] If the functions are implemented in the form of software modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or the portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes various media that can store program code, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.
[0118] The above description is merely a preferred embodiment of the present application and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of the invention herein is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also encompasses other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the inventive concept. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features having similar functions disclosed in this application.
[0119] It should be understood that the size of the serial numbers of the steps in the content of the invention and the embodiments of the present invention does not absolutely mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention. The foregoing description of the implementation of the present disclosure has been given for the purpose of example and description. The foregoing description is not exhaustive and is not intended to limit the present disclosure to the exact form disclosed. Various variations and modifications may exist based on the above teachings, or various variations and modifications may be obtained from the practice of the present disclosure. These embodiments are selected and described in order to illustrate the principles of the present disclosure and its practical application, so that those skilled in the art can utilize the present disclosure in various embodiments and various modifications suitable for the specific purpose conceived.
Claims
1. A performance testing method for a forwarding software product, characterized in that: include: Start performance testing according to the initial load parameters; Obtaining usage of various resources during the test, including system resources and key process resources, wherein the key process is a process that implements forwarding capabilities; When the usage of the multiple resources is abnormal, adjusting the load parameters according to the usage of the multiple resources; Re-run the performance test based on the adjusted load parameters.
2. The method according to claim 1, characterized in that The system resource usage includes the CPU usage of the entire machine, the memory usage of the entire machine, and the I / O load. The resource usage of the key process includes the CPU usage of the key process. When the usage of the multiple resources is abnormal, adjusting the load parameters according to the usage of the multiple resources includes: Determine whether there are any abnormalities in the usage of each resource; Adjust load parameters based on the usage of the resource experiencing the anomaly.
3. The method according to claim 2, characterized in that The usage of various resources obtained during the test includes: Periodically obtain the usage of multiple resources at preset time intervals; Determining whether the usage of each resource is abnormal includes: When the usage of the target resource obtained three times in a row meets the preset conditions corresponding to the target resource, it is determined that there is no abnormality in the usage of the target resource; When, in three consecutive acquisitions of target resource usage, at least one instance of target resource usage not meeting a preset condition corresponding to the target resource occurs, it is determined that the target resource usage is abnormal.
4. The method according to claim 2, characterized in that The adjusting of load parameters according to the abnormal resource usage includes: Calculate the load parameter adjustment range corresponding to each abnormal resource usage; The adjusted load parameter is calculated according to the weight corresponding to each abnormal resource and the load parameter adjustment range.
5. The method according to claim 4, characterized in that The load parameter includes the number of newly established connections, and the calculation of the load parameter adjustment range corresponding to each abnormal resource usage includes: Calculate the difference between the usage of the resource where the abnormality occurs and the threshold value corresponding to the resource where the abnormality occurs; The load parameter adjustment amplitude is calculated according to the phase difference multiple and the load parameter.
6. The method according to claim 1, characterized in that The method further comprises: Periodically obtain the PID record of the key process according to a preset time interval; In the three consecutive acquired PID records of the key process, the PID of the key process changes in at least one case, and it is determined that the PID record of the key process is abnormal; When an abnormality occurs in the PID record of the key process, the performance test is stopped.
7. The method according to claim 1, characterized in that The method further comprises: Obtaining pre-configuration, including key process error log path, system error log path, system crash file path, and system error type; Determine the number of key process error logs, the number of system error logs, the number of system crash files, and the number of errors of each system error type according to the pre-configuration; The performance test is stopped when the number of critical process error logs, the number of system error logs, the number of system crash files, and the number of errors of each system error type continue to increase.
8. A performance testing system for forwarding software products, characterized in that: include: Performance testing module, used to start performance testing according to initial load parameters; A resource monitoring module is used to obtain the usage of various resources during the test process, including system resources and key process resources. The key process is the process that realizes the forwarding capability; An intelligent decision-making module, configured to adjust load parameters according to the usage of the multiple resources when an abnormality occurs in the usage of the multiple resources; The performance testing module is further used to re-perform the performance test according to the adjusted load parameters.
9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the performance testing method for a forwarding software product according to any one of claims 1 to 7 are implemented.
10. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the performance testing method for a forwarding software product according to any one of claims 1 to 7 are implemented.