WO2021139103A1 - Method and apparatus for adaptively adjusting pressurization parameter, computer device, and storage medium - Google Patents

Method and apparatus for adaptively adjusting pressurization parameter, computer device, and storage medium Download PDF

Info

Publication number
WO2021139103A1
WO2021139103A1 PCT/CN2020/098809 CN2020098809W WO2021139103A1 WO 2021139103 A1 WO2021139103 A1 WO 2021139103A1 CN 2020098809 W CN2020098809 W CN 2020098809W WO 2021139103 A1 WO2021139103 A1 WO 2021139103A1
Authority
WO
WIPO (PCT)
Prior art keywords
parameter
correlation function
positive correlation
pressurization
adjustment
Prior art date
Application number
PCT/CN2020/098809
Other languages
French (fr)
Chinese (zh)
Inventor
熊昊
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021139103A1 publication Critical patent/WO2021139103A1/en

Links

Images

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/24Marginal checking or other specified testing methods not covered by G06F11/26, e.g. race tests
    • 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/3457Performance evaluation by simulation

Definitions

  • This application relates to the field of interface testing, and in particular to a method, device, computer equipment, and storage medium for adaptive adjustment of pressure parameters.
  • the performance indicators of the http server that users are mainly concerned about are the number of requests per second and the server CPU load. The average request delay value and the number of request errors.
  • An adaptive adjustment method of pressurization parameters including:
  • the load pressurization parameter is adjusted to be greater than or equal to the first peak performance index
  • the delayed pressurization parameter is adjusted to be less than or equal to the second peak performance index
  • the error rate is increased
  • the pressure parameter is adjusted to be less than or equal to the third peak performance index
  • the maximum server performance index of the device under test in the current test environment is determined according to the number of online users and the number of user requests per second that are positively related to the three pressurization parameters.
  • An adaptive adjustment device for pressurization parameters including:
  • the first generation module is used to generate the first positive correlation function of the load information of the device under test, the second positive correlation function of the request average delay value, and the third positive correlation function of the request error rate according to the number of online users and the number of user requests per second. related functions;
  • the first obtaining module is configured to obtain the initial number of online users and the number of initial user requests per second associated with the current test environment when a test request of the current test environment is received;
  • the second acquisition module is configured to acquire the load pressurization parameter output by the first positive correlation function and the first positive correlation function according to the initial number of online users and the number of initial user requests per second within a preset request time period.
  • the adjustment module is configured to receive all parameter adjustment instructions, adjust the load pressurization parameter to be greater than or equal to the first peak performance index, and adjust the delayed pressurization parameter to be less than or equal to the second peak performance index, and The error rate boosting parameter is adjusted to be less than or equal to the third peak performance index;
  • the first determination module is used to determine the maximum server performance of the device under test in the current test environment based on the number of online users that are positively related to the three pressure parameters and the number of user requests per second after completing the parameter adjustment index.
  • a computer device including a memory, a processor, and a computer program stored in the memory and capable of running on the processor.
  • the processor implements a method for adaptive adjustment of a pressure parameter when the processor executes the computer program , Wherein the adaptive adjustment method of the pressurization parameter includes:
  • the number of online users and the number of user requests per second generate the first positive correlation function of the load information of the device under test, the second positive correlation function of the request average delay value, and the third positive correlation function of the request error rate;
  • the initial number of online users and the number of initial user requests per second associated with the current test environment are obtained; within the preset request time period, according to the initial number of online users and the number of initial users per second Number of requests to obtain the load pressurization parameter output by the first positive correlation function, the delayed pressurization parameter output by the second positive correlation function, and the error rate pressurization parameter output by the third positive correlation function; receive all parameters An adjustment instruction to adjust the load pressurization parameter to be greater than or equal to the first peak performance index, adjust the delayed pressurization parameter to be less than or equal to the second peak performance index, and adjust the error rate pressurization parameter Is less than or equal to the third peak performance index; after the completion of parameter adjustment, according to the number of online users and the number of user requests per second that
  • a computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, a method for adaptive adjustment of a pressurization parameter is realized, wherein the adaptive adjustment of the pressurization parameter Methods include:
  • the number of online users and the number of user requests per second generate the first positive correlation function of the load information of the device under test, the second positive correlation function of the request average delay value, and the third positive correlation function of the request error rate;
  • the initial number of online users and the number of initial user requests per second associated with the current test environment are obtained; within the preset request time period, according to the initial number of online users and the number of initial users per second Number of requests to obtain the load pressurization parameter output by the first positive correlation function, the delayed pressurization parameter output by the second positive correlation function, and the error rate pressurization parameter output by the third positive correlation function; receive all parameters An adjustment instruction to adjust the load pressurization parameter to be greater than or equal to the first peak performance index, adjust the delayed pressurization parameter to be less than or equal to the second peak performance index, and adjust the error rate pressurization parameter Is less than or equal to the third peak performance index; after the completion of parameter adjustment, according to the number of online users and the number of user requests per second that
  • the above-mentioned adaptive adjustment method, device, computer equipment and storage medium of the pressure parameter calculate the load pressure in the current test environment according to the preset first positive correlation function, second positive correlation function and third positive correlation function. Parameters, delayed pressurization parameters, and error rate pressurization parameters, and compare the load pressurization parameters, delayed pressurization parameters, and error rate pressurization parameters with the first peak performance index, second peak performance index, and second performance under the current test environment. The three peak performance indicators are compared to adjust the pressure parameters and determine the maximum server performance indicators of the device under test in the current test environment. It can be seen that this application solves the problem that the current http performance test tools need to be adjusted manually. Pressure parameters and poor adaptation to the changing test environment.
  • this application can avoid the tedious process of artificially adjusting the pressure parameters in the http performance test on the one hand, thereby saving test time, and on the other hand, it can be adapted to a variety of test environments.
  • the pressure parameter can be adjusted adaptively after changing the performance peak index according to the test environment, which is conducive to the automatic regression of the performance index test.
  • FIG. 1 is a schematic diagram of an application environment of a method for adaptive adjustment of a pressure parameter in an embodiment of the present application
  • FIG. 2 is a flowchart of a method for adaptive adjustment of pressure parameters in an embodiment of the present application
  • FIG. 3 is a schematic structural diagram of a pressure parameter adaptive adjustment device in an embodiment of the present application.
  • Fig. 4 is a schematic diagram of a computer device in an embodiment of the present application.
  • the self-adjusting method for pressurization parameters provided by the present application can be applied in the application environment as shown in FIG. 1, in which the client communicates with the server through the network.
  • the client can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices.
  • the server can be implemented as an independent server or a server cluster composed of multiple servers.
  • a method for adaptive adjustment of compression parameters is provided. Taking the method applied to the server in FIG. 1 as an example for description, the method includes the following steps:
  • the execution subject of this embodiment is the server corresponding to the adaptive http performance stress measurement tool.
  • the first positive correlation function of the load information of the device under test is generated according to the number of online users and the number of user requests per second; understandably, during the use of the device under test, the first positive correlation function is based on the number of online users C and the number of users The pressure parameter function g(C,R) formed by the number of requests per second R.
  • the load of the device under test is actually detected Information will first gradually increase with the increase in the number of online users and the number of user requests per second, and then slow down after a certain period of time. This characteristic conforms to the characteristic of a logarithmic function.
  • the first positive correlation function is a constant function.
  • c is the load information of the device under test; g(C,R) can also be understood as a pressure parameter function.
  • the first environmental parameter and the second environmental parameter, the first environmental parameter and the second environmental parameter can be set to a constant according to the current test environment, where a and b are both greater than 0; x should be greater than 1, the first positive correlation Functions are functions of positive correlation type.
  • the second positive correlation function of the average request delay value is generated according to the number of online users and the number of user requests per second; understandably, in the use process of the device under test, the first step is based on the number of online users C and the number of users per second.
  • the pressurization parameter function w(C,R) formed by the number of second requests R then, under the premise that the function value of the pressurization parameter function w(C,R) is greater than or equal to the first preset positive integer, with the online
  • the actual detection of the trend of the average delay value of the device under test will gradually increase and the slope reflected by the trend will gradually increase. This characteristic conforms to the characteristic of an exponential function.
  • the function value of the pressure parameter function w(C, R) formed by the number of online users C and the number of user requests per second R is greater than or equal to 0 and less than the first preset positive integer, under the premise that Therefore, the second positive correlation function is a constant function.
  • the third positive correlation function of the request error rate is generated according to the number of online users and the number of user requests per second; understandably, in the use process of the device under test, the first step is based on the number of online users C and the number of users per second.
  • the actual detection of the trend of the request error rate of the device under test will gradually increase and infinitely close to 1. This characteristic conforms to the characteristic of the logarithmic function.
  • the function value of the pressure parameter function w(C, R) formed by the number of online users C and the number of user requests per second R is greater than or equal to 0 and less than the second preset positive integer, under the premise that Therefore, the third positive correlation function is zero.
  • the third positive correlation function in this embodiment can be specifically abstracted into Among them, e is the average delay value of the request; t(C,R) can also be understood as a pressure parameter function.
  • the function of; w(t(C,R)) is a function in the pressurized parameter function t(C,R), which has a characteristic, when t(C,R) approaches positive infinity, w (t(C,R)) is a constant function.
  • the test request is a request for testing from at least one test interface connected to the server; a current test environment can be associated with at least one test interface, and the test interface can be an order payment interface, a product description interface, and the like.
  • the resource monitoring module when a test request associated with the current test environment is received from a user, the resource monitoring module obtains the initial number of online users and initial users per second within the preset request time period (the actual time when the test request is issued) The number of requests.
  • the first positive correlation function, the second positive correlation function, and the third positive correlation function are used to obtain the load pressurization parameter, the delay pressurization parameter, and the error rate pressurization parameter, respectively, where the load pressurization parameter is The load information of the device under test output by the first positive correlation function, the delay pressure parameter is the request average delay value output by the second positive correlation function, and the error rate pressure parameter is the request error rate output by the third positive correlation function.
  • the function value of the pressurization parameter function g(C,R) formed by satisfying the above-mentioned number of online users C and the number of user requests per second R is not 0, and the number of online users C and users
  • the function value of the pressurization parameter function w(C,R) formed by the number of requests per second R is greater than or equal to the first preset positive integer and the pressurization parameter function t formed by the number of online users C and the number of user requests per second R
  • the adaptive adjustment module simultaneously adds the first peak performance index, the second peak performance index and the third peak performance index to the load. Pressure parameters, delay pressure parameters and error rate pressure parameters are adjusted.
  • the first peak performance index, the second peak performance index and the third peak performance index corresponding to the test interface under different test environments will change, such as orders
  • the third peak performance indicator corresponding to the request error rate of the payment interface is e 1
  • the third peak performance indicator corresponding to the request error rate of the product description interface is e 2
  • the order payment interface is more complicated than the product description interface
  • the test interface has high requirements on the success rate (once the payment of the order payment interface fails, the return of the product quota in the order payment interface and the result of the payment system will cause a lot of overhead), but the product description
  • the interface does not have high requirements for the success rate (even if there is a failure in the product description interface, there will be no need for other component systems to roll back), so e 1 is less than e 2 .
  • the load pressure parameter is adjusted to be greater than or equal to the first peak performance index
  • the delayed pressure parameter is adjusted to be less than or equal to the second performance.
  • the independent variables C and R increase, the three pressure parameters of the dependent variable will also increase; and when the three pressure parameters of the dependent variable change, the independent variables C and R will also change.
  • the number of online users C and the number of user requests per second R) that follow the three pressure parameters for positive correlation changes can be obtained, and the performance index test can be completed by the maximum performance index of the server.
  • q is the maximum value, and q represents The maximum performance index of the server.
  • adaptive adjustment of the pressure parameters is used to solve the current tedious problem of artificially adjusting the pressure parameters, thereby saving manpower and time costs, and avoiding errors in the artificial adjustment of the pressure parameters. It can be adapted to a variety of current test environments to avoid the impact of changes in the current test environment on the adjustment process of the pressurization parameters, thereby facilitating automated performance index testing, and the mathematical model constructed is used to model and model the process of performance index testing. Standardization, thereby reducing errors in performance index testing, and improving the accuracy of the server's maximum performance index results.
  • the all parameter adjustment instructions are generated;
  • the adjustment conditions include: the load pressurization parameter is less than the first peak performance index, and the delay pressurization parameter adjustment is greater than the A second peak performance index, and the error rate boosting parameter adjustment is greater than the third peak performance index;
  • a partial parameter adjustment instruction is generated to complete the pressurization parameter corresponding to the adjustment condition that is not satisfied according to the partial parameter adjustment instruction
  • This embodiment is used to determine whether the load pressurization parameter, the delay pressurization parameter, and the error rate pressurization parameter have reached the peak performance index, record the pressurization parameter that has reached the peak performance index, and pressurize the pressure that has not reached the peak performance index.
  • the parameters are adjusted again.
  • the pressurization parameter refers to the load pressurization parameter, the delay pressurization parameter and the error rate pressurization parameter
  • the performance peak is the first performance peak index, the second performance peak index and the third performance peak index. It can be seen that this embodiment can avoid the invalid execution of the action of adjusting the pressurization parameter that reaches the peak performance index.
  • the method further includes:
  • the running project can be the actual operation of various interfaces, such as pulling data from the interface.
  • the operating items that the tested device can execute in the current test environment are calculated based on the maximum performance index of the server and the performance indicators required by the tested device to execute the operating project. Among them, the operating items will be combined into an operating project group. , Present the running project group in the form of an intuitive data graph for subsequent users to choose, avoiding the downtime of the tested equipment due to exceeding the maximum performance index during the running process.
  • the method further includes:
  • This embodiment is to make the pressure gauge simulate the user client to send a preset number of HTTP test requests to the test interface, where the pressure gauge, the resource monitoring module, the result collection module, and the adaptive adjustment module are integrated into an adaptive Http performance stress testing tool.
  • the method further includes:
  • an execution command for sending a preset number of the test request to the target interface is generated.
  • the preset path refers to the storage path for storing the description information to the user client.
  • the description information is the file information instructing the user client to send the information exchange protocol to the test interface in the current test environment.
  • File information can generate execution commands for sending a preset number of test requests.
  • the method further includes:
  • the network environment of the device under test in the current test environment is monitored in real time, and when a preset problem exists in the network environment, network debugging is performed on the network environment according to adjustment measures corresponding to the preset problem.
  • the preset problem may refer to a network abnormality of the tested device, and the failure of the connection between the tested device and the local area network due to the network abnormality.
  • the network environment of the device under test can be preliminarily determined to solve the network abnormality problem existing in the network environment in a timely manner, so as to avoid the subsequent direct influence on the adjustment of the pressure parameter during the performance index test process.
  • the load pressure parameter output by the first positive correlation function, the second positive The delayed pressurization parameter output by the correlation function and the error rate pressurization parameter output by the third positive correlation function further include:
  • the second positive correlation function is obtained according to the number of initial online users and the number of initial user requests per second within a preset request time period.
  • the delay pressurization parameter output by the correlation function is obtained according to the number of initial online users and the number of initial user requests per second within a preset request time period.
  • the third positive correlation function is obtained according to the number of initial online users and the number of initial user requests per second within a preset request time period.
  • the error rate output by the correlation function pressurizes the parameter.
  • this embodiment is a condition for adjusting the three pressurization parameters.
  • the foregoing provides an adaptive adjustment method for pressure parameters, which calculates the load increase in the current test environment according to the preset first positive correlation function, second positive correlation function, and third positive correlation function.
  • Pressure parameters, delayed pressure parameters, and error rate pressure parameters and compare the load pressure parameters, delayed pressure parameters, and error rate pressure parameters with the first peak performance index, second peak performance index and the current test environment.
  • the third peak performance index is compared to adjust the pressure parameters and determine the maximum server performance index of the device under test in the current test environment. It can be seen that this method solves the current HTTP performance test tools that need to be adjusted continuously. Pressure parameters and poor adaptation to the changed test environment.
  • this method can avoid the tedious process of artificially adjusting the pressure parameters in the http performance test on the one hand, thereby saving test time, and on the other hand, it can be adapted to a variety of test environments. , Can adjust the pressure parameter adaptively after changing the performance peak index according to the test environment, which is conducive to the automatic regression performance index test.
  • an adaptive adjustment device for a compression parameter is provided, and the adaptive adjustment device for a compression parameter corresponds to the adaptive adjustment method for a compression parameter in the above-mentioned embodiment in a one-to-one correspondence.
  • the pressure parameter adaptive adjustment device includes a first generation module 11, a first acquisition module 12, a second acquisition module 13, an adjustment module 14 and a first determination module 15. The detailed description of each functional module is as follows:
  • the first generating module 11 is used to generate the first positive correlation function of the load information of the device under test, the second positive correlation function of the request average delay value, and the third request error rate according to the number of online users and the number of user requests per second.
  • Positive correlation function of the load information of the device under test, the second positive correlation function of the request average delay value, and the third request error rate according to the number of online users and the number of user requests per second.
  • the first obtaining module 12 is configured to obtain the initial number of online users and the number of initial user requests per second associated with the current test environment when a test request of the current test environment is received;
  • the second acquisition module 13 is configured to acquire the load pressurization parameter output by the first positive correlation function, the load pressurization parameter output by the first positive correlation function, and the number of requests per second according to the initial number of online users and the number of initial user requests per second within a preset request period
  • the adjustment module 14 is configured to receive all parameter adjustment instructions, adjust the load pressurization parameter to be greater than or equal to the first peak performance index, and adjust the delayed pressurization parameter to be less than or equal to the second peak performance index, and Adjusting the error rate boosting parameter to be less than or equal to the third peak performance index;
  • the first determining module 15 is used to determine the maximum number of servers of the device under test in the current test environment based on the number of online users that are positively related to the three pressurization parameters and the number of user requests per second after the parameter adjustment is completed. Performance.
  • the pressure parameter adaptive adjustment device further includes:
  • the second generation module is configured to generate all the parameter adjustment instructions when it is detected that all three adjustment conditions are satisfied; the adjustment conditions include: the load pressurization parameter is less than the first peak performance index, and the delay The adjustment of the pressure parameter is greater than the second peak performance indicator, and the adjustment of the error rate pressure parameter is greater than the third peak performance indicator;
  • the second determination module is used to generate a partial parameter adjustment instruction when it is detected that one and only one or two of the adjustment conditions are not satisfied, so as to adjust the unsatisfied parameters according to the partial parameter adjustment instruction.
  • the third determining module is used to directly determine the device under test based on the number of online users and the number of user requests per second that are positively related to the three types of pressurization parameters when it is detected that all the adjustment conditions are not met The maximum performance index of the server in the current test environment.
  • the pressure parameter adaptive adjustment device further includes:
  • the combination module is used to calculate the executable running items of the device under test in the current test environment according to the maximum performance index of the server, and to connect all the executable running items in the form of a data map. To be combined into a plurality of operating project groups including the operating project.
  • the pressure parameter adaptive adjustment device further includes:
  • the sending module is configured to make the pressure gauge simulate the behavior of the user client, and obtain the preset number of the test requests sent by the pressure gauge to the target interface according to the current test environment.
  • the pressure parameter adaptive adjustment device further includes:
  • the third obtaining module is configured to obtain the description information associated with the current test environment from the preset path in the user client;
  • the third generation module is configured to generate an execution command for sending a preset number of the test request to the target interface according to the description information.
  • the pressure parameter adaptive adjustment device further includes:
  • the debugging module is used for real-time monitoring of the network environment of the device under test in the current test environment.
  • the network environment is adjusted according to the adjustment measures corresponding to the preset problem. Perform network debugging.
  • the pressure parameter adaptive adjustment device further includes:
  • the third acquiring module is configured to, when it is confirmed that the first positive correlation function is not 0, within a preset request time period, according to the number of initial online users and the number of initial user requests per second, to acquire the first The load pressurization parameter output by the positive correlation function;
  • the third acquiring module is configured to, when it is confirmed that the second positive correlation function is greater than or equal to a first preset positive integer, according to the number of initial online users and the number of initial user requests per second within a preset request time period , Acquiring the delay pressurization parameter output by the second positive correlation function;
  • the fourth acquiring module is configured to, when it is confirmed that the third positive correlation function is greater than or equal to a second preset positive integer, according to the initial number of online users and the number of initial user requests per second within a preset request time period To obtain the error rate boosting parameter output by the third positive correlation function.
  • the various modules in the above-mentioned pressure parameter adaptive adjustment device can be implemented in whole or in part by software, hardware and a combination thereof.
  • the above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
  • a computer device is provided.
  • the computer device may be a server, and its internal structure diagram may be as shown in FIG. 4.
  • the computer equipment includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of the computer device is used to provide calculation 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 computer programs in the non-volatile storage medium.
  • the database of the computer equipment is used to store the data involved in the adaptive adjustment method of the pressure parameter.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • the computer program is executed by the processor to realize an adaptive adjustment method of pressurization parameters, wherein the adaptive adjustment method of pressurization parameters includes: generating load information of the device under test according to the number of online users and the number of user requests per second The first positive correlation function of the request average delay value, the second positive correlation function of the request average delay value, and the third positive correlation function of the request error rate; when the test request of the current test environment is received, the initial The number of online users and the number of initial user requests per second; within a preset request time period, according to the number of initial online users and the number of initial user requests per second, the load pressure parameter output by the first positive correlation function is obtained , The delayed pressurization parameter output by the second positive correlation function and the error rate pressurization parameter output by the third positive correlation function; receive all parameter adjustment instructions, and adjust the load pressurization parameter to be greater than or equal to the first Peak performance index, and adjust the delay pressurization parameter to be less
  • a computer device which includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor.
  • the processor executes the computer program
  • the pressure parameter adaptation in the above-mentioned embodiment is implemented.
  • the steps of the adjustment method are, for example, step S10 to step S50 shown in FIG. 2.
  • the function of each module/unit of the pressure parameter adaptive adjustment device in the above-mentioned embodiment is realized, for example, the function of the module 11 to the module 15 shown in FIG. 3. To avoid repetition, I won’t repeat them here.
  • a computer-readable storage medium is provided.
  • the storage medium is a volatile storage medium or a non-volatile storage medium, and a computer program is stored thereon.
  • the computer program is executed by a processor, the foregoing
  • the steps of the pressure parameter adaptive adjustment method in the embodiment are, for example, step S10 to step S50 shown in FIG. 2.
  • the function of each module/unit of the pressure parameter adaptive adjustment device in the above embodiment is realized, for example, the function of the module 11 to the module 15 shown in FIG. 3. To avoid repetition, I won’t repeat them here.
  • Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

A method and apparatus for adaptively adjusting a pressurization parameter, a computer device, and a storage medium. The method comprises: according to the number of online users and the number of requests per second of the users, generating a first positive correlation function, a second positive correlation function and a third positive correlation function; according to the initial number of online users and the initial number of requests per second of the users, acquiring a load pressurization parameter which is output by the first positive correlation function, a delay pressurization parameter which is output by the second positive correlation function and an error rate pressurization parameter which is output by the third positive correlation function; adjusting the load pressurization parameter to be greater than or equal to a first performance peak index, adjusting the delay pressurization parameter to be less than or equal to a second performance peak index, and adjusting the error rate pressurization parameter to be less than or equal to a third performance peak index; and according to the number of online users and the number of requests per second of the users, which are in positive correlation with the three pressurization parameters, determining the maximum performance index of a server of a tested device. By means of the method, the pressurization parameters can be adaptively adjusted.

Description

加压参数自适应调节方法、装置、计算机设备及存储介质Method, device, computer equipment and storage medium for adaptive adjustment of pressurization parameters
本申请要求于2020年5月21日提交中国专利局、申请号为202010437636.8,发明名称为“加压参数自适应调节方法、装置、计算机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed with the Chinese Patent Office on May 21, 2020, the application number is 202010437636.8, and the invention title is "Pressure parameter adaptive adjustment method, device, computer equipment and storage medium", all of which The content is incorporated in this application by reference.
技术领域Technical field
本申请涉及接口测试领域,尤其涉及一种加压参数自适应调节方法、装置、计算机设备及存储介质。This application relates to the field of interface testing, and in particular to a method, device, computer equipment, and storage medium for adaptive adjustment of pressure parameters.
背景技术Background technique
目前对http服务器接口进行调用时,接口中交互的数据往往会比较小,也就是说网络带宽很难会成为瓶颈,所以使用者主要关心的http服务器性能指标为每秒请求数,服务器CPU负载,请求平均延迟值以及请求错误数。At present, when calling the http server interface, the data exchanged in the interface is often relatively small, which means that the network bandwidth will hardly become a bottleneck. Therefore, the performance indicators of the http server that users are mainly concerned about are the number of requests per second and the server CPU load. The average request delay value and the number of request errors.
目前是通过现有的来进行调节,但现有的http性能测试工具中,需人为的不停调节加压参数以使得关心的性能指标来达到一定的标准,发明人意识到这种做法使得性能指标测试的过程变得十分的繁琐,且测试人员往往在调节参数的过程中花费了大量的时间,并且在测试环境发生相应变化时,现有的http性能测试工具适应性较差,又需要人为重复地进行调节加压参数,不利于稳定且自动化回归的性能指标测试。Currently, adjustments are made through existing http performance testing tools. However, in the existing http performance testing tools, it is necessary to constantly adjust the compression parameters to make the performance indicators of concern reach a certain standard. The inventor realizes that this approach makes the performance The process of index testing has become very cumbersome, and testers often spend a lot of time in the process of adjusting parameters, and when the test environment changes correspondingly, the existing http performance testing tools have poor adaptability and require manual work. Repeatedly adjusting the pressurization parameters is not conducive to stable and automated regression performance index tests.
技术问题technical problem
基于此,有必要针对现有测试工具适应性较差的技术问题,提供一种加压参数自适应调节方法、装置、计算机设备及存储介质,用于自适应调节加压参数,并提高性能测试过程中对测试环境的适应性。Based on this, it is necessary to provide a method, device, computer equipment and storage medium for adaptive adjustment of pressure parameters in response to the technical problem of poor adaptability of existing test tools, which can be used to adaptively adjust pressure parameters and improve performance testing. Adaptability to the test environment during the process.
技术解决方案Technical solutions
一种加压参数自适应调节方法,包括:An adaptive adjustment method of pressurization parameters, including:
根据在线用户数与用户每秒请求数生成被测设备的负载信息的第一正相关函数、请求平均延迟值的第二正相关函数,以及请求错误率的第三正相关函数;Generate the first positive correlation function of the load information of the device under test, the second positive correlation function of the request average delay value, and the third positive correlation function of the request error rate according to the number of online users and the number of user requests per second;
在接收到当前测试环境的测试请求时,获取与所述当前测试环境关联的初始在线用户数和初始用户每秒请求数;When receiving the test request of the current test environment, obtain the initial number of online users and the number of initial user requests per second associated with the current test environment;
在预设请求时间段内,根据所述初始在线用户数和所述初始用户每秒请求数,获取所述第一正相关函数输出的负载加压参数、所述第二正相关函数输出的延迟加压参数和所述第三正相关函数输出的错误率加压参数;In a preset request time period, according to the initial number of online users and the number of initial user requests per second, the load pressure parameter output by the first positive correlation function and the delay of the second positive correlation function output are obtained The pressure parameter and the error rate pressure parameter output by the third positive correlation function;
接收全部参数调节指令,将所述负载加压参数调节为大于或等于第一性能峰值指标,并将所述延迟加压参数调节为小于或等于第二性能峰值指标,以及将所述错误率加压参数 调节为小于或等于第三性能峰值指标;All parameter adjustment instructions are received, the load pressurization parameter is adjusted to be greater than or equal to the first peak performance index, the delayed pressurization parameter is adjusted to be less than or equal to the second peak performance index, and the error rate is increased The pressure parameter is adjusted to be less than or equal to the third peak performance index;
在完成参数调节后,根据与三种加压参数正相关的在线用户数与用户每秒请求数,确定所述被测设备在所述当前测试环境下的服务器最大性能指标。After the parameter adjustment is completed, the maximum server performance index of the device under test in the current test environment is determined according to the number of online users and the number of user requests per second that are positively related to the three pressurization parameters.
一种加压参数自适应调节装置,包括:An adaptive adjustment device for pressurization parameters, including:
第一生成模块,用于根据在线用户数与用户每秒请求数生成被测设备的负载信息的第一正相关函数、请求平均延迟值的第二正相关函数,以及请求错误率的第三正相关函数;The first generation module is used to generate the first positive correlation function of the load information of the device under test, the second positive correlation function of the request average delay value, and the third positive correlation function of the request error rate according to the number of online users and the number of user requests per second. related functions;
第一获取模块,用于在接收到当前测试环境的测试请求时,获取与所述当前测试环境关联的初始在线用户数和初始用户每秒请求数;The first obtaining module is configured to obtain the initial number of online users and the number of initial user requests per second associated with the current test environment when a test request of the current test environment is received;
第二获取模块,用于在预设请求时间段内,根据所述初始在线用户数和所述初始用户每秒请求数,获取所述第一正相关函数输出的负载加压参数、所述第二正相关函数输出的延迟加压参数和所述第三正相关函数输出的错误率加压参数;The second acquisition module is configured to acquire the load pressurization parameter output by the first positive correlation function and the first positive correlation function according to the initial number of online users and the number of initial user requests per second within a preset request time period. Two delayed pressurization parameters output by the positive correlation function and the error rate pressurization parameters output by the third positive correlation function;
调节模块,用于接收全部参数调节指令,将所述负载加压参数调节为大于或等于第一性能峰值指标,并将所述延迟加压参数调节为小于或等于第二性能峰值指标,以及将所述错误率加压参数调节为小于或等于第三性能峰值指标;The adjustment module is configured to receive all parameter adjustment instructions, adjust the load pressurization parameter to be greater than or equal to the first peak performance index, and adjust the delayed pressurization parameter to be less than or equal to the second peak performance index, and The error rate boosting parameter is adjusted to be less than or equal to the third peak performance index;
第一确定模块,用于在完成参数调节后,根据与三种加压参数正相关的在线用户数与用户每秒请求数,确定所述被测设备在所述当前测试环境下的服务器最大性能指标。The first determination module is used to determine the maximum server performance of the device under test in the current test environment based on the number of online users that are positively related to the three pressure parameters and the number of user requests per second after completing the parameter adjustment index.
一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现一种加压参数自适应调节方法,其中,所述加压参数自适应调节方法包括:A computer device including a memory, a processor, and a computer program stored in the memory and capable of running on the processor. The processor implements a method for adaptive adjustment of a pressure parameter when the processor executes the computer program , Wherein the adaptive adjustment method of the pressurization parameter includes:
根据在线用户数与用户每秒请求数生成被测设备的负载信息的第一正相关函数、请求平均延迟值的第二正相关函数,以及请求错误率的第三正相关函数;在接收到当前测试环境的测试请求时,获取与所述当前测试环境关联的初始在线用户数和初始用户每秒请求数;在预设请求时间段内,根据所述初始在线用户数和所述初始用户每秒请求数,获取所述第一正相关函数输出的负载加压参数、所述第二正相关函数输出的延迟加压参数和所述第三正相关函数输出的错误率加压参数;接收全部参数调节指令,将所述负载加压参数调节为大于或等于第一性能峰值指标,并将所述延迟加压参数调节为小于或等于第二性能峰值指标,以及将所述错误率加压参数调节为小于或等于第三性能峰值指标;在完成参数调节后,根据与三种加压参数正相关的在线用户数与用户每秒请求数,确定所述被测设备在所述当前测试环境下的服务器最大性能指标。According to the number of online users and the number of user requests per second, generate the first positive correlation function of the load information of the device under test, the second positive correlation function of the request average delay value, and the third positive correlation function of the request error rate; During the test request of the test environment, the initial number of online users and the number of initial user requests per second associated with the current test environment are obtained; within the preset request time period, according to the initial number of online users and the number of initial users per second Number of requests to obtain the load pressurization parameter output by the first positive correlation function, the delayed pressurization parameter output by the second positive correlation function, and the error rate pressurization parameter output by the third positive correlation function; receive all parameters An adjustment instruction to adjust the load pressurization parameter to be greater than or equal to the first peak performance index, adjust the delayed pressurization parameter to be less than or equal to the second peak performance index, and adjust the error rate pressurization parameter Is less than or equal to the third peak performance index; after the completion of parameter adjustment, according to the number of online users and the number of user requests per second that are positively related to the three pressurization parameters, determine the performance of the device under test in the current test environment The maximum performance index of the server.
一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现一种加压参数自适应调节方法,其中,所述加压参数自适应调节方法包括:A computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, a method for adaptive adjustment of a pressurization parameter is realized, wherein the adaptive adjustment of the pressurization parameter Methods include:
根据在线用户数与用户每秒请求数生成被测设备的负载信息的第一正相关函数、请求平均延迟值的第二正相关函数,以及请求错误率的第三正相关函数;在接收到当前测试环境的测试请求时,获取与所述当前测试环境关联的初始在线用户数和初始用户每秒请求数;在预设请求时间段内,根据所述初始在线用户数和所述初始用户每秒请求数,获取所述第 一正相关函数输出的负载加压参数、所述第二正相关函数输出的延迟加压参数和所述第三正相关函数输出的错误率加压参数;接收全部参数调节指令,将所述负载加压参数调节为大于或等于第一性能峰值指标,并将所述延迟加压参数调节为小于或等于第二性能峰值指标,以及将所述错误率加压参数调节为小于或等于第三性能峰值指标;在完成参数调节后,根据与三种加压参数正相关的在线用户数与用户每秒请求数,确定所述被测设备在所述当前测试环境下的服务器最大性能指标。According to the number of online users and the number of user requests per second, generate the first positive correlation function of the load information of the device under test, the second positive correlation function of the request average delay value, and the third positive correlation function of the request error rate; During the test request of the test environment, the initial number of online users and the number of initial user requests per second associated with the current test environment are obtained; within the preset request time period, according to the initial number of online users and the number of initial users per second Number of requests to obtain the load pressurization parameter output by the first positive correlation function, the delayed pressurization parameter output by the second positive correlation function, and the error rate pressurization parameter output by the third positive correlation function; receive all parameters An adjustment instruction to adjust the load pressurization parameter to be greater than or equal to the first peak performance index, adjust the delayed pressurization parameter to be less than or equal to the second peak performance index, and adjust the error rate pressurization parameter Is less than or equal to the third peak performance index; after the completion of parameter adjustment, according to the number of online users and the number of user requests per second that are positively related to the three pressurization parameters, determine the performance of the device under test in the current test environment The maximum performance index of the server.
有益效果Beneficial effect
上述加压参数自适应调节方法、装置、计算机设备及存储介质,根据预设的第一正相关函数、第二正相关函数和第三正相关函数来计算出在当前测试环境下的负载加压参数、延迟加压参数和错误率加压参数,并将该负载加压参数、延迟加压参数和错误率加压参数与当前测试环境下的第一性能峰值指标、第二性能峰值指标和第三性能峰值指标进行对比,以实现对加压参数进行调节,并确定出被测设备在当前测试环境下的服务器最大性能指标,可见,本申请解决了目前的http性能测试工具需人为不断调节加压参数和对变换的测试环境适应差的问题,因此本申请一方面可避免http性能测试中人为调节加压参数的繁琐过程,进而可节省测试时间,另一方面可适应于多种测试环境,可根据测试环境去变换性能峰值指标后自适应调节加压参数,有利于自动化回归的性能指标测试。The above-mentioned adaptive adjustment method, device, computer equipment and storage medium of the pressure parameter calculate the load pressure in the current test environment according to the preset first positive correlation function, second positive correlation function and third positive correlation function. Parameters, delayed pressurization parameters, and error rate pressurization parameters, and compare the load pressurization parameters, delayed pressurization parameters, and error rate pressurization parameters with the first peak performance index, second peak performance index, and second performance under the current test environment. The three peak performance indicators are compared to adjust the pressure parameters and determine the maximum server performance indicators of the device under test in the current test environment. It can be seen that this application solves the problem that the current http performance test tools need to be adjusted manually. Pressure parameters and poor adaptation to the changing test environment. Therefore, this application can avoid the tedious process of artificially adjusting the pressure parameters in the http performance test on the one hand, thereby saving test time, and on the other hand, it can be adapted to a variety of test environments. The pressure parameter can be adjusted adaptively after changing the performance peak index according to the test environment, which is conducive to the automatic regression of the performance index test.
附图说明Description of the drawings
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions of the embodiments of the present application more clearly, the following will briefly introduce the drawings that need to be used in the description of the embodiments of the present application. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative labor.
图1是本申请一实施例中加压参数自适应调节方法的一应用环境示意图;FIG. 1 is a schematic diagram of an application environment of a method for adaptive adjustment of a pressure parameter in an embodiment of the present application;
图2是本申请一实施例中加压参数自适应调节方法的一流程图;FIG. 2 is a flowchart of a method for adaptive adjustment of pressure parameters in an embodiment of the present application;
图3是本申请一实施例中加压参数自适应调节装置的结构示意图;FIG. 3 is a schematic structural diagram of a pressure parameter adaptive adjustment device in an embodiment of the present application;
图4是本申请一实施例中计算机设备的一示意图。Fig. 4 is a schematic diagram of a computer device in an embodiment of the present application.
本发明的最佳实施方式The best mode of the present invention
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of them. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
本申请提供的加压参数自适应调节方法,可应用在如图1的应用环境中,其中,客户端通过网络与服务器进行通信。其中,客户端可以但不限于各种个人计算机、笔记本电脑、 智能手机、平板电脑和便携式可穿戴设备。服务器可以用独立的服务器或者是多个服务器组成的服务器集群来实现。The self-adjusting method for pressurization parameters provided by the present application can be applied in the application environment as shown in FIG. 1, in which the client communicates with the server through the network. Among them, the client can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices. The server can be implemented as an independent server or a server cluster composed of multiple servers.
在一实施例中,如图2所示,提供一种加压参数自适应调节方法,以该方法应用在图1中的服务器为例进行说明,包括如下步骤:In an embodiment, as shown in FIG. 2, a method for adaptive adjustment of compression parameters is provided. Taking the method applied to the server in FIG. 1 as an example for description, the method includes the following steps:
S10,根据在线用户数与用户每秒请求数生成被测设备的负载信息的第一正相关函数、请求平均延迟值的第二正相关函数,以及请求错误率的第三正相关函数;S10, generating a first positive correlation function of the load information of the device under test, a second positive correlation function of the request average delay value, and a third positive correlation function of the request error rate according to the number of online users and the number of user requests per second;
可理解地,本实施例执行主体为自适应的http性能压测工具所对应的服务器。Understandably, the execution subject of this embodiment is the server corresponding to the adaptive http performance stress measurement tool.
本实施例中,根据在线用户数与用户每秒请求数生成被测设备的负载信息的第一正相关函数;可理解地,在被测设备的使用过程中,首先基于在线用户数C与用户每秒请求数R所形成的加压参数函数g(C,R),之后,在加压参数函数g(C,R)的函数值不为0的前提下,实际检测得到被测设备的负载信息会首先随着在线用户数与用户每秒请求数的增加逐渐增加,并在一定时间后减缓,该特性符合对数函数的特性。在另一实施例中,在基于在线用户数C与用户每秒请求数R所形成的加压参数函数g(C,R)的函数值为0的前提下,g(C,R)=0,此时,第一正相关函数为常数函数。基于上述内容,本实施例中的第一正相关函数可被具体抽象成
Figure PCTCN2020098809-appb-000001
其中,c为被测设备的负载信息;g(C,R)也可理解为一种加压参数函数,加压参数函数中的C和R两者中其中一个为0时,g(C,R)=0,且C与R之间并不互相影响,可将g(C,R)假定为g(C,R)=C*R;a和b为在被测设备所在当前测试环境下的第一环境参数和第二环境参数,该第一环境参数和第二环境参数可根据当前测试环境设置成一个常数,其中,a和b都大于0;x应当大于1,该第一正相关函数才为正相关类型的函数。
In this embodiment, the first positive correlation function of the load information of the device under test is generated according to the number of online users and the number of user requests per second; understandably, during the use of the device under test, the first positive correlation function is based on the number of online users C and the number of users The pressure parameter function g(C,R) formed by the number of requests per second R. After that, under the premise that the function value of the pressure parameter function g(C,R) is not 0, the load of the device under test is actually detected Information will first gradually increase with the increase in the number of online users and the number of user requests per second, and then slow down after a certain period of time. This characteristic conforms to the characteristic of a logarithmic function. In another embodiment, on the premise that the function value of the pressurization parameter function g(C,R) formed based on the number of online users C and the number of user requests per second R is 0, g(C,R)=0 , At this time, the first positive correlation function is a constant function. Based on the above content, the first positive correlation function in this embodiment can be specifically abstracted into
Figure PCTCN2020098809-appb-000001
Among them, c is the load information of the device under test; g(C,R) can also be understood as a pressure parameter function. When one of C and R in the pressure parameter function is 0, g(C, R)=0, and C and R do not affect each other, g(C,R) can be assumed to be g(C,R)=C*R; a and b are in the current test environment where the device under test is located The first environmental parameter and the second environmental parameter, the first environmental parameter and the second environmental parameter can be set to a constant according to the current test environment, where a and b are both greater than 0; x should be greater than 1, the first positive correlation Functions are functions of positive correlation type.
本实施例中,根据在线用户数与用户每秒请求数生成请求平均延迟值的第二正相关函数;可理解地,在被测设备的使用过程中,首先在基于在线用户数C与用户每秒请求数R所形成的加压参数函数w(C,R),之后,在加压参数函数w(C,R)的函数值大于或等于第一预设正整数的前提下,随着在线用户数与用户每秒请求数的增加,实际检测得到被测设备的请求平均延迟值的趋势会逐渐增加且趋势所反映的斜率也会逐渐增大,该特性符合指数函数的特性。在另一实施例中,在线用户数C与用户每秒请求数R所形成的加压参数函数w(C,R)的函数值大于等于0且小于第一预设正整数的前提下,在此,第二正相关函数为常数函数。基于上述内容,本实施例中的第二正相关函数可被具体抽象成l=i*n w(C,R)-i*n u;其中,l为请求平均延迟值;w(C,R)也可理解为一种加压参数函数,加压参数函数中的C和R两者中其中一个为0时,w(C,R)=0,且C与R之间并不互相没有影响,可将w(C,R)假定为w(C,R)=C*R;n为在被测设备所在当前测试环境下的第三环境参数,该第三环境参数可根据当前测试环境设置成一个常数,其中,i大于0;n为指数函数的底数,n大于1,n大于1才能使第二正相关函数为正相关类型的函数。 In this embodiment, the second positive correlation function of the average request delay value is generated according to the number of online users and the number of user requests per second; understandably, in the use process of the device under test, the first step is based on the number of online users C and the number of users per second. The pressurization parameter function w(C,R) formed by the number of second requests R, then, under the premise that the function value of the pressurization parameter function w(C,R) is greater than or equal to the first preset positive integer, with the online With the increase in the number of users and the number of user requests per second, the actual detection of the trend of the average delay value of the device under test will gradually increase and the slope reflected by the trend will gradually increase. This characteristic conforms to the characteristic of an exponential function. In another embodiment, the function value of the pressure parameter function w(C, R) formed by the number of online users C and the number of user requests per second R is greater than or equal to 0 and less than the first preset positive integer, under the premise that Therefore, the second positive correlation function is a constant function. Based on the above content, the second positive correlation function in this embodiment can be specifically abstracted as l=i*n w(C,R) -i* nu ; where l is the average request delay value; w(C,R ) Can also be understood as a pressurized parameter function. When one of C and R in the pressurized parameter function is 0, w(C,R)=0, and there is no mutual influence between C and R. , W(C,R) can be assumed to be w(C,R)=C*R; n is the third environmental parameter in the current test environment where the device under test is located, and the third environmental parameter can be set according to the current test environment As a constant, i is greater than 0; n is the base of the exponential function, n is greater than 1, and n is greater than 1 to make the second positive correlation function a positive correlation function.
本实施例中,根据在线用户数与用户每秒请求数生成请求错误率的第三正相关函数;可理解地,在被测设备的使用过程中,首先在基于在线用户数C与用户每秒请求数R所形成的加压参数函数t(C,R),之后,在加压参数函数t(C,R)的函数值大于或等于第二预设 正整数的前提下,随着在线用户数与用户每秒请求数的增加,实际检测得到被测设备的请求错误率的趋势会逐渐增加且无限接近于1,该特性符合对数函数的特性。在另一实施例中,在线用户数C与用户每秒请求数R所形成的加压参数函数w(C,R)的函数值大于等于0且小于第二预设正整数的前提下,在此,第三正相关函数为0。基于上述内容,本实施例中的第三正相关函数可被具体抽象成
Figure PCTCN2020098809-appb-000002
其中,e为请求平均延迟值;t(C,R)也可理解为一种加压参数函数,加压参数函数中的C和R两者中其中一个为0时,t(C,R)=0,且C与R之间互相没有影响,可将t(C,R)假定为t(C,R)=C*R;k和z为在被测设备所在当前测试环境下的第四环境参数,该第四环境参数可根据当前测试环境设置成一个常数,其中,k大于0;z为对数函数的底数,z大于1,z大于1才能使第三正相关函数为正相关类型的函数;w(t(C,R))为加压参数函数t(C,R)中的函数,其中,该函数存在一个特性,在t(C,R)趋近于正无穷时,w(t(C,R))为一个常数函数。
In this embodiment, the third positive correlation function of the request error rate is generated according to the number of online users and the number of user requests per second; understandably, in the use process of the device under test, the first step is based on the number of online users C and the number of users per second. The pressurization parameter function t(C,R) formed by the request number R, and then, on the premise that the function value of the pressurization parameter function t(C,R) is greater than or equal to the second preset positive integer, as the online user With the increase in the number of requests per second and the number of user requests per second, the actual detection of the trend of the request error rate of the device under test will gradually increase and infinitely close to 1. This characteristic conforms to the characteristic of the logarithmic function. In another embodiment, the function value of the pressure parameter function w(C, R) formed by the number of online users C and the number of user requests per second R is greater than or equal to 0 and less than the second preset positive integer, under the premise that Therefore, the third positive correlation function is zero. Based on the above content, the third positive correlation function in this embodiment can be specifically abstracted into
Figure PCTCN2020098809-appb-000002
Among them, e is the average delay value of the request; t(C,R) can also be understood as a pressure parameter function. When one of C and R in the pressure parameter function is 0, t(C,R) = 0, and there is no mutual influence between C and R, t(C,R) can be assumed as t(C,R)=C*R; k and z are the fourth in the current test environment where the device under test is located Environmental parameter, the fourth environmental parameter can be set as a constant according to the current test environment, where k is greater than 0; z is the base of the logarithmic function, z is greater than 1, and z is greater than 1 to make the third positive correlation function a positive correlation type The function of; w(t(C,R)) is a function in the pressurized parameter function t(C,R), which has a characteristic, when t(C,R) approaches positive infinity, w (t(C,R)) is a constant function.
S20,在接收到当前测试环境的测试请求时,获取与所述当前测试环境关联的初始在线用户数和初始用户每秒请求数;S20: When a test request of the current test environment is received, obtain the number of initial online users and the number of initial user requests per second associated with the current test environment;
可理解地,测试请求是向与服务器连接的至少一个以上的测试接口请求进行测试;一个当前测试环境可关联至少一个测试接口,测试接口可为订单支付接口和商品描述接口等。Understandably, the test request is a request for testing from at least one test interface connected to the server; a current test environment can be associated with at least one test interface, and the test interface can be an order payment interface, a product description interface, and the like.
本实施例是在接收到用户发出的与当前测试环境关联的测试请求时,以通过资源监控模块获取预设请求时间段内(发出测试请求的实际时间)的初始在线用户数和初始用户每秒请求数。In this embodiment, when a test request associated with the current test environment is received from a user, the resource monitoring module obtains the initial number of online users and initial users per second within the preset request time period (the actual time when the test request is issued) The number of requests.
S30,在预设请求时间段内,根据所述初始在线用户数和所述初始用户每秒请求数,获取所述第一正相关函数输出的负载加压参数、所述第二正相关函数输出的延迟加压参数和所述第三正相关函数输出的错误率加压参数。S30. In a preset request time period, according to the initial number of online users and the number of initial user requests per second, obtain the load pressure parameter output by the first positive correlation function and the output of the second positive correlation function The delayed pressurization parameter and the error rate pressurization parameter output by the third positive correlation function.
本实施例通过上述中的第一正相关函数、第二正相关函数和第三正相关函数分别去获取负载加压参数、延迟加压参数和错误率加压参数,其中,负载加压参数为第一正相关函数输出的被测设备的负载信息,延迟加压参数为第二正相关函数输出的请求平均延迟值,错误率加压参数为第三正相关函数输出的请求错误率。In this embodiment, the first positive correlation function, the second positive correlation function, and the third positive correlation function are used to obtain the load pressurization parameter, the delay pressurization parameter, and the error rate pressurization parameter, respectively, where the load pressurization parameter is The load information of the device under test output by the first positive correlation function, the delay pressure parameter is the request average delay value output by the second positive correlation function, and the error rate pressure parameter is the request error rate output by the third positive correlation function.
S40,接收全部参数调节指令,将所述负载加压参数调节为大于或等于第一性能峰值指标,并将所述延迟加压参数调节为小于或等于第二性能峰值指标,以及将所述错误率加压参数调节为小于或等于第三性能峰值指标;S40. Receive all parameter adjustment instructions, adjust the load pressurization parameter to be greater than or equal to the first peak performance index, adjust the delayed pressurization parameter to be less than or equal to the second peak performance index, and correct the error The rate pressure parameter is adjusted to be less than or equal to the third peak performance index;
本实施例中是在同时满足于上述提到的在线用户数C与用户每秒请求数R所形成的加压参数函数g(C,R)的函数值不为0,在线用户数C与用户每秒请求数R所形成的加压参数函数w(C,R)的函数值大于或等于第一预设正整数和在线用户数C与用户每秒请求数R所形成的加压参数函数t(C,R)的函数值大于或等于第二预设正整数的条件下,才通过自适应调节模块同时以第一性能峰值指标、第二性能峰值指标和第三性能峰值指标分别对负载加压参数、延迟加压参数和错误率加压参数进行调节,其中,不同测试环境下的测试接口所对应的第一性能峰值指标、第二性能峰值指标和第三性能峰值指标都会变化,如订单支付接口的请求错误率所对应的第三性能峰值指标为e 1,商品描述接口的请求错误率所对 应的第三性能峰值指标为e 2,由于订单支付接口是一个比商品描述接口更为复杂的测试接口,对成功率具有很高的要求(一旦订单支付接口支付失败,订单支付接口中的商品配额的回退和支付***的结果回退的情况将产生不小的开销),但商品描述接口对成功率没有较高的要求(即使商品描述接口中出现失败,也不会出现需要其它组件***回退的情况),因此e 1小于e 2In this embodiment, the function value of the pressurization parameter function g(C,R) formed by satisfying the above-mentioned number of online users C and the number of user requests per second R is not 0, and the number of online users C and users The function value of the pressurization parameter function w(C,R) formed by the number of requests per second R is greater than or equal to the first preset positive integer and the pressurization parameter function t formed by the number of online users C and the number of user requests per second R When the function value of (C, R) is greater than or equal to the second preset positive integer, the adaptive adjustment module simultaneously adds the first peak performance index, the second peak performance index and the third peak performance index to the load. Pressure parameters, delay pressure parameters and error rate pressure parameters are adjusted. Among them, the first peak performance index, the second peak performance index and the third peak performance index corresponding to the test interface under different test environments will change, such as orders The third peak performance indicator corresponding to the request error rate of the payment interface is e 1 , and the third peak performance indicator corresponding to the request error rate of the product description interface is e 2 , because the order payment interface is more complicated than the product description interface The test interface has high requirements on the success rate (once the payment of the order payment interface fails, the return of the product quota in the order payment interface and the result of the payment system will cause a lot of overhead), but the product description The interface does not have high requirements for the success rate (even if there is a failure in the product description interface, there will be no need for other component systems to roll back), so e 1 is less than e 2 .
S50,在完成参数调节后,根据与三种加压参数正相关的在线用户数与用户每秒请求数,确定所述被测设备在所述当前测试环境下的服务器最大性能指标。S50: After completing the parameter adjustment, determine the maximum server performance index of the device under test in the current test environment according to the number of online users and the number of user requests per second that are positively related to the three pressurization parameters.
本实施例通过结果收集模块确定出三种加压参数调节完成(完成将负载加压参数调节为大于或等于第一性能峰值指标,并将所述延迟加压参数调节为小于或等于第二性能峰值指标,以及将所述错误率加压参数调节为小于或等于第三性能峰值指标)后,以调节完成后与三种加压参数正相关的的在线用户数C与用户每秒请求数R所形成的公式q=C*R来计算当前测试环境下的服务器最大性能指标(在此提到的正相关,是由于第一正相关函数、第二正相关函数和第三正相关函数都为正相关函数,在自变量C和R增长时,因变量三种加压参数也会跟着增长;并且,在因变量三种加压参数变换时,自变量C和R也会变化,此时,就可得到跟随三种加压参数进行正相关变化的在线用户数C与用户每秒请求数R),以通过该服务器最大性能指标完成性能指标测试,此时,q为最大值,且q代表服务器最大性能指标。In this embodiment, through the result collection module, it is determined that the adjustment of the three pressure parameters is completed (the load pressure parameter is adjusted to be greater than or equal to the first peak performance index, and the delayed pressure parameter is adjusted to be less than or equal to the second performance. Peak index, and after adjusting the error rate pressure parameter to be less than or equal to the third performance peak index), the number of online users C and the number of user requests per second R that are positively related to the three pressure parameters after the adjustment is completed The formula q=C*R is formed to calculate the maximum performance index of the server under the current test environment (the positive correlation mentioned here is because the first positive correlation function, the second positive correlation function and the third positive correlation function are all Positive correlation function. When the independent variables C and R increase, the three pressure parameters of the dependent variable will also increase; and when the three pressure parameters of the dependent variable change, the independent variables C and R will also change. At this time, The number of online users C and the number of user requests per second R) that follow the three pressure parameters for positive correlation changes can be obtained, and the performance index test can be completed by the maximum performance index of the server. At this time, q is the maximum value, and q represents The maximum performance index of the server.
在步骤S10至步骤S50所在的实施例中,以自适应调节加压参数去解决目前人为调节加压参数的繁琐问题,进而节省人力和时间成本,也避免人为调节加压参数产生失误的情况,且可适应于多种当前测试环境,避免当前测试环境的变化对加压参数调节过程的影响,进而有利于自动化的性能指标测试,且以构建的数学模型将性能指标测试的过程进行模型化和标准化,进而减少性能指标测试所产生的误差,提高服务器最大性能指标结果的准确度。In the embodiment where steps S10 to S50 are located, adaptive adjustment of the pressure parameters is used to solve the current tedious problem of artificially adjusting the pressure parameters, thereby saving manpower and time costs, and avoiding errors in the artificial adjustment of the pressure parameters. It can be adapted to a variety of current test environments to avoid the impact of changes in the current test environment on the adjustment process of the pressurization parameters, thereby facilitating automated performance index testing, and the mathematical model constructed is used to model and model the process of performance index testing. Standardization, thereby reducing errors in performance index testing, and improving the accuracy of the server's maximum performance index results.
进一步地,所述获取所述第一正相关函数输出的负载加压参数、所述第二正相关函数输出的延迟加压参数和所述第三正相关函数输出的错误率加压参数之后,还包括:Further, after said obtaining the load pressurization parameter output by the first positive correlation function, the delayed pressurization parameter output by the second positive correlation function, and the error rate pressurization parameter output by the third positive correlation function, Also includes:
在检测到三个调节条件均满足时,生成所述全部参数调节指令;所述调解条件包括:所述负载加压参数小于所述第一性能峰值指标,所述延迟加压参数调节大于所述第二性能峰值指标,且所述错误率加压参数调节大于所述第三性能峰值指标;When it is detected that all three adjustment conditions are satisfied, the all parameter adjustment instructions are generated; the adjustment conditions include: the load pressurization parameter is less than the first peak performance index, and the delay pressurization parameter adjustment is greater than the A second peak performance index, and the error rate boosting parameter adjustment is greater than the third peak performance index;
在检测到所述调解条件中有且仅有一个或两个未被满足时,生成部分参数调节指令,以根据所述部分参数调节指令对未被满足的所述调节条件对应的加压参数完成调节之后,根据与三种所述加压参数正相关的在线用户数与用户每秒请求数,确定所述被测设备在所述当前测试环境下的服务器最大性能指标;When it is detected that one and only one or two of the adjustment conditions are not satisfied, a partial parameter adjustment instruction is generated to complete the pressurization parameter corresponding to the adjustment condition that is not satisfied according to the partial parameter adjustment instruction After the adjustment, determine the maximum server performance index of the device under test in the current test environment according to the number of online users and the number of user requests per second that are positively related to the three kinds of pressurization parameters;
在检测到所有所述调节条件均未被满足时,直接根据与三种所述加压参数正相关的在线用户数与用户每秒请求数,确定所述被测设备在所述当前测试环境下的服务器最大性能指标。When it is detected that all the adjustment conditions are not met, it is determined directly according to the number of online users and the number of user requests per second that are positively correlated with the three kinds of pressurization parameters to determine that the device under test is in the current test environment The maximum performance index of the server.
本实施例是用于判断负载加压参数、延迟加压参数和错误率加压参数是否已达到性能 峰值指标,对达到性能峰值指标的加压参数进行记录,对未达到性能峰值指标的加压参数进行再次调节,其中,加压参数是指负载加压参数、延迟加压参数和错误率加压参数,性能峰值是指标为第一性能峰值指标、第二性能峰值指标和第三性能峰值指标,可见,本实施例可避免无效执行对达到性能峰值指标的加压参数进行调节的动作。This embodiment is used to determine whether the load pressurization parameter, the delay pressurization parameter, and the error rate pressurization parameter have reached the peak performance index, record the pressurization parameter that has reached the peak performance index, and pressurize the pressure that has not reached the peak performance index. The parameters are adjusted again. Among them, the pressurization parameter refers to the load pressurization parameter, the delay pressurization parameter and the error rate pressurization parameter, and the performance peak is the first performance peak index, the second performance peak index and the third performance peak index. It can be seen that this embodiment can avoid the invalid execution of the action of adjusting the pressurization parameter that reaches the peak performance index.
进一步地,所述确定所述被测设备在所述当前测试环境下的服务器最大性能指标之后,还包括:Further, after determining the maximum server performance index of the device under test in the current test environment, the method further includes:
根据所述服务器最大性能指标计算出所述被测设备在所述当前测试环境下可执行的运行项目,将所有可执行的所述运行项目以数据图谱的形式进行关系连接,以组合成包含所述运行项目的多组运行项目组。Calculate the executable run items of the device under test in the current test environment according to the maximum performance index of the server, and connect all the executable run items in the form of a data map to combine them to include all The multi-group operation item group of the operation item described above.
可理解地,运行项目可为各种接口的实际操作,如从接口拉取数据等。Understandably, the running project can be the actual operation of various interfaces, such as pulling data from the interface.
本实施例是根据服务器最大性能指标和被测设备执行运行项目所需的性能指标来计算出被测设备在当前测试环境下所能执行的运行项目,其中,运行项目会被组合成运行项目组,以直观的数据图谱形式将运行项目组呈现,以供后续用户可进行选择,避免由于运行过程中超出该最大性能指标而导致被测设备出现宕机现象。In this embodiment, the operating items that the tested device can execute in the current test environment are calculated based on the maximum performance index of the server and the performance indicators required by the tested device to execute the operating project. Among them, the operating items will be combined into an operating project group. , Present the running project group in the form of an intuitive data graph for subsequent users to choose, avoiding the downtime of the tested equipment due to exceeding the maximum performance index during the running process.
进一步地,所述在接收到当前测试环境的测试请求之前,还包括:Further, before receiving the test request of the current test environment, the method further includes:
令压力器模拟用户客户端行为,获取所述压力器按照所述当前测试环境向目标接口发送的预设数量的所述测试请求。Let the pressure gauge simulate the behavior of the user client, and obtain the preset number of the test requests sent by the pressure gauge to the target interface according to the current test environment.
本实施例是为了令压力器模拟用户客户端向测试接口发送出预设数量的关于http的测试请求,其中,压力器、资源监控模块、结果收集模块和自适应调节模块集成为一种自适应的http性能压测工具。This embodiment is to make the pressure gauge simulate the user client to send a preset number of HTTP test requests to the test interface, where the pressure gauge, the resource monitoring module, the result collection module, and the adaptive adjustment module are integrated into an adaptive Http performance stress testing tool.
进一步地,所述获取所述压力器按照所述当前测试环境发送的预设数量的所述测试请求之前,还包括:Further, before the obtaining the preset number of test requests sent by the pressure device according to the current test environment, the method further includes:
从所述用户客户端中的预设路径中获取与所述当前测试环境关联的描述信息;Acquiring description information associated with the current test environment from a preset path in the user client;
根据所述描述信息生成向所述目标接口发送预设数量的所述测试请求的执行命令。According to the description information, an execution command for sending a preset number of the test request to the target interface is generated.
可理解地,预设路径是指描述信息存储至用户客户端的存储路径,描述信息是指示用户客户端向当前测试环境中的测试接口发送信息交互协议的文件信息,其中,通过该信息交互协议的文件信息可生成发送预设数量的测试请求的执行命令。Understandably, the preset path refers to the storage path for storing the description information to the user client. The description information is the file information instructing the user client to send the information exchange protocol to the test interface in the current test environment. File information can generate execution commands for sending a preset number of test requests.
进一步地,所述在接收到当前测试环境的测试请求之前,还包括:Further, before receiving the test request of the current test environment, the method further includes:
实时监测所述当前测试环境下的所述被测设备的网络环境,在所述网络环境存在预设问题时,根据与所述预设问题对应的调节措施对所述网络环境进行网络调试。The network environment of the device under test in the current test environment is monitored in real time, and when a preset problem exists in the network environment, network debugging is performed on the network environment according to adjustment measures corresponding to the preset problem.
可理解地,预设问题可指被测设备出现网络异常,并且由于该网络异常而导致被测设备与局域网出现连接失败的现象。通过本实施例可初步确定出被测设备的网络环境以及时去解决网络环境中存在的网络异常问题,避免后续直接影响到性能指标测试过程中加压参数的调节。Understandably, the preset problem may refer to a network abnormality of the tested device, and the failure of the connection between the tested device and the local area network due to the network abnormality. Through this embodiment, the network environment of the device under test can be preliminarily determined to solve the network abnormality problem existing in the network environment in a timely manner, so as to avoid the subsequent direct influence on the adjustment of the pressure parameter during the performance index test process.
进一步地,所述在预设请求时间段内,根据所述初始在线用户数和所述初始用户每秒请求数,获取所述第一正相关函数输出的负载加压参数、所述第二正相关函数输出的延迟 加压参数和所述第三正相关函数输出的错误率加压参数,还包括:Further, in the preset request time period, according to the initial number of online users and the initial number of user requests per second, the load pressure parameter output by the first positive correlation function, the second positive The delayed pressurization parameter output by the correlation function and the error rate pressurization parameter output by the third positive correlation function further include:
在确认所述第一正相关函数不为0时,在预设请求时间段内根据所述初始在线用户数和所述初始用户每秒请求数,获取所述第一正相关函数输出的所述负载加压参数;When it is confirmed that the first positive correlation function is not 0, obtain the output of the first positive correlation function according to the initial number of online users and the number of initial user requests per second within a preset request time period Load pressurization parameters;
在确认所述第二正相关函数大于或等于第一预设正整数时,在预设请求时间段内根据所述初始在线用户数和所述初始用户每秒请求数,获取所述第二正相关函数输出的所述延迟加压参数;When it is confirmed that the second positive correlation function is greater than or equal to a first preset positive integer, the second positive correlation function is obtained according to the number of initial online users and the number of initial user requests per second within a preset request time period. The delay pressurization parameter output by the correlation function;
在确认所述第三正相关函数大于或等于第二预设正整数时,在预设请求时间段内根据所述初始在线用户数和所述初始用户每秒请求数,获取所述第三正相关函数输出的所述错误率加压参数。When it is confirmed that the third positive correlation function is greater than or equal to a second preset positive integer, the third positive correlation function is obtained according to the number of initial online users and the number of initial user requests per second within a preset request time period. The error rate output by the correlation function pressurizes the parameter.
可理解地,本实施例为三种加压参数进行调节的条件。Understandably, this embodiment is a condition for adjusting the three pressurization parameters.
综上所述,上述提供了一种加压参数自适应调节方法,根据预设的第一正相关函数、第二正相关函数和第三正相关函数来计算出在当前测试环境下的负载加压参数、延迟加压参数和错误率加压参数,并将该负载加压参数、延迟加压参数和错误率加压参数与当前测试环境下的第一性能峰值指标、第二性能峰值指标和第三性能峰值指标进行对比,以实现对加压参数进行调节,并确定出被测设备在当前测试环境下的服务器最大性能指标,可见,该方法解决了目前的http性能测试工具需人为不断调节加压参数和对变换的测试环境适应差的问题,因此该方法一方面可避免http性能测试中人为调节加压参数的繁琐过程,进而可节省测试时间,另一方面可适应于多种测试环境,可根据测试环境去变换性能峰值指标后自适应调节加压参数,有利于自动化回归的性能指标测试。In summary, the foregoing provides an adaptive adjustment method for pressure parameters, which calculates the load increase in the current test environment according to the preset first positive correlation function, second positive correlation function, and third positive correlation function. Pressure parameters, delayed pressure parameters, and error rate pressure parameters, and compare the load pressure parameters, delayed pressure parameters, and error rate pressure parameters with the first peak performance index, second peak performance index and the current test environment. The third peak performance index is compared to adjust the pressure parameters and determine the maximum server performance index of the device under test in the current test environment. It can be seen that this method solves the current HTTP performance test tools that need to be adjusted continuously. Pressure parameters and poor adaptation to the changed test environment. Therefore, this method can avoid the tedious process of artificially adjusting the pressure parameters in the http performance test on the one hand, thereby saving test time, and on the other hand, it can be adapted to a variety of test environments. , Can adjust the pressure parameter adaptively after changing the performance peak index according to the test environment, which is conducive to the automatic regression performance index test.
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that the size of the sequence number of each step in the foregoing embodiment does not mean the order of execution. The execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
在一实施例中,提供一种加压参数自适应调节装置,该加压参数自适应调节装置与上述实施例中加压参数自适应调节方法一一对应。如图3所示,该加压参数自适应调节装置包括第一生成模块11、第一获取模块12、第二获取模块13、调节模块14和第一确定模块15。各功能模块详细说明如下:In an embodiment, an adaptive adjustment device for a compression parameter is provided, and the adaptive adjustment device for a compression parameter corresponds to the adaptive adjustment method for a compression parameter in the above-mentioned embodiment in a one-to-one correspondence. As shown in FIG. 3, the pressure parameter adaptive adjustment device includes a first generation module 11, a first acquisition module 12, a second acquisition module 13, an adjustment module 14 and a first determination module 15. The detailed description of each functional module is as follows:
第一生成模块11,用于根据在线用户数与用户每秒请求数生成被测设备的负载信息的第一正相关函数、请求平均延迟值的第二正相关函数,以及请求错误率的第三正相关函数;The first generating module 11 is used to generate the first positive correlation function of the load information of the device under test, the second positive correlation function of the request average delay value, and the third request error rate according to the number of online users and the number of user requests per second. Positive correlation function
第一获取模块12,用于在接收到当前测试环境的测试请求时,获取与所述当前测试环境关联的初始在线用户数和初始用户每秒请求数;The first obtaining module 12 is configured to obtain the initial number of online users and the number of initial user requests per second associated with the current test environment when a test request of the current test environment is received;
第二获取模块13,用于在预设请求时间段内,根据所述初始在线用户数和所述初始用户每秒请求数,获取所述第一正相关函数输出的负载加压参数、所述第二正相关函数输出的延迟加压参数和所述第三正相关函数输出的错误率加压参数;The second acquisition module 13 is configured to acquire the load pressurization parameter output by the first positive correlation function, the load pressurization parameter output by the first positive correlation function, and the number of requests per second according to the initial number of online users and the number of initial user requests per second within a preset request period The delayed pressurization parameter output by the second positive correlation function and the error rate pressurization parameter output by the third positive correlation function;
调节模块14,用于接收全部参数调节指令,将所述负载加压参数调节为大于或等于第一性能峰值指标,并将所述延迟加压参数调节为小于或等于第二性能峰值指标,以及将所述错误率加压参数调节为小于或等于第三性能峰值指标;The adjustment module 14 is configured to receive all parameter adjustment instructions, adjust the load pressurization parameter to be greater than or equal to the first peak performance index, and adjust the delayed pressurization parameter to be less than or equal to the second peak performance index, and Adjusting the error rate boosting parameter to be less than or equal to the third peak performance index;
第一确定模块15,用于在完成参数调节后,根据与三种加压参数正相关的在线用户数 与用户每秒请求数,确定所述被测设备在所述当前测试环境下的服务器最大性能指标。The first determining module 15 is used to determine the maximum number of servers of the device under test in the current test environment based on the number of online users that are positively related to the three pressurization parameters and the number of user requests per second after the parameter adjustment is completed. Performance.
进一步地,所述加压参数自适应调节装置还包括:Further, the pressure parameter adaptive adjustment device further includes:
第二生成模块,用于在检测到三个调节条件均满足时,生成所述全部参数调节指令;所述调解条件包括:所述负载加压参数小于所述第一性能峰值指标,所述延迟加压参数调节大于所述第二性能峰值指标,且所述错误率加压参数调节大于所述第三性能峰值指标;The second generation module is configured to generate all the parameter adjustment instructions when it is detected that all three adjustment conditions are satisfied; the adjustment conditions include: the load pressurization parameter is less than the first peak performance index, and the delay The adjustment of the pressure parameter is greater than the second peak performance indicator, and the adjustment of the error rate pressure parameter is greater than the third peak performance indicator;
第二确定模块,用于在检测到所述调解条件中有且仅有一个或两个未被满足时,生成部分参数调节指令,以根据所述部分参数调节指令对未被满足的所述调节条件对应的加压参数完成调节之后,根据与三种所述加压参数正相关的在线用户数与用户每秒请求数,确定所述被测设备在所述当前测试环境下的服务器最大性能指标;The second determination module is used to generate a partial parameter adjustment instruction when it is detected that one and only one or two of the adjustment conditions are not satisfied, so as to adjust the unsatisfied parameters according to the partial parameter adjustment instruction. After the adjustment of the pressurization parameters corresponding to the conditions is completed, the maximum server performance index of the device under test in the current test environment is determined according to the number of online users and the number of user requests per second that are positively related to the three pressurization parameters ;
第三确定模块,用于在检测到所有所述调节条件均未被满足时,直接根据与三种所述加压参数正相关的在线用户数与用户每秒请求数,确定所述被测设备在所述当前测试环境下的服务器最大性能指标。The third determining module is used to directly determine the device under test based on the number of online users and the number of user requests per second that are positively related to the three types of pressurization parameters when it is detected that all the adjustment conditions are not met The maximum performance index of the server in the current test environment.
进一步地,所述加压参数自适应调节装置还包括:Further, the pressure parameter adaptive adjustment device further includes:
组合模块,用于根据所述服务器最大性能指标计算出所述被测设备在所述当前测试环境下可执行的运行项目,将所有可执行的所述运行项目以数据图谱的形式进行关系连接,以组合成包含所述运行项目的多组运行项目组。The combination module is used to calculate the executable running items of the device under test in the current test environment according to the maximum performance index of the server, and to connect all the executable running items in the form of a data map. To be combined into a plurality of operating project groups including the operating project.
进一步地,所述加压参数自适应调节装置还包括:Further, the pressure parameter adaptive adjustment device further includes:
发送模块,用于令压力器模拟用户客户端行为,获取所述压力器按照所述当前测试环境向目标接口发送的预设数量的所述测试请求。The sending module is configured to make the pressure gauge simulate the behavior of the user client, and obtain the preset number of the test requests sent by the pressure gauge to the target interface according to the current test environment.
进一步地,所述加压参数自适应调节装置还包括:Further, the pressure parameter adaptive adjustment device further includes:
第三获取模块,用于从所述用户客户端中的预设路径中获取与所述当前测试环境关联的描述信息;The third obtaining module is configured to obtain the description information associated with the current test environment from the preset path in the user client;
第三生成模块,用于根据所述描述信息生成向所述目标接口发送预设数量的所述测试请求的执行命令。The third generation module is configured to generate an execution command for sending a preset number of the test request to the target interface according to the description information.
进一步地,所述加压参数自适应调节装置还包括:Further, the pressure parameter adaptive adjustment device further includes:
调试模块,用于实时监测所述当前测试环境下的所述被测设备的网络环境,在所述网络环境存在预设问题时,根据与所述预设问题对应的调节措施对所述网络环境进行网络调试。The debugging module is used for real-time monitoring of the network environment of the device under test in the current test environment. When a preset problem exists in the network environment, the network environment is adjusted according to the adjustment measures corresponding to the preset problem. Perform network debugging.
进一步地,所述加压参数自适应调节装置还包括:Further, the pressure parameter adaptive adjustment device further includes:
第三获取模块,用于在确认所述第一正相关函数不为0时,在预设请求时间段内根据所述初始在线用户数和所述初始用户每秒请求数,获取所述第一正相关函数输出的所述负载加压参数;The third acquiring module is configured to, when it is confirmed that the first positive correlation function is not 0, within a preset request time period, according to the number of initial online users and the number of initial user requests per second, to acquire the first The load pressurization parameter output by the positive correlation function;
第三获取模块,用于在确认所述第二正相关函数大于或等于第一预设正整数时,在预设请求时间段内根据所述初始在线用户数和所述初始用户每秒请求数,获取所述第二正相关函数输出的所述延迟加压参数;The third acquiring module is configured to, when it is confirmed that the second positive correlation function is greater than or equal to a first preset positive integer, according to the number of initial online users and the number of initial user requests per second within a preset request time period , Acquiring the delay pressurization parameter output by the second positive correlation function;
第四获取模块,用于在确认所述第三正相关函数大于或等于第二预设正整数时,在预 设请求时间段内根据所述初始在线用户数和所述初始用户每秒请求数,获取所述第三正相关函数输出的所述错误率加压参数。The fourth acquiring module is configured to, when it is confirmed that the third positive correlation function is greater than or equal to a second preset positive integer, according to the initial number of online users and the number of initial user requests per second within a preset request time period To obtain the error rate boosting parameter output by the third positive correlation function.
关于加压参数自适应调节装置的具体限定可以参见上文中对于加压参数自适应调节方法的限定,在此不再赘述。上述加压参数自适应调节装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For the specific definition of the pressure parameter adaptive adjustment device, please refer to the above definition of the pressure parameter adaptive adjustment method, which will not be repeated here. The various modules in the above-mentioned pressure parameter adaptive adjustment device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图4所示。该计算机设备包括通过***总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作***、计算机程序和数据库。该内存储器为非易失性存储介质中的操作***和计算机程序的运行提供环境。该计算机设备的数据库用于存储加压参数自适应调节方法中涉及到的数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种加压参数自适应调节方法,其中,所述加压参数自适应调节方法包括:根据在线用户数与用户每秒请求数生成被测设备的负载信息的第一正相关函数、请求平均延迟值的第二正相关函数,以及请求错误率的第三正相关函数;在接收到当前测试环境的测试请求时,获取与所述当前测试环境关联的初始在线用户数和初始用户每秒请求数;在预设请求时间段内,根据所述初始在线用户数和所述初始用户每秒请求数,获取所述第一正相关函数输出的负载加压参数、所述第二正相关函数输出的延迟加压参数和所述第三正相关函数输出的错误率加压参数;接收全部参数调节指令,将所述负载加压参数调节为大于或等于第一性能峰值指标,并将所述延迟加压参数调节为小于或等于第二性能峰值指标,以及将所述错误率加压参数调节为小于或等于第三性能峰值指标;在完成参数调节后,根据与三种加压参数正相关的在线用户数与用户每秒请求数,确定所述被测设备在所述当前测试环境下的服务器最大性能指标。In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. 4. The computer equipment includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of the computer device is used to provide calculation 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 computer programs in the non-volatile storage medium. The database of the computer equipment is used to store the data involved in the adaptive adjustment method of the pressure parameter. The network interface of the computer device is used to communicate with an external terminal through a network connection. The computer program is executed by the processor to realize an adaptive adjustment method of pressurization parameters, wherein the adaptive adjustment method of pressurization parameters includes: generating load information of the device under test according to the number of online users and the number of user requests per second The first positive correlation function of the request average delay value, the second positive correlation function of the request average delay value, and the third positive correlation function of the request error rate; when the test request of the current test environment is received, the initial The number of online users and the number of initial user requests per second; within a preset request time period, according to the number of initial online users and the number of initial user requests per second, the load pressure parameter output by the first positive correlation function is obtained , The delayed pressurization parameter output by the second positive correlation function and the error rate pressurization parameter output by the third positive correlation function; receive all parameter adjustment instructions, and adjust the load pressurization parameter to be greater than or equal to the first Peak performance index, and adjust the delay pressurization parameter to be less than or equal to the second peak performance index, and adjust the error rate pressurization parameter to be less than or equal to the third peak performance index; after the parameter adjustment is completed, according to The number of online users and the number of user requests per second that are positively related to the three pressure parameters determine the maximum server performance index of the device under test in the current test environment.
在一个实施例中,提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行计算机程序时实现上述实施例中加压参数自适应调节方法的步骤,例如图2所示的步骤S10至步骤S50。或者,处理器执行计算机程序时实现上述实施例中加压参数自适应调节装置的各模块/单元的功能,例如图3所示模块11至模块15的功能。为避免重复,这里不再赘述。In one embodiment, a computer device is provided, which includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor. When the processor executes the computer program, the pressure parameter adaptation in the above-mentioned embodiment is implemented. The steps of the adjustment method are, for example, step S10 to step S50 shown in FIG. 2. Or, when the processor executes the computer program, the function of each module/unit of the pressure parameter adaptive adjustment device in the above-mentioned embodiment is realized, for example, the function of the module 11 to the module 15 shown in FIG. 3. To avoid repetition, I won’t repeat them here.
在一个实施例中,提供了一种计算机可读存储介质,所述存储介质为易失性存储介质或非易失性存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现上述实施例中加压参数自适应调节方法的步骤,例如图2所示的步骤S10至步骤S50。或者,计算机程序被处理器执行时实现上述实施例中加压参数自适应调节装置的各模块/单元的功能,例如图3所示模块11至模块15的功能。为避免重复,这里不再赘述。In one embodiment, a computer-readable storage medium is provided. The storage medium is a volatile storage medium or a non-volatile storage medium, and a computer program is stored thereon. When the computer program is executed by a processor, the foregoing The steps of the pressure parameter adaptive adjustment method in the embodiment are, for example, step S10 to step S50 shown in FIG. 2. Alternatively, when the computer program is executed by the processor, the function of each module/unit of the pressure parameter adaptive adjustment device in the above embodiment is realized, for example, the function of the module 11 to the module 15 shown in FIG. 3. To avoid repetition, I won’t repeat them here.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过 计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage. In the medium, when the computer program is executed, it may include the processes of the above-mentioned method embodiments. Wherein, any reference to memory, storage, database, or other media used in the embodiments provided in this application may include non-volatile and/or volatile memory. Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not a limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。Those skilled in the art can clearly understand that, for the convenience and conciseness of description, only the division of the above functional units and modules is used as an example. In practical applications, the above functions can be allocated to different functional units and modules as needed. Module completion, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above.
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, a person of ordinary skill in the art should understand that it can still implement the foregoing The technical solutions recorded in the examples are modified, or some of the technical features are equivalently replaced; these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the application, and should be included in Within the scope of protection of this application.

Claims (20)

  1. 一种加压参数自适应调节方法,其中,包括:An adaptive adjustment method of pressurization parameters, which includes:
    根据在线用户数与用户每秒请求数生成被测设备的负载信息的第一正相关函数、请求平均延迟值的第二正相关函数,以及请求错误率的第三正相关函数;Generate the first positive correlation function of the load information of the device under test, the second positive correlation function of the request average delay value, and the third positive correlation function of the request error rate according to the number of online users and the number of user requests per second;
    在接收到当前测试环境的测试请求时,获取与所述当前测试环境关联的初始在线用户数和初始用户每秒请求数;When receiving the test request of the current test environment, obtain the initial number of online users and the number of initial user requests per second associated with the current test environment;
    在预设请求时间段内,根据所述初始在线用户数和所述初始用户每秒请求数,获取所述第一正相关函数输出的负载加压参数、所述第二正相关函数输出的延迟加压参数和所述第三正相关函数输出的错误率加压参数;In a preset request time period, according to the initial number of online users and the number of initial user requests per second, the load pressure parameter output by the first positive correlation function and the delay of the second positive correlation function output are obtained The pressure parameter and the error rate pressure parameter output by the third positive correlation function;
    接收全部参数调节指令,将所述负载加压参数调节为大于或等于第一性能峰值指标,并将所述延迟加压参数调节为小于或等于第二性能峰值指标,以及将所述错误率加压参数调节为小于或等于第三性能峰值指标;All parameter adjustment instructions are received, the load pressurization parameter is adjusted to be greater than or equal to the first peak performance index, the delayed pressurization parameter is adjusted to be less than or equal to the second peak performance index, and the error rate is increased The pressure parameter is adjusted to be less than or equal to the third peak performance index;
    在完成参数调节后,根据与三种加压参数正相关的在线用户数与用户每秒请求数,确定所述被测设备在所述当前测试环境下的服务器最大性能指标。After the parameter adjustment is completed, the maximum server performance index of the device under test in the current test environment is determined according to the number of online users and the number of user requests per second that are positively related to the three pressurization parameters.
  2. 根据权利要求1所述的加压参数自适应调节方法,其中,所述获取所述第一正相关函数输出的负载加压参数、所述第二正相关函数输出的延迟加压参数和所述第三正相关函数输出的错误率加压参数之后,还包括:The method according to claim 1, wherein said obtaining the load pressurization parameter output by the first positive correlation function, the delayed pressurization parameter output by the second positive correlation function, and the After the error rate pressure parameter output by the third positive correlation function, it also includes:
    在检测到三个调节条件均满足时,生成所述全部参数调节指令;所述调解条件包括:所述负载加压参数小于所述第一性能峰值指标,所述延迟加压参数调节大于所述第二性能峰值指标,且所述错误率加压参数调节大于所述第三性能峰值指标;When it is detected that all three adjustment conditions are satisfied, the all parameter adjustment instructions are generated; the adjustment conditions include: the load pressurization parameter is less than the first peak performance index, and the delay pressurization parameter adjustment is greater than the A second peak performance index, and the error rate boosting parameter adjustment is greater than the third peak performance index;
    在检测到所述调解条件中有且仅有一个或两个未被满足时,生成部分参数调节指令,以根据所述部分参数调节指令对未被满足的所述调节条件对应的加压参数完成调节之后,根据与三种所述加压参数正相关的在线用户数与用户每秒请求数,确定所述被测设备在所述当前测试环境下的服务器最大性能指标;When it is detected that one and only one or two of the adjustment conditions are not satisfied, a partial parameter adjustment instruction is generated to complete the pressurization parameter corresponding to the adjustment condition that is not satisfied according to the partial parameter adjustment instruction After the adjustment, determine the maximum server performance index of the device under test in the current test environment according to the number of online users and the number of user requests per second that are positively related to the three kinds of pressurization parameters;
    在检测到所有所述调节条件均未被满足时,直接根据与三种所述加压参数正相关的在线用户数与用户每秒请求数,确定所述被测设备在所述当前测试环境下的服务器最大性能指标。When it is detected that all the adjustment conditions are not met, it is determined directly according to the number of online users and the number of user requests per second that are positively correlated with the three kinds of pressurization parameters to determine that the device under test is in the current test environment The maximum performance index of the server.
  3. 根据权利要求1所述的加压参数自适应调节方法,其中,所述确定所述被测设备在所述当前测试环境下的服务器最大性能指标之后,还包括:The method for adaptive adjustment of pressure parameters according to claim 1, wherein after determining the maximum server performance index of the device under test in the current test environment, the method further comprises:
    根据所述服务器最大性能指标计算出所述被测设备在所述当前测试环境下可执行的运行项目,将所有可执行的所述运行项目以数据图谱的形式进行关系连接,以组合成包含所述运行项目的多组运行项目组。Calculate the executable run items of the device under test in the current test environment according to the maximum performance index of the server, and connect all the executable run items in the form of a data map to combine them to include all The multi-group operation item group of the operation item described above.
  4. 根据权利要求1所述的加压参数自适应调节方法,其中,所述在接收到当前测试环境的测试请求之前,还包括:The method for adaptive adjustment of pressure parameters according to claim 1, wherein, before receiving the test request of the current test environment, the method further comprises:
    令压力器模拟用户客户端行为,获取所述压力器按照所述当前测试环境向目标接口发送的预设数量的所述测试请求。Let the pressure gauge simulate the behavior of the user client, and obtain the preset number of the test requests sent by the pressure gauge to the target interface according to the current test environment.
  5. 根据权利要求4所述的加压参数自适应调节方法,其中,所述获取所述压力器按照所述当前测试环境发送的预设数量的所述测试请求之前,还包括:The method for adaptive adjustment of pressurization parameters according to claim 4, wherein before said obtaining the preset number of said test requests sent by said pressure device according to said current test environment, it further comprises:
    从所述用户客户端中的预设路径中获取与所述当前测试环境关联的描述信息;Acquiring description information associated with the current test environment from a preset path in the user client;
    根据所述描述信息生成向所述目标接口发送预设数量的所述测试请求的执行命令。According to the description information, an execution command for sending a preset number of the test request to the target interface is generated.
  6. 根据权利要求1所述的加压参数自适应调节方法,其中,所述在接收到当前测试环境的测试请求之前,还包括:The method for adaptive adjustment of pressure parameters according to claim 1, wherein, before receiving the test request of the current test environment, the method further comprises:
    实时监测所述当前测试环境下的所述被测设备的网络环境,在所述网络环境存在预设问题时,根据与所述预设问题对应的调节措施对所述网络环境进行网络调试。The network environment of the device under test in the current test environment is monitored in real time, and when a preset problem exists in the network environment, network debugging is performed on the network environment according to adjustment measures corresponding to the preset problem.
  7. 根据权利要求1所述的加压参数自适应调节方法,其中,所述在预设请求时间段内,根据所述初始在线用户数和所述初始用户每秒请求数,获取所述第一正相关函数输出的负载加压参数、所述第二正相关函数输出的延迟加压参数和所述第三正相关函数输出的错误率加压参数,还包括:The method for self-adjusting pressure parameters according to claim 1, wherein, in a preset request time period, according to the number of initial online users and the number of initial user requests per second, the first positive is obtained. The load pressurization parameter output by the correlation function, the delayed pressurization parameter output by the second positive correlation function, and the error rate pressurization parameter output by the third positive correlation function further include:
    在确认所述第一正相关函数不为0时,在预设请求时间段内根据所述初始在线用户数和所述初始用户每秒请求数,获取所述第一正相关函数输出的所述负载加压参数;When it is confirmed that the first positive correlation function is not 0, obtain the output of the first positive correlation function according to the initial number of online users and the number of initial user requests per second within a preset request time period Load pressurization parameters;
    在确认所述第二正相关函数大于或等于第一预设正整数时,在预设请求时间段内根据所述初始在线用户数和所述初始用户每秒请求数,获取所述第二正相关函数输出的所述延迟加压参数;When it is confirmed that the second positive correlation function is greater than or equal to a first preset positive integer, the second positive correlation function is obtained according to the number of initial online users and the number of initial user requests per second within a preset request time period. The delay pressurization parameter output by the correlation function;
    在确认所述第三正相关函数大于或等于第二预设正整数时,在预设请求时间段内根据所述初始在线用户数和所述初始用户每秒请求数,获取所述第三正相关函数输出的所述错误率加压参数。When it is confirmed that the third positive correlation function is greater than or equal to a second preset positive integer, the third positive correlation function is obtained according to the number of initial online users and the number of initial user requests per second within a preset request time period. The error rate output by the correlation function pressurizes the parameter.
  8. 一种加压参数自适应调节装置,其中,包括:An adaptive adjustment device for pressurization parameters, which includes:
    第一生成模块,用于根据在线用户数与用户每秒请求数生成被测设备的负载信息的第一正相关函数、请求平均延迟值的第二正相关函数,以及请求错误率的第三正相关函数;The first generation module is used to generate the first positive correlation function of the load information of the device under test, the second positive correlation function of the request average delay value, and the third positive correlation function of the request error rate according to the number of online users and the number of user requests per second. related functions;
    第一获取模块,用于在接收到当前测试环境的测试请求时,获取与所述当前测试环境关联的初始在线用户数和初始用户每秒请求数;The first obtaining module is configured to obtain the initial number of online users and the number of initial user requests per second associated with the current test environment when a test request of the current test environment is received;
    第二获取模块,用于在预设请求时间段内,根据所述初始在线用户数和所述初始用户每秒请求数,获取所述第一正相关函数输出的负载加压参数、所述第二正相关函数输出的延迟加压参数和所述第三正相关函数输出的错误率加压参数;The second acquisition module is configured to acquire the load pressurization parameter output by the first positive correlation function and the first positive correlation function according to the initial number of online users and the number of initial user requests per second within a preset request time period. Two delayed pressurization parameters output by the positive correlation function and the error rate pressurization parameters output by the third positive correlation function;
    调节模块,用于接收全部参数调节指令,将所述负载加压参数调节为大于或等于第一性能峰值指标,并将所述延迟加压参数调节为小于或等于第二性能峰值指标,以及将所述错误率加压参数调节为小于或等于第三性能峰值指标;The adjustment module is configured to receive all parameter adjustment instructions, adjust the load pressurization parameter to be greater than or equal to the first peak performance index, and adjust the delayed pressurization parameter to be less than or equal to the second peak performance index, and The error rate boosting parameter is adjusted to be less than or equal to the third peak performance index;
    第一确定模块,用于在完成参数调节后,根据与三种加压参数正相关的在线用户数与用户每秒请求数,确定所述被测设备在所述当前测试环境下的服务器最大性能指标。The first determination module is used to determine the maximum server performance of the device under test in the current test environment based on the number of online users that are positively related to the three pressure parameters and the number of user requests per second after completing the parameter adjustment index.
  9. 一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器 上运行的计算机程序,其中,所述处理器执行所述计算机程序时实现一种加压参数自适应调节方法:A computer device including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements a pressure parameter adaptation when the computer program is executed Adjustment method:
    其中,所述加压参数自适应调节方法包括:Wherein, the self-adjusting method of the pressurization parameter includes:
    根据在线用户数与用户每秒请求数生成被测设备的负载信息的第一正相关函数、请求平均延迟值的第二正相关函数,以及请求错误率的第三正相关函数;Generate the first positive correlation function of the load information of the device under test, the second positive correlation function of the request average delay value, and the third positive correlation function of the request error rate according to the number of online users and the number of user requests per second;
    在接收到当前测试环境的测试请求时,获取与所述当前测试环境关联的初始在线用户数和初始用户每秒请求数;When receiving the test request of the current test environment, obtain the initial number of online users and the number of initial user requests per second associated with the current test environment;
    在预设请求时间段内,根据所述初始在线用户数和所述初始用户每秒请求数,获取所述第一正相关函数输出的负载加压参数、所述第二正相关函数输出的延迟加压参数和所述第三正相关函数输出的错误率加压参数;In a preset request time period, according to the initial number of online users and the number of initial user requests per second, the load pressure parameter output by the first positive correlation function and the delay of the second positive correlation function output are obtained The pressure parameter and the error rate pressure parameter output by the third positive correlation function;
    接收全部参数调节指令,将所述负载加压参数调节为大于或等于第一性能峰值指标,并将所述延迟加压参数调节为小于或等于第二性能峰值指标,以及将所述错误率加压参数调节为小于或等于第三性能峰值指标;All parameter adjustment instructions are received, the load pressurization parameter is adjusted to be greater than or equal to the first peak performance index, the delayed pressurization parameter is adjusted to be less than or equal to the second peak performance index, and the error rate is increased The pressure parameter is adjusted to be less than or equal to the third peak performance index;
    在完成参数调节后,根据与三种加压参数正相关的在线用户数与用户每秒请求数,确定所述被测设备在所述当前测试环境下的服务器最大性能指标。After the parameter adjustment is completed, the maximum server performance index of the device under test in the current test environment is determined according to the number of online users and the number of user requests per second that are positively related to the three pressurization parameters.
  10. 根据权利要求9所述的计算机设备,其中,所述获取所述第一正相关函数输出的负载加压参数、所述第二正相关函数输出的延迟加压参数和所述第三正相关函数输出的错误率加压参数之后,还包括:9. The computer device according to claim 9, wherein said acquiring the load pressurization parameter output by the first positive correlation function, the delayed pressurization parameter output by the second positive correlation function, and the third positive correlation function After the output error rate is pressurized, it also includes:
    在检测到三个调节条件均满足时,生成所述全部参数调节指令;所述调解条件包括:所述负载加压参数小于所述第一性能峰值指标,所述延迟加压参数调节大于所述第二性能峰值指标,且所述错误率加压参数调节大于所述第三性能峰值指标;When it is detected that all three adjustment conditions are satisfied, the all parameter adjustment instructions are generated; the adjustment conditions include: the load pressurization parameter is less than the first peak performance index, and the delay pressurization parameter adjustment is greater than the A second peak performance index, and the error rate boosting parameter adjustment is greater than the third peak performance index;
    在检测到所述调解条件中有且仅有一个或两个未被满足时,生成部分参数调节指令,以根据所述部分参数调节指令对未被满足的所述调节条件对应的加压参数完成调节之后,根据与三种所述加压参数正相关的在线用户数与用户每秒请求数,确定所述被测设备在所述当前测试环境下的服务器最大性能指标;When it is detected that one and only one or two of the adjustment conditions are not satisfied, a partial parameter adjustment instruction is generated to complete the pressurization parameter corresponding to the adjustment condition that is not satisfied according to the partial parameter adjustment instruction After the adjustment, determine the maximum server performance index of the device under test in the current test environment according to the number of online users and the number of user requests per second that are positively related to the three kinds of pressurization parameters;
    在检测到所有所述调节条件均未被满足时,直接根据与三种所述加压参数正相关的在线用户数与用户每秒请求数,确定所述被测设备在所述当前测试环境下的服务器最大性能指标。When it is detected that all the adjustment conditions are not met, it is determined directly according to the number of online users and the number of user requests per second that are positively correlated with the three kinds of pressurization parameters to determine that the device under test is in the current test environment The maximum performance index of the server.
  11. 根据权利要求9所述的计算机设备,其中,所述确定所述被测设备在所述当前测试环境下的服务器最大性能指标之后,还包括:The computer device according to claim 9, wherein after determining the maximum server performance index of the device under test in the current test environment, the method further comprises:
    根据所述服务器最大性能指标计算出所述被测设备在所述当前测试环境下可执行的运行项目,将所有可执行的所述运行项目以数据图谱的形式进行关系连接,以组合成包含所述运行项目的多组运行项目组。Calculate the executable run items of the device under test in the current test environment according to the maximum performance index of the server, and connect all the executable run items in the form of a data map to combine them to include all The multi-group operation item group of the operation item described above.
  12. 根据权利要求9所述的计算机设备,其中,所述在接收到当前测试环境的测试请求之前,还包括:The computer device according to claim 9, wherein, before receiving the test request of the current test environment, the method further comprises:
    令压力器模拟用户客户端行为,获取所述压力器按照所述当前测试环境向目标接口发 送的预设数量的所述测试请求。Let the pressure gauge simulate the behavior of the user client, and obtain the preset number of the test requests sent by the pressure gauge to the target interface according to the current test environment.
  13. 根据权利要求12所述的计算机设备,其中,所述获取所述压力器按照所述当前测试环境发送的预设数量的所述测试请求之前,还包括:The computer device according to claim 12, wherein before said acquiring the preset number of said test requests sent by said pressure device according to said current test environment, it further comprises:
    从所述用户客户端中的预设路径中获取与所述当前测试环境关联的描述信息;Acquiring description information associated with the current test environment from a preset path in the user client;
    根据所述描述信息生成向所述目标接口发送预设数量的所述测试请求的执行命令。According to the description information, an execution command for sending a preset number of the test request to the target interface is generated.
  14. 根据权利要求9所述的计算机设备,其中,所述在接收到当前测试环境的测试请求之前,还包括:The computer device according to claim 9, wherein, before receiving the test request of the current test environment, the method further comprises:
    实时监测所述当前测试环境下的所述被测设备的网络环境,在所述网络环境存在预设问题时,根据与所述预设问题对应的调节措施对所述网络环境进行网络调试。The network environment of the device under test in the current test environment is monitored in real time, and when a preset problem exists in the network environment, network debugging is performed on the network environment according to adjustment measures corresponding to the preset problem.
  15. 根据权利要求9所述的计算机设备,其中,所述在预设请求时间段内,根据所述初始在线用户数和所述初始用户每秒请求数,获取所述第一正相关函数输出的负载加压参数、所述第二正相关函数输出的延迟加压参数和所述第三正相关函数输出的错误率加压参数,还包括:The computer device according to claim 9, wherein the load output of the first positive correlation function is obtained according to the initial number of online users and the initial number of user requests per second within a preset request time period The pressurization parameter, the delayed pressurization parameter output by the second positive correlation function, and the error rate pressurization parameter output by the third positive correlation function, further include:
    在确认所述第一正相关函数不为0时,在预设请求时间段内根据所述初始在线用户数和所述初始用户每秒请求数,获取所述第一正相关函数输出的所述负载加压参数;When it is confirmed that the first positive correlation function is not 0, obtain the output of the first positive correlation function according to the initial number of online users and the number of initial user requests per second within a preset request time period Load pressurization parameters;
    在确认所述第二正相关函数大于或等于第一预设正整数时,在预设请求时间段内根据所述初始在线用户数和所述初始用户每秒请求数,获取所述第二正相关函数输出的所述延迟加压参数;When it is confirmed that the second positive correlation function is greater than or equal to a first preset positive integer, the second positive correlation function is obtained according to the number of initial online users and the number of initial user requests per second within a preset request time period. The delay pressurization parameter output by the correlation function;
    在确认所述第三正相关函数大于或等于第二预设正整数时,在预设请求时间段内根据所述初始在线用户数和所述初始用户每秒请求数,获取所述第三正相关函数输出的所述错误率加压参数。When it is confirmed that the third positive correlation function is greater than or equal to a second preset positive integer, the third positive correlation function is obtained according to the number of initial online users and the number of initial user requests per second within a preset request time period. The error rate output by the correlation function pressurizes the parameter.
  16. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其中,所述计算机程序被处理器执行时实现加压参数自适应调节方法,其中,所述加压参数自适应调节方法包括:A computer-readable storage medium, the computer-readable storage medium stores a computer program, wherein the computer program is executed by a processor to implement a method for adaptive adjustment of a pressure parameter, wherein the pressure parameter is adaptively adjusted Methods include:
    根据在线用户数与用户每秒请求数生成被测设备的负载信息的第一正相关函数、请求平均延迟值的第二正相关函数,以及请求错误率的第三正相关函数;Generate the first positive correlation function of the load information of the device under test, the second positive correlation function of the request average delay value, and the third positive correlation function of the request error rate according to the number of online users and the number of user requests per second;
    在接收到当前测试环境的测试请求时,获取与所述当前测试环境关联的初始在线用户数和初始用户每秒请求数;When receiving the test request of the current test environment, obtain the initial number of online users and the number of initial user requests per second associated with the current test environment;
    在预设请求时间段内,根据所述初始在线用户数和所述初始用户每秒请求数,获取所述第一正相关函数输出的负载加压参数、所述第二正相关函数输出的延迟加压参数和所述第三正相关函数输出的错误率加压参数;In a preset request time period, according to the initial number of online users and the number of initial user requests per second, the load pressure parameter output by the first positive correlation function and the delay of the second positive correlation function output are obtained The pressure parameter and the error rate pressure parameter output by the third positive correlation function;
    接收全部参数调节指令,将所述负载加压参数调节为大于或等于第一性能峰值指标,并将所述延迟加压参数调节为小于或等于第二性能峰值指标,以及将所述错误率加压参数调节为小于或等于第三性能峰值指标;All parameter adjustment instructions are received, the load pressurization parameter is adjusted to be greater than or equal to the first peak performance index, the delayed pressurization parameter is adjusted to be less than or equal to the second peak performance index, and the error rate is increased The pressure parameter is adjusted to be less than or equal to the third peak performance index;
    在完成参数调节后,根据与三种加压参数正相关的在线用户数与用户每秒请求数,确定所述被测设备在所述当前测试环境下的服务器最大性能指标。After the parameter adjustment is completed, the maximum server performance index of the device under test in the current test environment is determined according to the number of online users and the number of user requests per second that are positively related to the three pressurization parameters.
  17. 根据权利要求16所述的计算机可读存储介质,其中,所述获取所述第一正相关函数输出的负载加压参数、所述第二正相关函数输出的延迟加压参数和所述第三正相关函数输出的错误率加压参数之后,还包括:The computer-readable storage medium according to claim 16, wherein said acquiring the load pressurization parameter output by the first positive correlation function, the delayed pressurization parameter output by the second positive correlation function, and the third After the error rate output of the positive correlation function increases the parameter, it also includes:
    在检测到三个调节条件均满足时,生成所述全部参数调节指令;所述调解条件包括:所述负载加压参数小于所述第一性能峰值指标,所述延迟加压参数调节大于所述第二性能峰值指标,且所述错误率加压参数调节大于所述第三性能峰值指标;When it is detected that all three adjustment conditions are satisfied, the all parameter adjustment instructions are generated; the adjustment conditions include: the load pressurization parameter is less than the first peak performance index, and the delay pressurization parameter adjustment is greater than the A second peak performance index, and the error rate boosting parameter adjustment is greater than the third peak performance index;
    在检测到所述调解条件中有且仅有一个或两个未被满足时,生成部分参数调节指令,以根据所述部分参数调节指令对未被满足的所述调节条件对应的加压参数完成调节之后,根据与三种所述加压参数正相关的在线用户数与用户每秒请求数,确定所述被测设备在所述当前测试环境下的服务器最大性能指标;When it is detected that one and only one or two of the adjustment conditions are not satisfied, a partial parameter adjustment instruction is generated to complete the pressurization parameter corresponding to the adjustment condition that is not satisfied according to the partial parameter adjustment instruction After the adjustment, determine the maximum server performance index of the device under test in the current test environment according to the number of online users and the number of user requests per second that are positively related to the three kinds of pressurization parameters;
    在检测到所有所述调节条件均未被满足时,直接根据与三种所述加压参数正相关的在线用户数与用户每秒请求数,确定所述被测设备在所述当前测试环境下的服务器最大性能指标。When it is detected that all the adjustment conditions are not met, it is determined directly according to the number of online users and the number of user requests per second that are positively correlated with the three kinds of pressurization parameters to determine that the device under test is in the current test environment The maximum performance index of the server.
  18. 根据权利要求16所述的计算机可读存储介质,其中,所述确定所述被测设备在所述当前测试环境下的服务器最大性能指标之后,还包括:15. The computer-readable storage medium according to claim 16, wherein after determining the maximum server performance index of the device under test in the current test environment, the method further comprises:
    根据所述服务器最大性能指标计算出所述被测设备在所述当前测试环境下可执行的运行项目,将所有可执行的所述运行项目以数据图谱的形式进行关系连接,以组合成包含所述运行项目的多组运行项目组。Calculate the executable run items of the device under test in the current test environment according to the maximum performance index of the server, and connect all the executable run items in the form of a data map to combine them to include all The multi-group operation item group of the operation item described above.
  19. 根据权利要求16所述的计算机可读存储介质,其中,所述在接收到当前测试环境的测试请求之前,还包括:The computer-readable storage medium according to claim 16, wherein, before receiving the test request of the current test environment, the method further comprises:
    令压力器模拟用户客户端行为,获取所述压力器按照所述当前测试环境向目标接口发送的预设数量的所述测试请求。Let the pressure gauge simulate the behavior of the user client, and obtain the preset number of the test requests sent by the pressure gauge to the target interface according to the current test environment.
  20. 根据权利要求19所述的计算机可读存储介质,其中,所述获取所述压力器按照所述当前测试环境发送的预设数量的所述测试请求之前,还包括:19. The computer-readable storage medium according to claim 19, wherein before said acquiring the preset number of said test requests sent by said pressure device according to said current test environment, further comprising:
    从所述用户客户端中的预设路径中获取与所述当前测试环境关联的描述信息;Acquiring description information associated with the current test environment from a preset path in the user client;
    根据所述描述信息生成向所述目标接口发送预设数量的所述测试请求的执行命令。According to the description information, an execution command for sending a preset number of the test request to the target interface is generated.
PCT/CN2020/098809 2020-05-21 2020-06-29 Method and apparatus for adaptively adjusting pressurization parameter, computer device, and storage medium WO2021139103A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010437636.8 2020-05-21
CN202010437636.8A CN111666194B (en) 2020-05-21 2020-05-21 Pressurization parameter self-adaptive adjusting method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2021139103A1 true WO2021139103A1 (en) 2021-07-15

Family

ID=72384171

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/098809 WO2021139103A1 (en) 2020-05-21 2020-06-29 Method and apparatus for adaptively adjusting pressurization parameter, computer device, and storage medium

Country Status (2)

Country Link
CN (1) CN111666194B (en)
WO (1) WO2021139103A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114500349A (en) * 2021-12-27 2022-05-13 天翼云科技有限公司 Cloud platform chaos testing method and device
CN115408249A (en) * 2022-10-31 2022-11-29 深圳依时货拉拉科技有限公司 Pressure testing method and device, computer equipment and storage medium
CN116866240A (en) * 2023-07-13 2023-10-10 上海庭臻信息科技有限公司 CAN bus test method, device and system, electronic equipment and storage medium
CN117667638A (en) * 2023-12-29 2024-03-08 湖北华中电力科技开发有限责任公司 Test scene design method based on agility performance test model

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116483718B (en) * 2023-04-25 2023-11-14 无锡市软测认证有限公司 System and method for realizing large-scale pressure test by utilizing big data

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6915344B1 (en) * 1999-11-30 2005-07-05 Microsoft Corporation Server stress-testing response verification
CN102123061A (en) * 2011-03-28 2011-07-13 杭州电子科技大学 Method for determining performance of Web server
CN108959047A (en) * 2018-06-11 2018-12-07 北京奇安信科技有限公司 A kind of method for testing pressure and device based on business scenario
CN110175110A (en) * 2019-05-31 2019-08-27 深圳前海微众银行股份有限公司 Method for testing pressure, device, system, equipment and computer readable storage medium

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130336136A1 (en) * 2011-09-16 2013-12-19 Qualcomm Incorporated Systems and methods for network quality estimation, connectivity detection, and load management
CN104079445A (en) * 2013-03-29 2014-10-01 英业达科技有限公司 Distributed type pressure testing system and method
CN107480015B (en) * 2017-07-04 2020-12-01 网易(杭州)网络有限公司 Load testing method, device and system, storage medium and pressure testing server
CN109597724B (en) * 2018-09-18 2022-11-04 北京微播视界科技有限公司 Service stability measuring method, device, computer equipment and storage medium
CN109542777B (en) * 2018-11-07 2022-03-04 北京搜狗科技发展有限公司 Pressure testing method and device and readable medium
CN109783334A (en) * 2018-12-14 2019-05-21 平安普惠企业管理有限公司 Pressure test report-generating method, device, computer equipment and storage medium
CN110188027A (en) * 2019-05-31 2019-08-30 深圳前海微众银行股份有限公司 Performance estimating method, device, equipment and the storage medium of production environment
CN110971697B (en) * 2019-12-06 2022-08-16 深圳市网心科技有限公司 Redis single instance protection processing method and device, computer equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6915344B1 (en) * 1999-11-30 2005-07-05 Microsoft Corporation Server stress-testing response verification
CN102123061A (en) * 2011-03-28 2011-07-13 杭州电子科技大学 Method for determining performance of Web server
CN108959047A (en) * 2018-06-11 2018-12-07 北京奇安信科技有限公司 A kind of method for testing pressure and device based on business scenario
CN110175110A (en) * 2019-05-31 2019-08-27 深圳前海微众银行股份有限公司 Method for testing pressure, device, system, equipment and computer readable storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114500349A (en) * 2021-12-27 2022-05-13 天翼云科技有限公司 Cloud platform chaos testing method and device
CN114500349B (en) * 2021-12-27 2023-08-08 天翼云科技有限公司 Cloud platform chaos testing method and device
CN115408249A (en) * 2022-10-31 2022-11-29 深圳依时货拉拉科技有限公司 Pressure testing method and device, computer equipment and storage medium
CN116866240A (en) * 2023-07-13 2023-10-10 上海庭臻信息科技有限公司 CAN bus test method, device and system, electronic equipment and storage medium
CN116866240B (en) * 2023-07-13 2024-04-12 上海庭臻信息科技有限公司 CAN bus test method, device and system, electronic equipment and storage medium
CN117667638A (en) * 2023-12-29 2024-03-08 湖北华中电力科技开发有限责任公司 Test scene design method based on agility performance test model

Also Published As

Publication number Publication date
CN111666194B (en) 2022-02-08
CN111666194A (en) 2020-09-15

Similar Documents

Publication Publication Date Title
WO2021139103A1 (en) Method and apparatus for adaptively adjusting pressurization parameter, computer device, and storage medium
WO2020238345A1 (en) Pressure test method, device, system, apparatus, and computer readable storage medium
CN109491894B (en) Interface test method and equipment
CN109542712B (en) Server pressure testing method and device, computer equipment and storage medium
CN109165168A (en) A kind of method for testing pressure, device, equipment and medium
US9117030B2 (en) System and method to predict elapsed response time for a query during application development stage
CN107329881B (en) Application system performance test method and device, computer equipment and storage medium
CN113961413A (en) Server power consumption testing method and device
CN113127356A (en) Pressure measurement method and device, electronic equipment and storage medium
CN113590403A (en) Pressure testing method, device, system, electronic equipment, storage medium and product
CN113946986A (en) Method and device for evaluating average time before product failure based on accelerated degradation test
CN112131129A (en) Application program testing method and system
CN113986733A (en) Jar package based performance test method, device, equipment and storage medium
CN114355094A (en) Product reliability weak link comprehensive evaluation method and device based on multi-source information
CN115952098A (en) Performance test tuning scheme recommendation method and system
WO2021223214A1 (en) Interface performance test method and apparatus, and server and computer-readable storage medium
CN115525495A (en) High-speed serial bus allowance testing method, device, equipment and medium
CN115509931A (en) System-based performance test method and device, electronic equipment and storage medium
CN111274112B (en) Application program pressure measurement method, device, computer equipment and storage medium
CN112231236A (en) Method for testing database performance
CN113342872B (en) PUE energy consumption monitoring-based method and electronic equipment
CN112631869B (en) Page loading data monitoring method and device, computer equipment and storage medium
CN114416457B (en) Computer aging centralized detection management method and device, electronic equipment and medium
US20230359190A1 (en) Process capability index warning system and warning method for the same
WO2023238311A1 (en) Verification system and verification method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20912094

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20912094

Country of ref document: EP

Kind code of ref document: A1