Continuous pressure measurement monitoring method and device, medium and product
By building a stress testing environment on the system interface, regularly conducting performance testing and monitoring, and analyzing the changing trends of performance indicators, we solve the problem that performance problems in existing technologies are difficult to detect in advance, and achieve continuous monitoring and stability guarantee of interface performance.
Patent Information
- Application Number
- CN202410605820.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-15
- Publication Date
- 2024-08-27
AI Technical Summary
The performance testing of the system interface in the existing technology is limited to the test before delivery, and it is impossible to discover and solve performance problems that may arise in the daily iteration process in advance, resulting in a long problem repair cycle and affecting the normal work of customers and system stability.
Adopt a continuous stress testing monitoring method, build a stress testing environment, use preset scripts to regularly perform performance tests on the target interface, monitor the changing trends of performance indicators, analyze the reasons when a downward trend is found, save the results and issue early warnings to ensure application stability .
It realizes continuous monitoring of interface performance, discovers potential problems in advance, avoids performance risks, ensures application stability, shortens the problem repair cycle, and improves the reliability of the system's normal operation.
Smart Images

Figure CN118550806A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of performance testing, and in particular to a continuous stress testing monitoring method, device, medium and product. Background Art
[0002] Performance testing is to use automated testing tools to simulate a variety of normal, peak, and abnormal load conditions to test the performance of system interfaces. Existing performance tests on system target interfaces are generally only tested before delivery and only once. If there are no errors, they will be delivered and used. In the daily iteration process, if performance problems are encountered, they will be handed over to relevant staff for adjustment and processing. Although this approach can solve the problem, it cannot quickly discover the problem in advance, and the problem repair cycle will also be longer. If problems occur multiple times within a period of time, it may affect the normal work of customers and have poor stability. Summary of the invention
[0003] The purpose of the present invention is to provide a continuous stress testing monitoring method, device, medium and product to actively perform interface performance testing to ensure application stability.
[0004] To achieve the above object, the present invention provides the following solutions:
[0005] A continuous stress testing monitoring method, comprising:
[0006] Build a stress testing environment;
[0007] Use the preset stress test script to regularly perform performance tests on the target interface in the stress test environment to continuously obtain performance test indicator results;
[0008] Determine the target interface performance indicator data change trend based on multiple performance test indicator results within a preset time period;
[0009] When the target interface performance indicator data change trend is a downward trend, determining the cause of the target interface performance change;
[0010] Save all the performance test indicator results and the corresponding target interface performance change reasons.
[0011] Optionally, a performance test is performed on the target interface at regular intervals in the stress testing environment, specifically: an interface performance test task is automatically triggered at a predetermined time every day to perform a performance test on the target interface.
[0012] Optionally, the performance test indicator in the performance test indicator result is one or more of the number of request processing per second, the number of transaction requests per second, the request success rate, the average response time and the CPU usage rate.
[0013] Optionally, the target interface performance indicator data change trend is displayed in the form of a line graph.
[0014] Optionally, the method further includes: issuing an early warning when the performance test indicator result fails to meet the expected performance test indicator condition.
[0015] Optionally, the method further comprises:
[0016] The period for building the stress testing environment is: the target interface has been delivered to the customer, or the target interface has not been delivered to the customer;
[0017] When the target interface has been delivered to the customer, a stress testing environment is built in the cloud server.
[0018] A computer device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the continuous stress testing monitoring method.
[0019] A computer-readable storage medium stores a computer program, which implements the continuous stress testing monitoring method when executed by a processor.
[0020] A computer program product includes a computer program, which implements the continuous stress testing monitoring method when executed by a processor.
[0021] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0022] The present invention uses a preset stress test script to regularly perform performance tests on the target interface in a stress test environment, and continuously obtains performance test index results; based on multiple performance test index results within a preset time, the target interface performance index data change trend is determined; when the target interface performance index data change trend is a downward trend, the cause of the target interface performance change is determined to avoid performance risks in advance. The present invention can actively perform interface performance tests to ensure application stability. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0024] Figure 1 It is a flow chart of the continuous stress testing and monitoring method of the present invention. DETAILED DESCRIPTION
[0025] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0026] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0027] Example 1
[0028] like Figure 1 As shown, the present invention provides a continuous stress testing monitoring method, comprising:
[0029] Step 100, build a stress testing environment. Specifically, the period of building a stress testing environment is: the target interface has been delivered to the customer, or the target interface has not been delivered to the customer; when the target interface has been delivered to the customer, build a stress testing environment in the cloud server. Generally, the stress testing environment is temporarily built, and only stress testing is performed on interfaces that are required, and the stress testing is performed within a fixed time.
[0030] It should be noted that the interface is part of the software. When the system software is delivered to the customer, the interface will also be delivered to the customer. When the customer uses the system software, he calls the script inside the system software through the interface to execute the corresponding function.
[0031] Step 200, using a preset stress testing script, regularly performs performance testing on the target interface in the stress testing environment, and continuously obtains performance test indicator results.
[0032] Specifically, the target interface is regularly tested for performance in the stress test environment, which includes automatically triggering the interface performance test task at a predetermined time every day to perform a performance test on the target interface. For example, during the idle time between 0:00 and 7:00 a.m. every day, the interface performance test task is automatically triggered to perform subsequent stress tests.
[0033] Step 300, based on multiple performance test indicator results within a preset time period, determine the target interface performance indicator data change trend.
[0034] Specifically, the test indicators in the test indicator results are one or more of the number of requests processed per second (QPS, Query PerSecond, the number of requests processed per second), the number of transaction requests per second (TPS, Transactions Per Second, the number of transaction requests per second), the request success rate, the average response time and the CPU usage rate. It should be noted that a transaction is a collection of a group of requests made to complete a certain business or task. If a transaction contains only one request, TPS is the same as QPS; when a transaction contains multiple requests, TPS is different from QPS. The request success rate refers to the percentage of normal results among all the results returned. The average response time is the sum of the time it takes for the client to establish a connection with the server + the application processing time + the database time + the transmission time. In addition, the test indicators can also be memory, disk IO, etc. Generally, these real-time data can be seen in the task manager of the Windows system, which are all system resource usage indicators.
[0035] Furthermore, whether the target interface performance indicator data change trend is a downward trend or an upward trend can be judged based on the following methods: whether the performance indicator in the performance test indicator result is lower than the expected performance indicator (or the performance indicator at the previous moment), whether the resource occupancy indicator in the performance test indicator result is higher than the expected resource occupancy indicator (or the performance indicator at the previous moment), and other related requirements of the application or component set as needed. The QPS, TPS, request success rate, and average response time mentioned above are performance indicators, and CPU usage, memory, etc. are resource occupancy indicators.
[0036] Step 400: When the target interface performance indicator data change trend is a downward trend, determine the cause of the target interface performance change.
[0037] Step 500, saving all the performance test indicator results and the corresponding target interface performance change reasons.
[0038] In actual applications, all performance test indicator results and the corresponding reasons for the target interface performance changes are saved in the database. At the same time, a test report is written and sent to the corresponding staff by email for subsequent optimization.
[0039] In one example, the method further includes: issuing an early warning when the performance test indicator result does not meet the performance expected test indicator condition.
[0040] In another example, the target interface performance indicator data change trend is displayed in the form of a line graph. For example, if the preset time is one month, 30 test indicator results can be obtained, and the single performance indicator data (such as TPS or average response time, etc.) in the test indicator results can be plotted into a line graph, which can intuitively display the performance trend. Based on the line graph, the performance of the target interface can be directly judged, and then the corresponding problems can be determined and handled.
[0041] In summary, the present invention repeatedly executes the script multiple times to obtain performance indicator data (TPS, response time, etc.), and by continuously monitoring the changes in these performance indicator data, reversely infers whether the script performance has declined or improved, and then analyzes and optimizes the software system under test.
[0042] Example 2
[0043] A computer device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the continuous stress testing monitoring method in Example 1.
[0044] Example 3
[0045] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the continuous stress testing and monitoring method in Example 1.
[0046] Example 4
[0047] A computer program product includes a computer program, which implements the continuous stress testing monitoring method in Example 1 when executed by a processor.
[0048] Example 5
[0049] A computer device, which may be a database. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store pending transactions. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, the continuous pressure measurement monitoring method in Example 1 is implemented.
[0050] It should be noted that the object information (including but not limited to object device information, object personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the object or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0051] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited thereto.
[0052] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0053] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of the present invention. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A continuous stress test monitoring method, characterized in that the method include: Build a stress testing environment; Use the preset stress test script to regularly perform performance tests on the target interface in the stress test environment to continuously obtain performance test indicator results; Determine the target interface performance indicator data change trend based on multiple performance test indicator results within a preset time period; When the target interface performance indicator data change trend is a downward trend, determining the cause of the target interface performance change; Save all the performance test indicator results and the corresponding target interface performance change reasons.
2. The continuous stress testing and monitoring method according to claim 1, characterized in that: In the stress testing environment, a performance test is performed on the target interface at a regular interval, specifically, an interface performance test task is automatically triggered at a predetermined time every day to perform a performance test on the target interface.
3. The continuous stress testing and monitoring method according to claim 1, characterized in that: The performance test indicators in the performance test indicator results are one or more of the number of request processing per second, the number of transaction requests per second, the request success rate, the average response time and the CPU usage rate.
4. The continuous stress testing and monitoring method according to claim 1, characterized in that: The target interface performance indicator data change trend is displayed in the form of a line graph.
5. The continuous stress testing and monitoring method according to claim 1, characterized in that: The method also includes: issuing an early warning when the performance test indicator result does not meet the expected performance test indicator condition.
6. The continuous stress testing and monitoring method according to claim 1, characterized in that: The method also includes: The period for building the stress testing environment is: the target interface has been delivered to the customer, or the target interface has not been delivered to the customer; When the target interface has been delivered to the customer, a stress testing environment is built in the cloud server.
7. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the continuous stress testing and monitoring method according to any one of claims 1 to 6.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the continuous stress testing and monitoring method described in any one of claims 1 to 6 is implemented.
9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the continuous stress testing and monitoring method described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Continuous integration test data trend analysis method and system, computer and medium
CN113961553A
Pressure measuring method and pressure measuring device combining performance bottleneck positioning
CN114398272A
Pressure testing method, device and equipment and storage medium
CN114610597A
Automatic testing method and device and computer equipment
CN115248782A
