CN111723018A - Performance pressure testing method, device, equipment and storage medium - Google Patents
Performance pressure testing method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN111723018A CN111723018A CN202010595966.XA CN202010595966A CN111723018A CN 111723018 A CN111723018 A CN 111723018A CN 202010595966 A CN202010595966 A CN 202010595966A CN 111723018 A CN111723018 A CN 111723018A
- Authority
- CN
- China
- Prior art keywords
- real
- index value
- configuration parameter
- pressure measurement
- equipment
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 48
- 238000009530 blood pressure measurement Methods 0.000 claims abstract description 95
- 238000000034 method Methods 0.000 claims abstract description 26
- 238000004590 computer program Methods 0.000 claims description 12
- 238000009662 stress testing Methods 0.000 claims description 12
- 238000010998 test method Methods 0.000 claims description 4
- 238000012986 modification Methods 0.000 description 7
- 230000004048 modification Effects 0.000 description 7
- 230000008569 process Effects 0.000 description 7
- 230000015556 catabolic process Effects 0.000 description 6
- 238000006731 degradation reaction Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 6
- 238000012423 maintenance Methods 0.000 description 5
- 238000012545 processing Methods 0.000 description 5
- 238000011056 performance test Methods 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000011156 evaluation Methods 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000000275 quality assurance Methods 0.000 description 1
- 238000010223 real-time analysis Methods 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 238000013522 software testing Methods 0.000 description 1
- 238000011144 upstream manufacturing Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Testing Of Devices, Machine Parts, Or Other Structures Thereof (AREA)
Abstract
The invention discloses a performance pressure testing method, and belongs to the field of system testing. The method comprises the following steps: reducing hardware resources and software resources of the equipment to be tested in an equal proportion according to the first configuration parameters; selecting flow according to a second configuration parameter and forwarding the flow to the equipment to be tested, wherein the second configuration parameter comprises a forwarding rule and a load balancing weight; acquiring a real-time pressure measurement index value of the equipment to be pressure-measured; and amplifying the real-time pressure measurement index value in equal proportion to obtain the real performance data of the equipment to be measured. The invention directly uses the on-line real flow during the test, which is completely consistent with the real scene, does not generate dirty data, has rich and complete flow types, and can better ensure the authenticity and the validity of the test result.
Description
Technical Field
The invention relates to the field of system testing, in particular to a performance pressure testing method, a performance pressure testing device, performance pressure testing equipment and a storage medium.
Background
Pressure testing (referred to as "pressure testing") is a basic quality assurance activity for software systems and is part of every important software testing effort.
The methods for testing performance stress commonly used in the industry at present mainly include the following two methods:
one is to simulate the request by an open source or business tool, for example, interface performance tools such as AB, jerter, loadrunner, wrk, etc., to simulate a high concurrent flow request for performance pressure testing. The method has the disadvantages that customized modification access parameters need to be carried out according to different service scenes in the pressure measurement, but the type of the pressure measurement flow generated by the tool is single, the obtained performance data has a certain difference with a real scene, performance reference cannot be directly provided for the online service, and conversion needs to be carried out manually according to the service scenes, the deployment environment and historical experience. Meanwhile, because the traffic is not the real traffic of the user, the processing of the write request in the simulation request is troublesome, because the write request itself may pollute the real service data, and special processing is required, for example, data generated by pressure measurement is isolated or removed.
And secondly, the whole link pressure measurement of the Ali implementation practice is carried out, the simulated request flow is marked, the pressure measurement flow can be identified and customized on the whole link of the service, dirty data can be avoided, the on-line service is transparent, the normal production service logic is not influenced basically, meanwhile, the whole upstream and downstream flows of the service can be covered more completely, and the obtained performance test data approach to a real scene. However, the method is very high in cost, needs to invest a large amount of manpower to modify services, needs to customize and modify the services from the whole process of overall architecture, middleware, storage, environment deployment topology and the like, and has potential hidden dangers of influencing the existing services.
Disclosure of Invention
The invention aims to solve the technical problem that the service bearing capacity of a single machine cannot be accurately and truly estimated in the prior art, and provides a performance pressure test method, a performance pressure test device, performance pressure test equipment and a storage medium.
The invention solves the technical problems through the following technical scheme:
a performance stress test method comprises the following steps:
reducing hardware resources and software resources of the equipment to be tested in an equal proportion according to the first configuration parameters;
selecting flow according to a second configuration parameter and forwarding the flow to the equipment to be tested, wherein the second configuration parameter comprises a forwarding rule and a load balancing weight;
acquiring a real-time pressure measurement index value of the equipment to be pressure-measured;
and amplifying the real-time pressure measurement index value in equal proportion to obtain the real performance data of the equipment to be measured.
Preferably, before the pressure measurement index value is scaled up, the method further comprises the following steps:
and comparing the real-time pressure measurement index value with a preset expected pressure measurement index value, and dynamically adjusting the second configuration parameter and/or the first configuration parameter according to the comparison result.
Preferably, the dynamically adjusting the second configuration parameter and/or the first configuration parameter according to the result of the comparison includes the following sub-steps:
when the real-time pressure measurement index value is larger than a preset expected pressure measurement index value, adjusting the second configuration parameter according to a comparison result to reduce forwarded flow, and/or adjusting the first configuration parameter to expand hardware resources and software resources of the equipment to be tested;
when the real-time pressure measurement index value is smaller than a preset expected pressure measurement index value, judging whether the comparison result exceeds a threshold value;
if the comparison result exceeds the threshold value, adjusting the second configuration parameter according to the comparison result to improve the forwarded flow, and/or adjusting the first configuration parameter to reduce the hardware resource and the software resource of the equipment to be tested;
and if the comparison result does not exceed the threshold value, the real-time pressure measurement index value is amplified in equal proportion to obtain the real performance data of the equipment to be pressure-measured.
Preferably, the hardware resources of the device to be tested are reduced in equal proportion, and the control and the allocation of the CPU time, the system memory and the network bandwidth of the device to be tested are realized.
Preferably, the software resources of the device to be tested are scaled down in equal proportion, and the software resources are scaled down by adjusting the memory starting parameters, the thread number and the memory database connection pool of the virtual machine.
Preferably, the traffic is forwarded through a gateway, a current limiting downgrade component is loaded on the gateway, and forwarding of the traffic is limited through the current limiting downgrade component.
The invention also discloses a performance pressure testing device, which is characterized by comprising:
the service deployment module is used for scaling down hardware resources and software resources of the equipment to be tested in an equal proportion according to the first configuration parameter;
the gateway module is used for selecting flow according to a second configuration parameter and forwarding the flow to the equipment to be tested, wherein the second configuration parameter comprises a forwarding rule and a load balancing weight;
the index value acquisition module is used for acquiring a real-time pressure measurement index value of the equipment to be pressure-measured;
and the prediction module is used for amplifying the real-time pressure measurement index value in an equal proportion so as to obtain the real performance data of the equipment to be pressure-measured.
Preferably, the performance pressure testing apparatus further includes:
the comparison module is used for comparing the real-time pressure measurement index value with a preset expected pressure measurement index value;
and the configuration adjusting module is used for dynamically adjusting the second configuration parameter and/or the first configuration parameter according to the comparison result.
The invention also discloses a computer device, comprising a memory and a processor, wherein the memory is stored with a computer program, and the computer program realizes the following steps when being executed by the processor:
reducing hardware resources and software resources of the equipment to be tested in an equal proportion according to the first configuration parameters;
selecting flow according to a second configuration parameter and forwarding the flow to the equipment to be tested, wherein the second configuration parameter comprises a forwarding rule and a load balancing weight;
acquiring a real-time pressure measurement index value of the equipment to be pressure-measured;
and amplifying the real-time pressure measurement index value in equal proportion to obtain the real performance data of the equipment to be measured.
The present invention also discloses a computer-readable storage medium having a computer program stored therein, the computer program being executable by at least one processor to perform the steps of:
reducing hardware resources and software resources of the equipment to be tested in an equal proportion according to the first configuration parameters;
selecting flow according to a second configuration parameter and forwarding the flow to the equipment to be tested, wherein the second configuration parameter comprises a forwarding rule and a load balancing weight;
acquiring a real-time pressure measurement index value of the equipment to be pressure-measured;
and amplifying the real-time pressure measurement index value in equal proportion to obtain the real performance data of the equipment to be measured.
The positive progress effects of the invention are as follows:
1. during testing, the on-line real flow is directly used and is completely consistent with the real scene, dirty data cannot be generated, the flow type is rich and complete, and the authenticity and the validity of a test result can be better guaranteed.
2. The service architecture does not need to be deeply reformed, the test complexity and the input cost are low, and the service can be conveniently and quickly set up an environment for testing so as to verify and estimate the bearing capacity of the service system with the minimum cost.
3. By adopting the real-time flow allocation, the performance test data can be analyzed and displayed in real time, the performance index data can be rapidly and visually obtained, and reliable reference is provided for capacity expansion and operation and maintenance.
Drawings
FIG. 1 is a flow chart of a first embodiment of a performance pressure testing method of the present invention;
FIG. 2 is a flow chart of a second embodiment of the performance stress testing method of the present invention;
FIG. 3 is a block diagram showing a first embodiment of the performance pressure testing apparatus of the present invention;
FIG. 4 is a block diagram showing a second embodiment of the performance pressure testing apparatus of the present invention;
fig. 5 shows a hardware architecture diagram of an embodiment of the computer apparatus of the present invention.
Detailed Description
The invention is further illustrated by the following examples, which are not intended to limit the scope of the invention.
Firstly, the invention provides a performance pressure test method.
In one embodiment, as shown in fig. 1, the performance pressure testing method includes the following steps:
step 01: and scaling down hardware resources and software resources of the equipment to be tested in an equal proportion according to the first configuration parameters.
The device to be tested is a computer device for testing pressure, and is usually a server.
In order to achieve the purpose of faster and more accurately testing the pressure after the flow pressure is applied to the device to be tested, so that a higher pressure load can be generated through a smaller flow, related modifications need to be made on hardware resources and software resources of services deployed on the device to be tested in advance, and the modifications are realized by modifying parameters in the first configuration parameters, specifically as follows:
parameters needing to be modified in the first configuration parameters on the hardware resources are mainly used for controlling and distributing the CPU time, the system memory and the network bandwidth of the equipment to be tested, so that the aim of rapidly scaling the service deployed on the equipment to be tested in an equal proportion to obtain the hardware resources is fulfilled. The method can be specifically realized by adopting a Linux CGroup technology (a mechanism which is provided by a Linux kernel and can limit, record and isolate physical resources used by a process group), or by adopting containerization deployment such as a docker container.
Parameters needing to be modified in the first configuration parameters on the software resources mainly comprise adjustment of virtual machine memory starting parameters, thread numbers, a memory database connection pool and the like, so that the purpose of rapidly scaling the service deployed on the equipment to be tested in an equal proportion mode to obtain the software resources is achieved.
And 02, selecting the flow according to a second configuration parameter and forwarding the flow to the equipment to be tested, wherein the second configuration parameter comprises a forwarding rule and a load balancing weight.
Step 02 is realized through the gateway, and after the external real traffic reaches the gateway, the traffic is automatically selected and forwarded to the device to be tested at the back end according to the forwarding rule and the weight of load balancing. The parameters such as the flow forwarding rule and the load balancing weight belong to the parameter configuration category of a second configuration parameter, the second configuration parameter is configured at the gateway side, and the rules can be made in the initial stage according to the actual service scene and the experience value and are stored in a rule base.
It should be noted that, in order to ensure that normal service is not affected in the pressure measurement process, flow forwarding may be limited by a current limiting degradation component (e.g., sentinel, a commonly used current limiting degradation component), that is, system protection measures such as a current limiting threshold are configured for the system, so as to prevent the system from being unable to provide normal service when actual service flow exceeds estimated service flow.
Step 03: and acquiring a real-time pressure measurement index value of the equipment to be pressure-measured.
The real-time pressure measurement index value is obtained mainly through gateway logs and resource monitoring data in a performance pressure measurement environment, and performance indexes including concurrency, throughput, time delay, error rate, memory consumption, CPU load and the like, namely the real-time pressure measurement index value, can be obtained through real-time analysis of the data.
Step 04: and amplifying the real-time pressure measurement index value in equal proportion to obtain the real performance data of the equipment to be pressure measured.
The real-time pressure measurement index value is measured under the condition that hardware resources and software resources of the equipment are reduced in an equal proportion, so that the equipment to be measured can support performance data of the service under a real service scene by reversely and equally amplifying the real-time pressure measurement index value, and reliable reference can be provided for service expansion and operation and maintenance through the estimated service peak value calling amount.
In the first embodiment, the online real traffic is directly used during testing, the online real traffic is completely consistent with a real scene, dirty data cannot be generated, the traffic is rich and complete in type, and the authenticity and the validity of a test result can be guaranteed better. And the service architecture does not need to be deeply reformed, the test complexity and the input cost are low, and the service can be conveniently and quickly set up an environment for testing so as to verify and estimate the bearing capacity of the service system with the minimum cost.
In an embodiment two, based on the embodiment one, as shown in fig. 2, the performance pressure testing method includes the following steps:
steps 01 to 03 are the same as those in the first embodiment, and are not described herein again.
Step 04-1: and comparing the real-time pressure measurement index value with a preset expected pressure measurement index value, and dynamically adjusting the second configuration parameter and/or the first configuration parameter according to the comparison result.
Because the first configuration parameter and the second configuration parameter are initially estimated through experience and may not be in accordance with the actual situation, the measured real-time pressure measurement index value may not accurately calculate the performance data of the service supported by the equipment to be tested under the real service scene. Therefore, before the real-time pressure measurement index value is amplified in an equal ratio, preferably, an evaluation is performed on the real-time pressure measurement index value, specifically by comparing with a preset expected pressure measurement index value. If the comparison result is not ideal, the second configuration parameter and/or the first configuration parameter needs to be dynamically adjusted according to the comparison result, so that the real-time pressure measurement index value is infinitely close to the expected pressure measurement index value.
The step 04-1 may specifically include the following sub-steps:
step 04-11: and judging whether the real-time pressure measurement index value is larger than a preset expected pressure measurement index value or not, if so, executing the step 04-12, and otherwise, executing the step 04-13.
Comparing the real-time pressure measurement index value with the expected pressure measurement index value, and if the real-time pressure measurement index value is larger than the preset expected pressure measurement index value, indicating that the forwarded flow is possibly too large and exceeds the bearing range of the equipment to be pressure-measured; if the real-time pressure measurement index value is larger than the preset expected pressure measurement index value, the forwarded flow is possibly too small, and the real performance of the equipment to be pressure-measured cannot be tested.
Step 04-12: and adjusting the second configuration parameter according to the comparison result to reduce the forwarded flow, and/or adjusting the first configuration parameter to expand the hardware resource and the software resource of the device to be tested, and repeating the step 04-11.
And under the condition that the forwarded flow is possibly overlarge, the forwarded flow can be reduced by adjusting the second configuration parameter, specifically, the flow size and the flow pressure of the equipment to be pressure-measured can be automatically observed through a program or a script, then, the forwarding rule and the weight of load balancing are automatically corrected, and the rule base is continuously perfected, so that the steps are repeated until the real-time pressure measurement index value is infinitely close to the expected pressure measurement index value.
Besides adjusting the second configuration parameter, the first configuration parameter may also be adjusted, and specifically, the software resource and/or the hardware resource of the device to be pressure-tested may also be automatically corrected by the script.
Of course, the possibility of adjusting the first configuration parameter and the second configuration parameter simultaneously is not excluded.
Step 04-13: and judging whether the comparison result exceeds a threshold value, if so, executing the step 04-14, and if not, directly executing the step 04.
In the case where the forwarded traffic may be too small, the result of the comparison needs to be further determined. Specifically, whether the comparison result is within the threshold range or not is judged, if so, it indicates that the forwarding flow is appropriate for the device to be pressure-measured, and then the first configuration parameter and the second configuration parameter do not need to be adjusted, and the measured real-time pressure measurement index value is accurate, so that step 04 can be directly executed. If the forwarding flow is not within the threshold range, the forwarding flow is too small for the device to be pressure-measured, so that the real performance data of the device to be pressure-measured cannot be obtained according to the real-time pressure-measurement index value.
Step 04-14: and adjusting the second configuration parameter according to the comparison result to improve the forwarded flow, and/or adjusting the first configuration parameter to reduce the hardware resource and the software resource of the equipment to be tested, and repeating the step 04 to the step 11.
And under the condition that the forwarded flow is possibly too small, the forwarded flow can be improved by adjusting the second configuration parameter, specifically, the flow size and the flow pressure of the equipment to be pressure-measured can be automatically observed through a program or a script, then, the forwarding rule and the weight of load balancing are automatically corrected, and the rule base is continuously perfected, so that the steps are repeated until the real-time pressure measurement index value is infinitely close to the expected pressure measurement index value, namely, the comparison result is in a threshold range.
Besides adjusting the second configuration parameter, the first configuration parameter may also be adjusted, and specifically, the software resource and/or the hardware resource of the device to be pressure-tested may also be automatically corrected by the script.
Of course, the possibility of adjusting the first configuration parameter and the second configuration parameter simultaneously is not excluded.
Step 04 is the same as in the first embodiment, and is not described herein again.
Compared with the first embodiment, the second embodiment adopts real-time flow allocation, so that the performance test data can be analyzed and displayed in real time, the performance index data can be quickly and intuitively obtained, reliable reference is provided for capacity expansion and operation and maintenance, and particularly, a performance peak value and a performance bottleneck are found out by comparing a real-time pressure test index value with a preset expected pressure test index value.
Secondly, the present invention proposes a performance pressure testing device, said device 20 being divisible into one or more modules.
For example, fig. 3 shows a structure diagram of a first embodiment of the performance stress testing apparatus 20, in which the apparatus 20 may be divided into a service deployment module 201, a gateway module 202, an index value acquisition module 203, and a prediction module 204. The following description will specifically describe the specific functions of the module 201 and 204.
The service deployment module 201 is configured to scale down hardware resources and software resources of the device to be tested according to the first configuration parameter.
The device to be tested is a computer device for testing pressure, and is usually a server.
In order to achieve the purpose of faster and more accurately testing the pressure after the flow pressure is applied to the device to be tested, so that a higher pressure load can be generated through a smaller flow, related modifications need to be made on hardware resources and software resources of services deployed on the device to be tested in advance, and the modifications are realized by modifying parameters in the first configuration parameters, specifically as follows:
parameters needing to be modified in the first configuration parameters on the hardware resources are mainly used for controlling and distributing the CPU time, the system memory and the network bandwidth of the equipment to be tested, so that the aim of rapidly scaling the service deployed on the equipment to be tested in an equal proportion to obtain the hardware resources is fulfilled. The method can be specifically realized by adopting a Linux CGroup technology (a mechanism which is provided by a Linux kernel and can limit, record and isolate physical resources used by a process group), or by adopting containerization deployment such as a docker container.
Parameters needing to be modified in the first configuration parameters on the software resources mainly comprise adjustment of virtual machine memory starting parameters, thread numbers, a memory database connection pool and the like, so that the purpose of rapidly scaling the service deployed on the equipment to be tested in an equal proportion mode to obtain the software resources is achieved.
The gateway module 202 is configured to select a flow according to a second configuration parameter, where the second configuration parameter includes a forwarding rule and a weight for load balancing.
After the external real traffic reaches the gateway module 202, the traffic is automatically selected according to the forwarding rule and the weight of load balancing, and is forwarded to the device to be tested at the back end. The parameters such as the flow forwarding rule and the load balancing weight belong to the parameter configuration category of a second configuration parameter, the second configuration parameter is configured at the gateway side, and the rules can be made in the initial stage according to the actual service scene and the experience value and are stored in a rule base.
It should be noted that, in order to ensure that normal service is not affected in the pressure measurement process, flow forwarding may be limited by a current limiting degradation component (e.g., sentinel, a commonly used current limiting degradation component), that is, system protection measures such as a current limiting threshold are configured for the system, so as to prevent the system from being unable to provide normal service when actual service flow exceeds estimated service flow.
The index value obtaining module 203 is configured to obtain a real-time pressure measurement index value of the device to be pressure-measured.
It should be noted that, in order to ensure that normal service is not affected in the pressure measurement process, flow forwarding may be limited by a current limiting degradation component (e.g., sentinel, a commonly used current limiting degradation component), that is, system protection measures such as a current limiting threshold are configured for the system, so as to prevent the system from being unable to provide normal service when actual service flow exceeds estimated service flow.
The prediction module 204 is configured to amplify the real-time pressure measurement index value in an equal proportion to obtain real performance data of the device to be pressure measured.
The real-time pressure measurement index value is measured under the condition that hardware resources and software resources of the equipment are reduced in an equal proportion, so that the equipment to be measured can support performance data of the service under a real service scene by reversely and equally amplifying the real-time pressure measurement index value, and reliable reference can be provided for service expansion and operation and maintenance through the estimated service peak value calling amount.
In the embodiment, the on-line real flow is directly used in the test, the on-line real flow is completely consistent with the real scene, dirty data cannot be generated, the flow is rich and complete in type, and the authenticity and the validity of the test result can be better guaranteed. And the service architecture does not need to be deeply reformed, the test complexity and the input cost are low, and the service can be conveniently and quickly set up an environment for testing so as to verify and estimate the bearing capacity of the service system with the minimum cost.
For another example, fig. 4 shows a structure diagram of a second embodiment of the performance pressure testing apparatus 20, in this embodiment, the performance pressure testing apparatus 20 may be further divided into a service deployment module 201, a gateway module 202, an index value obtaining module 203, a prediction module 204, a comparison module 205, and a configuration adjustment module 206.
The modules 201 and 204 are the same as those of the first embodiment, and are not described herein again.
The comparison module 205 is configured to compare the real-time pressure measurement index value with a preset expected pressure measurement index value.
Because the first configuration parameter and the second configuration parameter are initially estimated through experience and may not be in accordance with the actual situation, the measured real-time pressure measurement index value may not accurately calculate the performance data of the service supported by the equipment to be tested under the real service scene. Therefore, before the real-time pressure measurement index value is amplified in an equal ratio, preferably, an evaluation is performed on the real-time pressure measurement index value, specifically by comparing with a preset expected pressure measurement index value.
The configuration adjustment module 206 is configured to dynamically adjust the second configuration parameter and/or the first configuration parameter according to the comparison result.
When the comparison result is not ideal, the second configuration parameter and/or the first configuration parameter need to be dynamically adjusted according to the comparison result, so that the real-time pressure measurement index value is infinitely close to the expected pressure measurement index value.
If the real-time pressure measurement index value is larger than the preset expected pressure measurement index value, the forwarded flow is possibly overlarge and exceeds the bearing range of the equipment to be pressure-measured; at this time, the forwarded flow can be reduced by adjusting the second configuration parameter, specifically, the flow size and the flow pressure of the device to be pressure-measured can be automatically observed by a program or a script, then the forwarding rule and the weight of load balancing are automatically corrected, and the rule base is continuously perfected, so that the steps are repeated until the real-time pressure measurement index value is infinitely close to the expected pressure measurement index value. Besides adjusting the second configuration parameter, the first configuration parameter may also be adjusted, and specifically, the software resource and/or the hardware resource of the device to be pressure-tested may also be automatically corrected by the script. Of course, the possibility of adjusting the first configuration parameter and the second configuration parameter simultaneously is not excluded.
If the real-time pressure measurement index value is larger than the preset expected pressure measurement index value, the forwarded flow is possibly too small, so that the real performance of the equipment to be pressure-measured cannot be tested, but the comparison result needs to be further judged. Specifically, whether the comparison result is within a threshold range or not is judged, if so, the forwarding flow is indicated to be appropriate for the device to be pressure-measured, the first configuration parameter and the second configuration parameter do not need to be adjusted, the measured real-time pressure measurement index value is accurate, and estimation can be directly performed to obtain the real performance data of the device to be pressure-measured. If the forwarding flow is not within the threshold range, it indicates that the forwarding flow is too small for the device to be pressure-measured, so that the real performance data of the device to be pressure-measured cannot be obtained according to the real-time pressure-measurement index value, and at this time, the first configuration parameter and the second configuration parameter need to be reversely adjusted if the forwarding flow is too large, which is not described herein again.
By adopting the real-time flow allocation, the embodiment can analyze and display the performance test data in real time, quickly and intuitively obtain the performance index data, provide reliable reference for capacity expansion and operation and maintenance, and particularly find out the performance peak value and the performance bottleneck by comparing the real-time pressure measurement index value with the preset expected pressure measurement index value.
The invention further provides computer equipment.
Fig. 5 is a schematic diagram of a hardware architecture of an embodiment of the computer device according to the present invention. In the present embodiment, the computer device 2 is a device capable of automatically performing numerical calculation and/or information processing in accordance with a preset or stored instruction. For example, the server may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server, or a rack server (including an independent server or a server cluster composed of a plurality of servers). As shown, the computer device 2 includes, but is not limited to, at least a memory 21, a processor 22, and a network interface 23 communicatively coupled to each other via a system bus. Wherein:
the memory 21 includes at least one type of computer-readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 21 may be an internal storage unit of the computer device 2, such as a hard disk or a memory of the computer device 2. In other embodiments, the memory 21 may also be an external storage device of the computer device 2, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the computer device 2. Of course, the memory 21 may also comprise both an internal storage unit of the computer device 2 and an external storage device thereof. In this embodiment, the memory 21 is generally used for storing an operating system installed in the computer device 2 and various types of application software, such as a computer program for implementing the performance stress testing method. Further, the memory 21 may also be used to temporarily store various types of data that have been output or are to be output.
The processor 22 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 22 is generally configured to control the overall operation of the computer device 2, such as performing control and processing related to data interaction or communication with the computer device 2. In this embodiment, the processor 22 is configured to run a program code stored in the memory 21 or process data, for example, run a computer program for implementing the performance stress testing method.
The network interface 23 may comprise a wireless network interface or a wired network interface, and the network interface 23 is typically used to establish a communication connection between the computer device 2 and other computer devices. For example, the network interface 23 is used to connect the computer device 2 to an external terminal through a network, establish a data transmission channel and a communication connection between the computer device 2 and the external terminal, and the like. The network may be a wireless or wired network such as an Intranet (Intranet), the Internet (Internet), a Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, Bluetooth (Bluetooth), Wi-Fi, and the like.
It is noted that fig. 5 only shows the computer device 2 with components 21-23, but it is to be understood that not all shown components are required to be implemented, and that more or less components may be implemented instead.
In this embodiment, the computer program stored in the memory 21 for implementing the performance stress testing method may be executed by one or more processors (in this embodiment, the processor 22) to perform the following steps:
step 01: reducing hardware resources and software resources of the equipment to be tested in an equal proportion according to the first configuration parameters;
step 02: selecting flow according to a second configuration parameter and forwarding the flow to the equipment to be tested, wherein the second configuration parameter comprises a forwarding rule and a load balancing weight;
step 03: acquiring a real-time pressure measurement index value of the equipment to be pressure-measured;
step 04: and amplifying the real-time pressure measurement index value in equal proportion to obtain the real performance data of the equipment to be measured.
Furthermore, the present invention relates to a computer-readable storage medium, which is a non-volatile readable storage medium, and in which a computer program is stored, where the computer program can be executed by at least one processor to implement the operations of the performance stress testing method or apparatus.
The computer-readable storage medium includes, among others, a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the computer readable storage medium may be an internal storage unit of the computer device, such as a hard disk or a memory of the computer device. In other embodiments, the computer readable storage medium may be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), etc. provided on the computer device. Of course, the computer-readable storage medium may also include both internal and external storage devices of the computer device. In this embodiment, the computer-readable storage medium is generally used for storing an operating system and various types of application software installed in a computer device, such as the aforementioned computer program for implementing the performance stress testing method. Further, the computer-readable storage medium may also be used to temporarily store various types of data that have been output or are to be output.
While specific embodiments of the invention have been described above, it will be appreciated by those skilled in the art that this is by way of example only, and that the scope of the invention is defined by the appended claims. Various changes and modifications to these embodiments may be made by those skilled in the art without departing from the spirit and scope of the invention, and these changes and modifications are within the scope of the invention.
Claims (10)
1. A performance pressure test method is characterized by comprising the following steps:
reducing hardware resources and software resources of the equipment to be tested in an equal proportion according to the first configuration parameters;
selecting flow according to a second configuration parameter and forwarding the flow to the equipment to be tested, wherein the second configuration parameter comprises a forwarding rule and a load balancing weight;
acquiring a real-time pressure measurement index value of the equipment to be pressure-measured;
and amplifying the real-time pressure measurement index value in equal proportion to obtain the real performance data of the equipment to be measured.
2. The performance pressure testing method of claim 1, further comprising, before scaling up the pressure measurement indicator value, the steps of:
and comparing the real-time pressure measurement index value with a preset expected pressure measurement index value, and dynamically adjusting the second configuration parameter and/or the first configuration parameter according to the comparison result.
3. The performance stress testing method according to claim 2, wherein said dynamically adjusting said second configuration parameter and/or said first configuration parameter according to the result of said comparison comprises the sub-steps of:
when the real-time pressure measurement index value is larger than a preset expected pressure measurement index value, adjusting the second configuration parameter according to a comparison result to reduce forwarded flow, and/or adjusting the first configuration parameter to expand hardware resources and software resources of the equipment to be tested;
when the real-time pressure measurement index value is smaller than a preset expected pressure measurement index value, judging whether the comparison result exceeds a threshold value;
if the comparison result exceeds the threshold value, adjusting the second configuration parameter according to the comparison result to improve the forwarded flow, and/or adjusting the first configuration parameter to reduce the hardware resource and the software resource of the equipment to be tested;
and if the comparison result does not exceed the threshold value, the real-time pressure measurement index value is amplified in equal proportion to obtain the real performance data of the equipment to be pressure-measured.
4. The performance stress testing method according to claim 1, wherein the hardware resources of the device to be tested are scaled down equally, and the hardware resources are controlled and allocated by the CPU time, the system memory, and the network bandwidth of the device to be tested.
5. The performance stress testing method according to claim 1, wherein the software resources of the device to be tested are scaled down in equal proportion by adjusting the virtual machine memory start-up parameters, the thread number and the memory database connection pool.
6. The performance pressure testing method according to claim 1, wherein the traffic is forwarded through a gateway, a current limiting downgrade component is loaded on the gateway, and forwarding of the traffic is limited by the current limiting downgrade component.
7. A performance pressure testing device, comprising:
the service deployment module is used for scaling down hardware resources and software resources of the equipment to be tested in an equal proportion according to the first configuration parameter;
the gateway module is used for selecting flow according to a second configuration parameter and forwarding the flow to the equipment to be tested, wherein the second configuration parameter comprises a forwarding rule and a load balancing weight;
the index value acquisition module is used for acquiring a real-time pressure measurement index value of the equipment to be pressure-measured;
and the prediction module is used for amplifying the real-time pressure measurement index value in an equal proportion so as to obtain the real performance data of the equipment to be pressure-measured.
8. The performance pressure testing device of claim 7, further comprising:
the comparison module is used for comparing the real-time pressure measurement index value with a preset expected pressure measurement index value;
and the configuration adjusting module is used for dynamically adjusting the second configuration parameter and/or the first configuration parameter according to the comparison result.
9. A computer device comprising a memory and a processor, characterized in that the memory has stored thereon a computer program which, when executed by the processor, carries out the steps of the performance stress testing method according to any one of claims 1-6.
10. A computer-readable storage medium, in which a computer program is stored which is executable by at least one processor for carrying out the steps of the performance stress testing method according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010595966.XA CN111723018A (en) | 2020-06-28 | 2020-06-28 | Performance pressure testing method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010595966.XA CN111723018A (en) | 2020-06-28 | 2020-06-28 | Performance pressure testing method, device, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111723018A true CN111723018A (en) | 2020-09-29 |
Family
ID=72569273
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010595966.XA Pending CN111723018A (en) | 2020-06-28 | 2020-06-28 | Performance pressure testing method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111723018A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112350894A (en) * | 2020-11-05 | 2021-02-09 | 科大讯飞股份有限公司 | Performance test method, device, equipment and storage medium of service node |
CN114153679A (en) * | 2021-12-08 | 2022-03-08 | 南方电网数字电网研究院有限公司 | Simulation environment-based substation gateway accessory equipment testing method and system |
CN114448839A (en) * | 2022-01-29 | 2022-05-06 | 中国工商银行股份有限公司 | Self-adaptive distributed system pressure measurement method, device and system |
CN114861039A (en) * | 2022-03-31 | 2022-08-05 | 北京优特捷信息技术有限公司 | Parameter configuration method, device, equipment and storage medium of search engine |
CN115242684A (en) * | 2022-07-21 | 2022-10-25 | 中国平安财产保险股份有限公司 | Full link voltage measuring method, device, computer equipment and storage medium |
CN116132328A (en) * | 2023-02-10 | 2023-05-16 | 北京安锐卓越信息技术股份有限公司 | Network pressure testing method and device, storage medium and electronic equipment |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090300423A1 (en) * | 2008-05-28 | 2009-12-03 | James Michael Ferris | Systems and methods for software test management in cloud-based network |
CN107948012A (en) * | 2017-11-16 | 2018-04-20 | 郑州云海信息技术有限公司 | Pressure surveys method and system on a kind of cloud management platform line |
CN110567670A (en) * | 2019-09-11 | 2019-12-13 | 交通运输部天津水运工程科学研究所 | Sudden gust response wind tunnel simulation device and test method for large port mechanical equipment |
-
2020
- 2020-06-28 CN CN202010595966.XA patent/CN111723018A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090300423A1 (en) * | 2008-05-28 | 2009-12-03 | James Michael Ferris | Systems and methods for software test management in cloud-based network |
CN107948012A (en) * | 2017-11-16 | 2018-04-20 | 郑州云海信息技术有限公司 | Pressure surveys method and system on a kind of cloud management platform line |
CN110567670A (en) * | 2019-09-11 | 2019-12-13 | 交通运输部天津水运工程科学研究所 | Sudden gust response wind tunnel simulation device and test method for large port mechanical equipment |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112350894A (en) * | 2020-11-05 | 2021-02-09 | 科大讯飞股份有限公司 | Performance test method, device, equipment and storage medium of service node |
CN114153679A (en) * | 2021-12-08 | 2022-03-08 | 南方电网数字电网研究院有限公司 | Simulation environment-based substation gateway accessory equipment testing method and system |
CN114448839A (en) * | 2022-01-29 | 2022-05-06 | 中国工商银行股份有限公司 | Self-adaptive distributed system pressure measurement method, device and system |
CN114448839B (en) * | 2022-01-29 | 2024-04-12 | 中国工商银行股份有限公司 | Self-adaptive distributed system pressure measurement method, device and system |
CN114861039A (en) * | 2022-03-31 | 2022-08-05 | 北京优特捷信息技术有限公司 | Parameter configuration method, device, equipment and storage medium of search engine |
CN115242684A (en) * | 2022-07-21 | 2022-10-25 | 中国平安财产保险股份有限公司 | Full link voltage measuring method, device, computer equipment and storage medium |
CN115242684B (en) * | 2022-07-21 | 2023-06-20 | 中国平安财产保险股份有限公司 | Full-link pressure measurement method and device, computer equipment and storage medium |
CN116132328A (en) * | 2023-02-10 | 2023-05-16 | 北京安锐卓越信息技术股份有限公司 | Network pressure testing method and device, storage medium and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111723018A (en) | Performance pressure testing method, device, equipment and storage medium | |
CN108376112B (en) | Pressure testing method, device and readable medium | |
CN106294120B (en) | Method, apparatus and computer program product for testing code | |
CN108829593B (en) | Code coverage rate calculation and analysis method, device, equipment and storage medium | |
CN106055464B (en) | Data buffer storage testing schooling pressure device and method | |
CN107229566B (en) | Method and system for maintaining functional consistency of SOA service conversion language | |
CN107705819A (en) | A kind of storage chip sorting technique, sorter and categorizing system | |
CN111881023B (en) | Software aging prediction method and device based on multi-model comparison | |
CN109101397A (en) | High-Performance Computing Cluster monitoring method, unit and storage medium | |
CN112214366B (en) | Test method, device, system, equipment and medium | |
CN110297743B (en) | Load testing method and device and storage medium | |
CN110532187B (en) | HDFS throughput performance testing method, system, terminal and storage medium | |
CN104376397B (en) | A kind of data real-time analysis method and device | |
CN111147331A (en) | Server network card interaction test method, system, terminal and storage medium | |
CN111683296B (en) | Video segmentation method and device, electronic equipment and storage medium | |
CN111274128A (en) | Test method, test device, computer equipment and computer readable storage medium | |
CN116450483A (en) | Method, device, server and medium for determining load of software distribution | |
CN113676377B (en) | Online user number evaluation method, device, equipment and medium based on big data | |
CN115509931A (en) | System-based performance test method and device, electronic equipment and storage medium | |
CN113849484A (en) | Big data component upgrading method and device, electronic equipment and storage medium | |
CN112465604A (en) | Order distribution method and device, computer equipment and computer readable storage medium | |
CN111752786A (en) | Data storage method, data summarization method, equipment and medium in pressure test process | |
CN111367640B (en) | Data statistics period determining method and device, electronic equipment and storage medium | |
CN109783293B (en) | AEP memory-based alternating mixed pressure testing method | |
CN115878482A (en) | Product testing method and related device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200929 |