CN113742219A - Pressure regulation and performance test method, system and storage medium - Google Patents

Pressure regulation and performance test method, system and storage medium Download PDF

Info

Publication number
CN113742219A
CN113742219A CN202110899304.6A CN202110899304A CN113742219A CN 113742219 A CN113742219 A CN 113742219A CN 202110899304 A CN202110899304 A CN 202110899304A CN 113742219 A CN113742219 A CN 113742219A
Authority
CN
China
Prior art keywords
resource
pressure
performance testing
performance
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110899304.6A
Other languages
Chinese (zh)
Inventor
胡通
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Hangzhou Information Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Hangzhou Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile Hangzhou Information Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202110899304.6A priority Critical patent/CN113742219A/en
Publication of CN113742219A publication Critical patent/CN113742219A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment

Abstract

The invention discloses a pressure regulation and performance test method, a system and a storage medium, which relate to the technical field of system test, wherein the pressure regulation method comprises the following steps: acquiring state information when the performance testing system applies pressure to the tested system, judging whether the pressure adjusting condition is met, if so, acquiring a resource variable according to a preset adjusting rule, and finally adjusting the pressure generated by the performance testing system by using elastic cloud according to the resource variable; the performance test method comprises the following steps: and applying pressure to the system to be tested to perform performance test on the system to be tested to obtain a performance test result, and adjusting the pressure generated by the performance test system by using a pressure adjusting method. The invention solves the problem that the system performance test tool in the prior art can not flexibly adjust the load pressure, and realizes the purpose of automatically adjusting the load pressure when the performance test is carried out on the tested system.

Description

Pressure regulation and performance test method, system and storage medium
Technical Field
The invention relates to the technical field of system testing, in particular to a pressure adjusting and performance testing method, a system and a storage medium.
Background
With the increase of various application systems and the gradual complexity of the functions thereof, in order to ensure the stability of the application systems, performance tests need to be performed on the application systems, and a general performance test tool is generally adopted. The existing system performance testing tool can set the pressure applied to the tested system according to the scale of the daily operation activities of the tested system, thereby carrying out performance tests of different degrees.
At present, when performance tests of different degrees are carried out, the pressure applied to a tested system can be changed after different quantities of pressure resources are required to be applied. The method has the problems of low resource utilization rate and high labor cost.
Disclosure of Invention
The main purposes of the invention are as follows: the utility model provides a pressure regulation and performance test method, system and storage medium, aiming at solving the technical problem that the system performance test tool in the prior art can not flexibly regulate the load pressure.
In order to achieve the purpose, the invention adopts the following technical scheme:
in a first aspect, the present invention provides a pressure adjustment method applied to a performance testing system, the method including:
acquiring state information when the performance testing system applies pressure to a tested system;
judging whether a pressure adjusting condition is met or not according to the state information;
if the pressure regulation condition is met, acquiring a resource variable according to a preset regulation rule;
and adjusting the pressure generated by the performance test system by using the elastic cloud according to the resource variable.
Optionally, in the pressure adjustment method, the status information includes a resource utilization rate; the pressure adjustment condition comprises a resource expansion condition and a resource reduction condition;
the step of judging whether a pressure regulation condition is met according to the state information specifically includes:
and judging whether a resource expansion condition or a resource reduction condition is met according to the resource utilization rate.
Optionally, in the pressure adjustment method, the step of determining whether a resource expansion condition is satisfied according to the resource utilization rate specifically includes:
obtaining a first fluctuation deviation value according to the resource utilization rate and a first preset expected value;
judging whether the duration of the first fluctuation deviation value larger than a first allowable value reaches a first preset duration or not, and judging whether the duration of the resource utilization rate larger than a first preset threshold value reaches a second preset duration or not;
and if the duration of the first fluctuation deviation value which is greater than the first allowable value reaches a first preset duration and the duration of the resource utilization rate which is greater than the first preset threshold value reaches a second preset duration, judging that a resource expansion condition is met.
Optionally, in the pressure adjustment method, the step of determining whether a resource reduction condition is met according to the resource utilization rate specifically includes:
obtaining a second fluctuation deviation value according to the resource utilization rate and a second preset expected value;
judging whether the duration of the second fluctuation deviation value larger than a second allowable value reaches a third preset duration or not, and judging whether the duration of the resource utilization rate smaller than a second preset threshold value reaches a fourth preset duration or not;
and if the duration of the second fluctuation deviation value which is greater than the second allowable value reaches a third preset duration and the duration of the resource utilization rate which is less than the second preset threshold value reaches a fourth preset duration, judging that a resource reduction condition is met.
Optionally, in the pressure adjustment method, the preset adjustment rule includes a resource expansion rule and a resource reduction rule, and the resource variable includes a resource increment and a resource decrement;
if the pressure regulation condition is met, obtaining a resource variable according to a preset regulation rule, specifically comprising:
if the resource expansion condition is met, acquiring a resource increment according to the resource expansion rule; or
And if the resource reduction condition is met, obtaining resource reduction according to the resource reduction rule.
In a second aspect, the present invention provides a performance testing method applied to a performance testing system, the method including:
applying pressure to a system to be tested to perform performance test on the system to be tested to obtain a performance test result;
the pressure generated by the performance testing system is regulated using the pressure regulation method described above.
Optionally, in the performance testing method, the step of applying pressure to the system under test to perform performance testing on the system under test to obtain a performance testing result specifically includes:
initiating an asynchronous request based on the elastic cloud, and sending the asynchronous request to a tested system;
acquiring log information of the tested system for processing the asynchronous request;
counting the log information to obtain statistical data of the tested system;
and obtaining a performance test result of the tested system according to the statistical data and a preset performance index.
In a third aspect, the present invention provides a performance testing system, comprising:
the performance testing device is used for applying pressure to a tested system so as to perform performance testing on the tested system and obtain a performance testing result;
and the pressure regulating device is used for regulating the pressure generated by the performance testing device by using the pressure regulating method.
Optionally, in the performance testing system, the performance testing apparatus includes:
the pressure generation module is used for initiating an asynchronous request based on the elastic cloud and sending the asynchronous request to a tested system;
the first storage module is used for acquiring the log information of the tested system for processing the asynchronous request;
the log statistical module is used for carrying out statistics on the log information to obtain statistical data of the tested system;
and the test result module is used for obtaining a performance test result of the tested system according to the statistical data and a preset performance index.
In a fourth aspect, the invention provides a storage medium having stored thereon a computer program executable by one or more processors to implement a method as described above.
One or more technical solutions provided by the present invention may have the following advantages or at least achieve the following technical effects:
according to the pressure adjusting and performance testing method, system and storage medium, the state information of the performance testing system when applying pressure to the tested system is obtained, whether the pressure adjusting condition is met or not is judged according to the state information, if yes, the resource variable is obtained according to the preset adjusting rule, and therefore according to the resource variable, the pressure generated by the performance testing system is adjusted through elastic cloud, the pressure applied to the tested system by the performance testing system is flexibly adjusted while the pressure applied to the tested system is subjected to performance testing, the performance of the tested system is fully tested, and the accuracy of the performance testing is improved; and the effect of carrying out performance test on the tested system based on the asynchronous request sent by the performance test system is also realized.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a schematic flow chart of a first embodiment of the pressure regulating method of the present invention;
FIG. 2 is a schematic diagram of a hardware configuration of a performance testing system according to the present invention;
FIG. 3 is a schematic flow chart of a first embodiment of a performance testing method according to the present invention;
fig. 4 is a detailed flowchart of step S210 in fig. 3.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that, in the present invention, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element. In addition, in the present invention, if there is a description referring to "first", "second", etc., the description of "first", "second", etc. is for descriptive purposes only and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature.
In the present invention, suffixes such as "module", "part", or "unit" used to represent elements are used only for facilitating the description of the present invention, and have no specific meaning in themselves. Thus, "module", "component" or "unit" may be used mixedly. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations. In addition, the technical solutions of the respective embodiments may be combined with each other, but must be realized by those skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination of technical solutions should be considered to be absent and not be within the protection scope of the present invention.
Analysis of the prior art finds that with the increase of various application systems and computer software and the gradual complexity of their functions, performance tests need to be performed on these application systems and software to ensure the stability of the application systems and software, and general performance testing tools, such as loadrun, JMETER and other testing software, are generally used. The test software is mainly used for initiating synchronous requests of different protocol types such as SOCKET, HTTP, WEBSOCKET and the like to a tested system for performance test. The main principle is that a multithreading or process concurrency mechanism is adopted, and a virtual user is simulated through a thread or a process to concurrently initiate a request to a tested system, however, the performance testing tool can wait until a response of the request is not obtained, a new round of request cannot be carried out, and the waiting is not finished until the response of the tested system is received, and a new round of request is carried out, namely further performance testing is carried out, so that the general performance testing tools easily have the problems that large pressure flow cannot be initiated normally or a response of a returned request cannot be analyzed and counted. That is, when the existing performance testing tool performs a performance test on a system under test, the performance test on a synchronous communication system under test supporting different protocol types can be realized, but the performance test on a system under test of an asynchronous communication type or a system under test having a request sending path and a response returning path different from each other cannot be realized.
The existing system performance testing tool can also set the pressure applied to the tested system according to the scale of the daily operation activities of the tested system, thereby carrying out performance tests of different degrees. At present, when performance tests of different degrees are carried out, the pressure applied to a tested system can be changed only after a pressure generation module in a performance test tool applies for different quantities of pressure resources. The mode that the pressure is applied can be changed manually after the application is required, and the problems of low resource utilization rate and high labor cost exist.
For the above problems, the prior art also has some improved methods, for example, a connection channel between the test system and the system under test is established in advance, and a transaction request message sent by the general performance testing tool in a synchronous transaction manner is received; and then the transaction request message is sent to the tested system through the connecting channel in an asynchronous transaction mode. The method tests the performance of the tested system by converting the synchronous transaction pressure of the universal performance testing tool into asynchronous transaction pressure, thereby realizing the test work of the asynchronous system. However, this method still has some problems:
1. the method has high complexity, needs to additionally modify the tested system, and has the problems of high cost and risk of causing adverse effects on the tested system.
2. The method does not fully consider how to guarantee the performance bottleneck of the starting end of the asynchronous request pressure, and has a defect in the requirement on high pressure test.
In view of the technical problems that a system performance testing tool in the prior art cannot flexibly adjust load pressure and cannot perform performance testing on asynchronous requests, the invention correspondingly provides a pressure adjusting method and a performance testing method, and the general idea is as follows:
all applied to a performance testing system, wherein the pressure adjusting method comprises the following steps:
acquiring state information when the performance testing system applies pressure to a tested system;
judging whether a pressure adjusting condition is met or not according to the state information;
if the pressure regulation condition is met, acquiring a resource variable according to a preset regulation rule;
and adjusting the pressure generated by the performance test system by using the elastic cloud according to the resource variable.
The performance test method comprises the following steps:
applying pressure to a system to be tested to perform performance test on the system to be tested to obtain a performance test result;
and adjusting the pressure generated by the performance testing system by using the pressure adjusting method.
According to the technical scheme, the state information of the performance testing system when applying pressure to the tested system is obtained, whether the pressure adjusting condition is met or not is judged according to the state information, if yes, the resource variable is obtained according to the preset adjusting rule, and therefore according to the resource variable, the pressure generated by the performance testing system is adjusted through the elastic cloud, the pressure applied to the tested system by the performance testing system is flexibly adjusted while the pressure applied to the tested system is subjected to performance testing, the performance of the tested system is fully tested, and the accuracy of the performance testing is improved; and the effect of carrying out performance test on the tested system based on the asynchronous request sent by the performance test system is also realized.
Example one
Referring to the flow chart diagram of fig. 1, a first embodiment of the pressure regulating method of the present invention is presented, which is applied to a performance testing system.
Fig. 2 is a schematic diagram of the connection of the performance testing system. The system comprises a performance testing device 1001 and a pressure adjusting device 1002;
a performance testing apparatus 1001, configured to apply pressure to a system under test to perform a performance test on the system under test, so as to obtain a performance test result;
and the pressure adjusting device 1002 is used for adjusting the pressure generated by the performance testing device.
Specifically, the performance testing system may further include:
a data storage device 1003 for storing various types of data, which may include, for example, instructions of any application program or method in the performance testing system and data related to the application program, and optionally, the data storage device 1003 may be a high-speed RAM memory, or may be a stable memory, such as a disk memory, disposed inside the performance testing device 1001 and/or the pressure regulating device 1002, and the data storage device 1003 may also be a storage device independent of the performance testing device 1001 and the pressure regulating device 1002, that is, all data of the performance testing device 1001 and the pressure regulating device 1002 are stored in the data storage device 1003;
a communication bus 1004 for implementing connection communication between these devices.
Those skilled in the art will appreciate that the components shown in FIG. 2 are not intended to be limiting of the performance testing system of the present invention and may include more or fewer components than shown, or some components may be combined, or a different arrangement of components.
Specifically, the pressure adjusting means 1002 may call a computer program stored in the data storage means 1003, and perform the following operations:
acquiring state information when the performance testing system applies pressure to a tested system;
judging whether a pressure adjusting condition is met or not according to the state information;
if the pressure regulation condition is met, acquiring a resource variable according to a preset regulation rule;
and adjusting the pressure generated by the performance test system by using the elastic cloud according to the resource variable.
The performance testing apparatus 1001 may call a computer program stored in the data storage apparatus 1003, and perform the following operations:
applying pressure to a system to be tested to perform performance test on the system to be tested to obtain a performance test result;
the pressure generated by the performance testing system is regulated by a pressure regulation method in conjunction with the pressure regulation device 1002.
Based on the performance testing system, the pressure adjusting method of the present embodiment is described in detail below with reference to the flow chart shown in fig. 1. The method may comprise the steps of:
step S110: and acquiring state information when the performance testing system applies pressure to the tested system.
Specifically, the state information includes resource utilization; the tested system can be a computer software, a webpage system and other business systems.
If the performance testing device of the performance testing system continuously outputs the pressure request to the system under test without monitoring and adjusting, a performance bottleneck may occur before the system under test occurs in the performance testing device, thereby resulting in an inaccurate performance testing result. Therefore, when the performance testing system applies pressure to the system under test, the third database of the data storage device, i.e., the INFLUXDB timing database, actively collects status information of the device in which the performance testing device is deployed. In this embodiment, the device for deploying the performance testing apparatus may be an elastic cloud server, and therefore, the INFLUXDB time sequence database actively collects the cloud resource consumption condition of the elastic cloud server, so that the pressure adjusting apparatus obtains real-time monitoring data from the data storage apparatus, that is, the cloud resource utilization rate of the elastic cloud server, to determine the subsequent pressure adjusting condition.
Step S120: judging whether a pressure adjusting condition is met or not according to the state information;
specifically, the pressure adjustment condition includes a resource expansion condition and a resource reduction condition; the step S120 may include:
and judging whether a resource expansion condition or a resource reduction condition is met according to the resource utilization rate.
Under the real condition, the utilization rate of the CPU is dynamic, namely, the utilization rate of the CPU changes in an up-down floating manner, so that a method for correspondingly adjusting resources based on state feedback is designed, the load intensity of the next time sequence is dynamically adjusted in real time, and the utilization rate of the CPU resources of the cloud server of the performance testing device tends to an expected value.
Specifically, the load regulation mainly has two important factors, namely, a real value of the CPU resource consumption of the elastic cloud server where the pressure generation module is located at a certain time is represented by R, and an ideal expected value of the CPU resource consumption of the elastic cloud server is represented by E. R is obtained in real time by a scripting tool and E is considered predefined. Based on the two important factors, a fluctuation deviation value U of the resource utilization rate can be calculated, and the calculation formula is as follows:
Figure BDA0003198397380000081
where Abs represents the absolute value of the calculation.
In one embodiment, the step S120 may include:
step A1: obtaining a first fluctuation deviation value according to the resource utilization rate and a first preset expected value;
step A2: judging whether the duration of the first fluctuation deviation value larger than a first allowable value reaches a first preset duration or not, and judging whether the duration of the resource utilization rate larger than a first preset threshold value reaches a second preset duration or not;
step A3: and if the duration of the first fluctuation deviation value which is greater than the first allowable value reaches a first preset duration and the duration of the resource utilization rate which is greater than the first preset threshold value reaches a second preset duration, judging that a resource expansion condition is met.
Specifically, when it is necessary to trigger the expansion of resources, it is necessary to use as many CPUs as possible without triggering the resource expansion rule of the elastic cloud.
In this embodiment, the desired expected value of the CPU utilization is set to 75%, i.e., the first predetermined expected value E175 according to real-time resource utilization rate R1And a first preset desired value E1Obtaining a first fluctuation deviation value by using the fluctuation deviation value calculation formula
Figure BDA0003198397380000091
Other setting values can be set according to actual conditions, for example, setting the first allowable value to be 10%, setting the first preset threshold value to be 80%, setting the first preset time length to be 120s, and setting the second preset time length to be 120 s;
at this time, the first fluctuation deviation value U needs to be determined1Whether the duration time greater than the first allowable value 10 reaches 120s, and judging the resource utilization rate R1If the duration time greater than the first preset threshold value 80 reaches 120s, if U is greater than the first preset threshold value 801A duration of greater than 10 of 120s, and R1Greater than 80When the duration of the time reaches 120s, triggering a resource expansion rule of the elastic cloud, and expanding the resource pressure applied to the tested system by the performance testing device. If one of the determination conditions is not satisfied, the resource expansion rule of the elastic cloud cannot be triggered, and the process returns to step S110 to continuously acquire the state information of the next time sequence.
In another embodiment, the step S120 may include:
step B1: obtaining a second fluctuation deviation value according to the resource utilization rate and a second preset expected value;
step B2: judging whether the duration of the second fluctuation deviation value larger than a second allowable value reaches a third preset duration or not, and judging whether the duration of the resource utilization rate smaller than a second preset threshold value reaches a fourth preset duration or not;
step B3: and if the duration of the second fluctuation deviation value which is greater than the second allowable value reaches a third preset duration and the duration of the resource utilization rate which is less than the second preset threshold value reaches a fourth preset duration, judging that a resource reduction condition is met.
In particular, when it is desired to trigger a resource reduction, it is desirable to use the CPU with less pressure without triggering the resource reduction rules of the elastic cloud.
In this embodiment, the desired expected value of the CPU utilization is set to 25%, that is, the second predetermined expected value E225, according to real-time resource utilization rate R2And a first preset desired value E2Obtaining a second fluctuation deviation value by using the fluctuation deviation value calculation formula
Figure BDA0003198397380000101
Other setting values can be set according to actual conditions, for example, the second allowable value is set to be 25%, the second preset threshold value is set to be 20%, the third preset time duration is set to be 120s, and the fourth preset time duration is also set to be 120 s;
at this time, the second fluctuation deviation value U needs to be determined2Whether the duration of time greater than the second allowable value 25 reaches 120s, and determining the resource utilization rate R2Less than the second preIf the duration of the threshold value 20 reaches 120s, if U is reached2A duration of greater than 25 reaches 120s, and R2If the duration less than 20 reaches 120s, the resource reduction rule of the elastic cloud is triggered, and the resource pressure applied to the system under test by the performance testing device can be reduced. If one of the determination conditions is not satisfied, the resource reduction rule of the elastic cloud cannot be triggered, and the process returns to step S110 to continuously obtain the state information of the next time sequence.
Step S130: and if the pressure regulation condition is met, acquiring a resource variable according to a preset regulation rule.
Specifically, the preset adjustment rule includes a resource expansion rule and a resource reduction rule, and the resource variable includes a resource increment and a resource decrement.
Specifically, to calculate the variable of the load applied to the system under test that the performance testing apparatus should adjust in the next cycle request sequence, the performance testing apparatus may adjust the applied pressure by expanding or reducing resources in a targeted manner, and therefore, the resource variable needs to be calculated.
In a specific embodiment, the step S130 may include:
step S131: if the resource expansion condition is met, acquiring a resource increment according to the resource expansion rule; or
Step S132: and if the resource reduction condition is met, obtaining resource reduction according to the resource reduction rule.
Specifically, for the test requirements of different tested systems, the performance test device is adjusted to expand or reduce resources correspondingly, and then the resource variables are calculated according to the corresponding resource expansion rules or resource reduction rules, that is, the resource increment or resource decrement is obtained through calculation.
In this embodiment, a resource extension rule for extending the CPU resource by 10% when the resource extension condition is satisfied may be set, and the resource increment at this time is 10; and a resource reduction rule for reducing the CPU resource by 10% when the resource reduction condition is met can be set, and the resource reduction is 10 at the moment, so that the performance of the pressure generation module is ensured, and the resource waste is avoided.
Step S140: and adjusting the pressure generated by the performance test system by using the elastic cloud according to the resource variable.
Specifically, if the resource increment is obtained in step S130, it indicates that the pressure generated by the pressure generating module in the performance testing apparatus needs to be expanded, and if the resource decrement is obtained in step S130, it indicates that the pressure generated by the pressure generating module in the performance testing apparatus needs to be reduced, so that the dynamic load adjustment is realized, and the problem of performance bottleneck of the performance testing apparatus itself is effectively avoided.
According to the pressure adjusting method provided by the embodiment, the state information of the performance testing system when applying pressure to the tested system is obtained, whether the pressure adjusting condition is met or not is judged according to the state information, if yes, the resource variable is obtained according to the preset adjusting rule, and therefore the pressure generated by the performance testing system is adjusted by utilizing the elastic cloud according to the resource variable, the pressure applied to the tested system by the performance testing system is flexibly adjusted while the performance testing is performed on the applied pressure of the tested system, the performance of the tested system is fully tested, and the accuracy of the performance testing is improved; and the effect of carrying out performance test on the tested system based on the asynchronous request sent by the performance test system is also realized. By means of the elastic cloud and the load dynamic adjusting algorithm, the load pressure can be flexibly and automatically adjusted, cloud machine resources can be fully and efficiently stretched, the performance of a load pressure generating module in a performance testing system is guaranteed, and the performance of a performance testing device is improved, so that the effectiveness and the accuracy of a performance testing result are improved, and the problem that the pressure load cannot be automatically and flexibly adjusted by a current testing tool is solved.
Example two
Based on the same inventive concept, on the basis of the first embodiment, referring to fig. 3, a first embodiment of the performance testing method of the present invention is provided, and the performance testing method is applied to a performance testing system.
Based on the performance testing system described in the first embodiment, the following describes the performance testing method of this embodiment in detail with reference to the flowchart shown in fig. 3. The method may comprise the steps of:
step S210: and applying pressure to the system to be tested to perform performance test on the system to be tested to obtain a performance test result.
Specifically, referring to the detailed flowchart of fig. 4, the step S210 may include:
step S211: initiating an asynchronous request based on the elastic cloud, and sending the asynchronous request to a tested system;
step S212: acquiring log information of the tested system for processing the asynchronous request;
step S213: counting the log information to obtain statistical data of the tested system;
step S214: and obtaining a performance test result of the tested system according to the statistical data and a preset performance index.
Specifically, the performance testing device configures an asynchronous request library AIOHTTP by using the elastic cloud server, initiates an asynchronous request, sends the asynchronous request to a tested system, and marks each request to simulate an asynchronous pressure request when sending the request;
after receiving the request, the tested system processes the request by itself, at this time, after the request is sent to the tested system, the request may not directly return a response result to the performance testing device, or the performance testing device may not directly obtain a state of the request response, in the face of this situation, the tested system may send log information such as a request response log to a first database of the data storage device, that is, an elastic search database for storage, and the log information may include response state information, sending time, response receiving time, processing time, and the like of each request;
then, the performance testing device acquires the log information from a second database of the data storage device, and then uses big data processing technologies such as a real-time log processing technology HADOOP and a data analysis technology PANDAS to firstly block the log information, then calculates the statistical information of asynchronous requests in parallel, after classification and summarization, obtains the statistical data such as the response time of the asynchronous requests, the total sending number of the asynchronous requests, the success rate of response of the asynchronous requests, and caches the statistical data in the second database of the data storage device, namely a REDIS cache database;
and finally, the performance testing device acquires the statistical data and the preset performance index pre-stored in the second database from the second database of the data storage device, and compares the preset performance index with the real-time statistical data to test the performance of the tested system, so as to obtain the performance testing result of the tested system.
Step S220: the pressure generated by the performance testing system is regulated using the pressure regulation method as described in example one.
In the above method, for further details in the specific implementation of step S200, reference may be made to the description of the specific implementation of the first embodiment, and for brevity of the description, repeated descriptions are not repeated here.
In the performance testing method provided by this embodiment, an asynchronous request is initiated by an elastic cloud, and the asynchronous request is sent to a system under test, then log information of the system under test for processing the asynchronous request is obtained, statistics is performed to obtain statistical data, and then a performance testing result of the system under test is obtained after comparison according to the statistical data and a preset performance index; the purpose of performance test in combination with the asynchronous request of the elastic cloud is achieved, and the problem that the load of the asynchronous request cannot be truly and effectively counted and supported by the conventional test tool is solved.
The performance testing method provided by this embodiment initiates an asynchronous request by using an asynchronous request library AIOHTTP, and combines with a real-time log processing technique HADOOP and a data analysis technique PANDAS to complete automatic statistical calculation of performance indexes of the asynchronous request, and outputs the performance indexes to a high-performance cache database REDIS for storage, thereby solving the problem that asynchronous request responses cannot be counted, and having the advantage of fast result query speed. In the embodiment, on one hand, the performance test result of the asynchronous request is calculated based on log analysis statistics, and the asynchronous pressure test can be quickly carried out on the tested system by combining high-performance cache and big data calculation, and the method is almost zero in modification, so that the method has the advantage of low cost; on the other hand, the method combines the elastic cloud to carry out self-adaptive load adjustment, fully ensures the performance of the asynchronous request load pressure generation module, improves the accuracy of performance test, makes up the technical blank that the asynchronous request cannot effectively carry out the performance test, enriches the performance test means and modes, improves the scalability and reusability of the pressure generation module in the performance test device on the basis of meeting the service level protocol, helps enterprises and users to save resources and labor cost, and ensures the accuracy of the performance test result.
EXAMPLE III
Based on the same inventive concept, referring to fig. 2, a connection diagram of a performance testing system according to embodiments of the present invention is shown. The embodiment provides a performance testing system, which comprises a performance testing device 1001 and a pressure regulating device 1002;
a performance testing apparatus 1001, configured to apply pressure to a system under test to perform a performance test on the system under test, so as to obtain a performance test result;
the pressure adjusting device 1002 is configured to adjust the pressure generated by the performance testing device, specifically, adjust the pressure generated by the performance testing device, by using the pressure adjusting method as described above.
Specifically, the performance testing system may further include:
a data storage device 1003 for storing various types of data, which may include, for example, instructions of any application or method in the performance testing system and data related to the application, and optionally, the data storage device 1003 may be implemented by any type of volatile or non-volatile storage device or combination thereof, such as a Static Random Access Memory (SRAM), an Erasable Programmable Read-Only Memory (EPROM), a Programmable Read-Only Memory (PROM), a Read-Only Memory (ROM), a magnetic Memory, a flash Memory, a magnetic disk or an optical disk, which are disposed inside the performance testing device 1001 and/or the pressure regulating device 1002; the data storage device 1003 may be a storage device independent from the performance test device 1001 and the pressure adjustment device 1002, that is, all data of the performance test device 1001 and the pressure adjustment device 1002 may be stored in the data storage device 1003;
a communication bus 1004 for implementing connection communication between these devices.
Specifically, the performance testing device 1001 and the pressure adjusting device 1002 may be virtual devices, or may be terminal devices or network devices that can implement network connection, specifically, terminal devices such as a mobile phone, a computer, a tablet computer, and a portable computer, or network devices such as a server and a cloud platform.
When the performance testing apparatus 1001 and the pressure adjusting apparatus 1002 are terminal devices or network devices, each of the performance testing apparatus 1001 and the data storage apparatus 1003 may include a processor for calling a computer program stored in the data storage apparatus 1003 and executing the performance testing method and the pressure adjusting method, respectively. The Processor may be an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a controller, a microcontroller, a microprocessor, or other electronic components.
When the performance testing apparatus 1001 and the pressure adjusting apparatus 1002 are virtual apparatuses, the performance testing apparatus 1001 may include:
the pressure generation module is used for initiating an asynchronous request based on the elastic cloud and sending the asynchronous request to a tested system;
the first storage module is used for acquiring the log information of the tested system for processing the asynchronous request;
the log statistical module is used for carrying out statistics on the log information to obtain statistical data of the tested system;
and the test result module is used for obtaining a performance test result of the tested system according to the statistical data and a preset performance index.
The pressure adjusting means 1002 may include:
the information acquisition module is used for acquiring state information when the performance test system applies pressure to a tested system;
the condition judgment module is used for judging whether the pressure regulation condition is met or not according to the state information;
the variable acquisition module is used for acquiring a resource variable according to a preset regulation rule if the pressure regulation condition is met;
and the pressure adjusting module is used for adjusting the pressure generated by the performance testing system by using the elastic cloud according to the resource variable.
Further, the state information includes resource utilization; the pressure adjustment condition comprises a resource expansion condition and a resource reduction condition;
the condition judgment module is specifically configured to: and judging whether a resource expansion condition or a resource reduction condition is met according to the resource utilization rate.
Still further, the condition determining module may include:
the first fluctuation deviation value calculation unit is used for obtaining a first fluctuation deviation value according to the resource utilization rate and a first preset expected value;
the resource expansion condition judging unit is used for judging whether the duration of the first fluctuation deviation value larger than a first allowable value reaches a first preset duration or not and judging whether the duration of the resource utilization rate larger than a first preset threshold value reaches a second preset duration or not;
and the first judgment result unit is used for judging that the resource expansion condition is met if the duration of the first fluctuation deviation value greater than the first allowable value reaches a first preset duration and the duration of the resource utilization rate greater than the first preset threshold value reaches a second preset duration.
Still further, the condition determining module may further include:
the second fluctuation deviation value calculation unit is used for obtaining a second fluctuation deviation value according to the resource utilization rate and a second preset expected value;
a resource reduction condition judgment unit, configured to judge whether the duration that the second fluctuation deviation value is greater than a second allowable value reaches a third preset duration, and judge whether the duration that the resource utilization rate is less than a second preset threshold reaches a fourth preset duration;
and the second judgment result unit is used for judging that the resource reduction condition is met if the duration of the second fluctuation deviation value greater than the second allowable value reaches a third preset duration and the duration of the resource utilization rate less than the second preset threshold value reaches a fourth preset duration.
Further, the preset regulation rule comprises a resource expansion rule and a resource reduction rule, and the resource variable comprises a resource increment and a resource decrement; the variable acquisition module may include:
a resource increment obtaining unit, configured to obtain a resource increment according to the resource extension rule if the resource extension condition is satisfied; or
And the resource decrement obtaining unit is used for obtaining the resource decrement according to the resource decrement rule if the resource decrement condition is met.
It should be noted that, in the performance testing system provided in this embodiment, the module in the device may be a virtual module, or may be a hardware module including a microprocessor and a micro memory; the functions that can be realized by each module and the corresponding achieved technical effects can refer to the description of the specific implementation manner in the embodiment of the method of the present invention, and are not described herein again for the sake of brevity of the description.
Example four
Based on the same inventive concept, the present embodiments provide a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application mall, etc., having stored thereon a computer program that is executable by one or more processors and that, when executed by the processors, performs all or part of the steps of the various method embodiments of the present invention.
It should be noted that the above-mentioned serial numbers of the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments.
The above description is only an alternative embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes performed by the present specification and drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A pressure regulation method is applied to a performance test system, and comprises the following steps:
acquiring state information when the performance testing system applies pressure to a tested system;
judging whether a pressure adjusting condition is met or not according to the state information;
if the pressure regulation condition is met, acquiring a resource variable according to a preset regulation rule;
and adjusting the pressure generated by the performance test system by using the elastic cloud according to the resource variable.
2. The pressure adjustment method of claim 1, wherein the status information includes resource utilization; the pressure adjustment condition comprises a resource expansion condition and a resource reduction condition;
the step of judging whether a pressure regulation condition is met according to the state information specifically includes:
and judging whether a resource expansion condition or a resource reduction condition is met according to the resource utilization rate.
3. The pressure adjustment method according to claim 2, wherein the step of determining whether a resource expansion condition is satisfied according to the resource utilization rate specifically comprises:
obtaining a first fluctuation deviation value according to the resource utilization rate and a first preset expected value;
judging whether the duration of the first fluctuation deviation value larger than a first allowable value reaches a first preset duration or not, and judging whether the duration of the resource utilization rate larger than a first preset threshold value reaches a second preset duration or not;
and if the duration of the first fluctuation deviation value which is greater than the first allowable value reaches a first preset duration and the duration of the resource utilization rate which is greater than the first preset threshold value reaches a second preset duration, judging that a resource expansion condition is met.
4. The pressure regulating method according to claim 2, wherein the step of determining whether a resource reduction condition is satisfied according to the resource utilization rate specifically comprises:
obtaining a second fluctuation deviation value according to the resource utilization rate and a second preset expected value;
judging whether the duration of the second fluctuation deviation value larger than a second allowable value reaches a third preset duration or not, and judging whether the duration of the resource utilization rate smaller than a second preset threshold value reaches a fourth preset duration or not;
and if the duration of the second fluctuation deviation value which is greater than the second allowable value reaches a third preset duration and the duration of the resource utilization rate which is less than the second preset threshold value reaches a fourth preset duration, judging that a resource reduction condition is met.
5. The pressure adjustment method of claim 2, wherein the preset adjustment rules include a resource expansion rule and a resource reduction rule, and the resource variables include a resource increment and a resource decrement;
if the pressure regulation condition is met, obtaining a resource variable according to a preset regulation rule, specifically comprising:
if the resource expansion condition is met, acquiring a resource increment according to the resource expansion rule; or
And if the resource reduction condition is met, obtaining resource reduction according to the resource reduction rule.
6. A performance testing method is applied to a performance testing system, and the method comprises the following steps:
applying pressure to a system to be tested to perform performance test on the system to be tested to obtain a performance test result;
the pressure generated by the performance testing system is regulated using the pressure regulating method of any one of claims 1 to 5.
7. The performance testing method of claim 6, wherein the step of applying pressure to the system under test to perform performance testing on the system under test to obtain the performance testing result specifically comprises:
initiating an asynchronous request based on the elastic cloud, and sending the asynchronous request to a tested system;
acquiring log information of the tested system for processing the asynchronous request;
counting the log information to obtain statistical data of the tested system;
and obtaining a performance test result of the tested system according to the statistical data and a preset performance index.
8. A performance testing system, the system comprising:
the performance testing device is used for applying pressure to a tested system so as to perform performance testing on the tested system and obtain a performance testing result;
a pressure adjusting device for adjusting the pressure generated by the performance testing device using the pressure adjusting method as claimed in any one of claims 1 to 5.
9. The performance testing system of claim 8, wherein the performance testing device comprises:
the pressure generation module is used for initiating an asynchronous request based on the elastic cloud and sending the asynchronous request to a tested system;
the first storage module is used for acquiring the log information of the tested system for processing the asynchronous request;
the log statistical module is used for carrying out statistics on the log information to obtain statistical data of the tested system;
and the test result module is used for obtaining a performance test result of the tested system according to the statistical data and a preset performance index.
10. A storage medium having a computer program stored thereon, the computer program being executable by one or more processors to implement a method as claimed in any one of claims 1 to 7.
CN202110899304.6A 2021-08-05 2021-08-05 Pressure regulation and performance test method, system and storage medium Pending CN113742219A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110899304.6A CN113742219A (en) 2021-08-05 2021-08-05 Pressure regulation and performance test method, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110899304.6A CN113742219A (en) 2021-08-05 2021-08-05 Pressure regulation and performance test method, system and storage medium

Publications (1)

Publication Number Publication Date
CN113742219A true CN113742219A (en) 2021-12-03

Family

ID=78730174

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110899304.6A Pending CN113742219A (en) 2021-08-05 2021-08-05 Pressure regulation and performance test method, system and storage medium

Country Status (1)

Country Link
CN (1) CN113742219A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114490374A (en) * 2022-01-21 2022-05-13 阿里巴巴(中国)有限公司 Applied pressure test method, electronic device, storage medium, and program product

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105446860A (en) * 2015-11-11 2016-03-30 上海欣方智能系统有限公司 Asynchronous concurrent mechanism based pressure test system and test method
CN107515809A (en) * 2017-08-18 2017-12-26 国网山东省电力公司信息通信公司 A kind of elastic telescopic method and system of power system
CN107733676A (en) * 2016-08-12 2018-02-23 中国移动通信集团浙江有限公司 A kind of method and system of flexible scheduling resource
CN109327355A (en) * 2018-10-25 2019-02-12 平安科技(深圳)有限公司 Cloud storage system performance evaluation methodology, device and computer readable storage medium
CN109542746A (en) * 2018-11-23 2019-03-29 北京车和家信息技术有限公司 Method for testing pressure, system and server stress test macro
CN109660421A (en) * 2018-10-26 2019-04-19 平安科技(深圳)有限公司 Method, apparatus, server and the storage medium of flexible scheduling resource
CN112463367A (en) * 2020-11-19 2021-03-09 苏州浪潮智能科技有限公司 Method and system for optimizing performance of storage system, electronic equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105446860A (en) * 2015-11-11 2016-03-30 上海欣方智能系统有限公司 Asynchronous concurrent mechanism based pressure test system and test method
CN107733676A (en) * 2016-08-12 2018-02-23 中国移动通信集团浙江有限公司 A kind of method and system of flexible scheduling resource
CN107515809A (en) * 2017-08-18 2017-12-26 国网山东省电力公司信息通信公司 A kind of elastic telescopic method and system of power system
CN109327355A (en) * 2018-10-25 2019-02-12 平安科技(深圳)有限公司 Cloud storage system performance evaluation methodology, device and computer readable storage medium
CN109660421A (en) * 2018-10-26 2019-04-19 平安科技(深圳)有限公司 Method, apparatus, server and the storage medium of flexible scheduling resource
CN109542746A (en) * 2018-11-23 2019-03-29 北京车和家信息技术有限公司 Method for testing pressure, system and server stress test macro
CN112463367A (en) * 2020-11-19 2021-03-09 苏州浪潮智能科技有限公司 Method and system for optimizing performance of storage system, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114490374A (en) * 2022-01-21 2022-05-13 阿里巴巴(中国)有限公司 Applied pressure test method, electronic device, storage medium, and program product

Similar Documents

Publication Publication Date Title
CN110175110B (en) Pressure testing method, device, system, equipment and computer readable storage medium
CN111092877B (en) Data processing method and device, electronic equipment and storage medium
CN109144700B (en) Method and device for determining timeout duration, server and data processing method
CN110730136B (en) Method, device, server and storage medium for realizing flow control
CN108075934B (en) Network quality monitoring method, device and system
CN105024933B (en) The control method and device of request packet transmission frequency
US11146660B2 (en) Information packet download method for preventing high concurrency, electronic device and storage medium
CN112612618B (en) Interface current limiting method and device, computer equipment and storage medium
CN109218054B (en) Terminal dynamic configuration, corresponding server implementation method, device and storage medium
CN111416836B (en) Nginx-based server maintenance method and device, computer equipment and storage medium
CN111756644A (en) Hot spot current limiting method, system, equipment and storage medium
CN113742219A (en) Pressure regulation and performance test method, system and storage medium
CN106293805A (en) The method and device that program loads
CN108011779A (en) The test method of Cloud Server task throughput under limited resources supplIes
CN107547468B (en) Network protocol switching device, method and terminal
CN112367384B (en) Kafka cluster-based dynamic speed limiting method and device and computer equipment
JP4646649B2 (en) COMMUNICATION SERVER SETTING VALUE DETERMINING DEVICE, ITS PROGRAM, AND ITS METHOD
CN110943876A (en) URL state detection method, device, equipment and system
CN107918617B (en) Data query method and device
CN107689979B (en) method and equipment for processing download request
CN115576791A (en) Dynamic adjustment method and device for pressure measurement thread, electronic equipment and storage medium
CN114004536A (en) Method and device for measuring service quality, electronic equipment and storage medium
CN114040378A (en) Application arranging method and device, computer equipment and storage medium
CN109688095B (en) Method, device and equipment for acquiring flow source information and readable storage medium
CN112596992A (en) Application activity calculation method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination