CN113590403B - Pressure testing method, device, system, electronic equipment, storage medium and product - Google Patents
Pressure testing method, device, system, electronic equipment, storage medium and product Download PDFInfo
- Publication number
- CN113590403B CN113590403B CN202110897953.2A CN202110897953A CN113590403B CN 113590403 B CN113590403 B CN 113590403B CN 202110897953 A CN202110897953 A CN 202110897953A CN 113590403 B CN113590403 B CN 113590403B
- Authority
- CN
- China
- Prior art keywords
- test
- pressure
- nodes
- target
- node
- 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.)
- Active
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 691
- 238000003860 storage Methods 0.000 title claims abstract description 29
- 238000000034 method Methods 0.000 claims description 56
- 230000000977 initiatory effect Effects 0.000 claims description 23
- 238000009530 blood pressure measurement Methods 0.000 claims description 17
- 238000013500 data storage Methods 0.000 claims description 15
- 238000013473 artificial intelligence Methods 0.000 abstract description 9
- 238000012545 processing Methods 0.000 description 21
- 238000012544 monitoring process Methods 0.000 description 18
- 238000004590 computer program Methods 0.000 description 14
- 238000004891 communication Methods 0.000 description 11
- 238000010586 diagram Methods 0.000 description 11
- 238000003825 pressing Methods 0.000 description 10
- 230000006835 compression Effects 0.000 description 8
- 238000007906 compression Methods 0.000 description 8
- 238000013461 design Methods 0.000 description 8
- 230000008569 process Effects 0.000 description 8
- 238000002360 preparation method Methods 0.000 description 6
- 238000004422 calculation algorithm Methods 0.000 description 5
- 238000010998 test method Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 4
- 230000003993 interaction Effects 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 3
- 238000009826 distribution Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000009662 stress testing Methods 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 125000004122 cyclic group Chemical group 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000009191 jumping Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000004806 packaging method and process Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/2205—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
- G06F11/2236—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test CPU or processors
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/2273—Test methods
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
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)
- Testing Of Devices, Machine Parts, Or Other Structures Thereof (AREA)
- Debugging And Monitoring (AREA)
Abstract
The disclosure provides a pressure testing method, a pressure testing device, a pressure testing system, electronic equipment, storage media and products, relates to the technical field of artificial intelligence, and particularly relates to the field of cloud computing. The specific implementation scheme is as follows: determining target test data for performing pressure test on a server to be tested; and acquiring resource use information corresponding to hardware resources of a plurality of pressure generating nodes in the pressure test cluster. And determining target node information by utilizing the resource use information. The target node information is used to determine at least one target node of the plurality of originating nodes. And sending the target node information and the target test data to a control node of the pressure test cluster to instruct the control node to utilize the target test data to control the at least one target node to initiate a pressure test to the server to be tested. The embodiment of the disclosure improves the accuracy of pressure testing.
Description
Technical Field
The disclosure relates to the field of artificial intelligence, in particular to the field of cloud computing, and specifically relates to a pressure testing method, a device, a system, electronic equipment, a storage medium and a product.
Background
With the rapid development of artificial intelligence technology, more and more industries attempt to package artificial intelligence services to provide intelligent services to the outside. In general, a service end of the artificial intelligence service may be a cloud server, and the cloud server configured with the intelligent service may receive a service request of a user and respond to the service request of the user based on a provided intelligent service algorithm to feed back a service result to the user.
In the related art, a distributed stress test method is adopted to test the maximum number of service requests processed by a server. In a distributed stress test scheme, a stress test cluster may be used, which may configure a control node and a plurality of stress nodes. The control node can control the plurality of pressure-generating nodes to generate a plurality of service requests at the same time, and simultaneously send the generated service requests to the server to be tested so as to test the processing capacity of the server to be tested and obtain a test result.
However, if the number of requests for a plurality of service requests generated by the control node controlling a plurality of sending nodes is large, there may be a case that the number of actually generated pressure nodes cannot reach the number of requests set by the control node due to the limitation of hardware resources of the press itself, resulting in inaccurate test results.
Disclosure of Invention
The disclosure provides a pressure testing method, device and system for maximum flow of an intelligent server, electronic equipment, storage medium and products.
According to a first aspect of the present disclosure, there is provided a pressure testing method comprising:
determining target test data for performing pressure test on a server to be tested;
acquiring resource use information corresponding to hardware resources of a plurality of pressure generating nodes in a pressure test cluster;
determining target node information in the plurality of transmitting nodes by utilizing the resource use information; the target node information is used to determine at least one target node of the plurality of originating nodes.
And sending the target node information and the target test data to a control node of the pressure test cluster to instruct the control node to utilize the target test data to control the at least one target node to initiate a pressure test to the server to be tested.
According to a second aspect of the present disclosure, there is provided a pressure testing method comprising:
acquiring target node information and target test data; the target node information is information of at least one target node determined from a plurality of transmitting nodes based on the corresponding resource use information of hardware resources of the plurality of transmitting nodes in the pressure test cluster;
Determining the at least one target node from the plurality of transmitting nodes according to the target node information;
and controlling the at least one target node to initiate a pressure test to the server to be tested by using the target test data.
According to a third aspect of the present disclosure, there is provided a pressure testing apparatus comprising:
the data determining unit is used for determining target test data for performing pressure test on the server to be tested;
the information acquisition unit is used for acquiring resource use information corresponding to the hardware resources of the plurality of transmitting nodes;
a node selection unit, configured to determine target node information by using the resource usage information; the target node information is used for determining at least one target node in the plurality of transmitting nodes;
and the test control unit is used for sending the target node information and the target test data to the control nodes of the pressure test cluster so as to instruct the control nodes to control the at least one target node to initiate the pressure test to the server to be tested by utilizing the target test data.
According to a fourth aspect of the present disclosure, there is provided a pressure testing apparatus comprising
The first acquisition unit is used for acquiring target node information and target test data; the target node information is information of at least one target node determined from a plurality of transmitting nodes based on the corresponding resource use information of hardware resources of the plurality of transmitting nodes in the pressure test cluster;
A node determining unit configured to determine the at least one target node from the plurality of transmitting nodes according to the target node information;
and the test control unit is used for controlling the at least one target node to initiate a pressure test to the server to be tested by utilizing the target test data.
According to a fifth aspect of the present disclosure, there is provided a pressure testing system comprising: the system comprises electronic equipment and a pressure test cluster connected with the electronic equipment, wherein the pressure test cluster comprises a control node and a plurality of pressure generating nodes; the plurality of pressure generating nodes are connected with the server to be tested;
the electronic device is used for: determining target test data for performing pressure test on a server to be tested; acquiring resource use information corresponding to hardware resources of a plurality of pressure generating nodes in a pressure test cluster; determining target node information by utilizing the resource use information; the target node information is used for determining at least one target node in the plurality of transmitting nodes; and sending the target node information and the target test data to a control node of the pressure test cluster.
The control node is configured to: acquiring the target node information and target test data sent by the electronic equipment; determining the at least one target node from the plurality of transmitting nodes according to the target node information; and controlling the at least one target node to initiate a pressure test to the server to be tested by utilizing the target test data.
According to a sixth aspect of the present disclosure, there is provided an electronic device comprising:
at least one processor and a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of the first or second aspect.
According to a seventh aspect of the present disclosure, there is provided a non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of the first or second aspect.
According to an eighth aspect of the present disclosure, there is provided a computer program product comprising: a computer program stored in a readable storage medium from which at least one processor of an electronic device can read, the at least one processor executing the computer program causing the electronic device to perform the method of the first or second aspect.
According to the technology disclosed by the disclosure, hardware resources of a plurality of transmitting nodes are monitored to acquire resource usage information, and then target node information of at least one target node is determined by utilizing the resource usage information, so that the target node information and target test data are sent to a control node of a pressure test cluster. The control node of the stress test cluster determines at least one target node through the target node information so as to control the at least one target node to perform stress test on the service end to be tested by utilizing the target test data. By monitoring the hardware resources of the pressure generating node, the service condition of the pressure generating node can be known in time, the node for executing the pressure measurement is adjusted, the timeliness and the effectiveness of the pressure measurement are improved, and a more accurate test result is obtained.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a schematic diagram of a first network architecture for a stress testing method provided in accordance with the present disclosure;
FIG. 2 is a schematic diagram of a second network architecture for a stress testing method provided in accordance with the present disclosure;
FIG. 3 is a flow chart of a pressure testing method according to a first embodiment of the present disclosure;
FIG. 4 is a flow chart of yet another pressure testing method according to a second embodiment of the present disclosure;
FIG. 5 is a flow chart of yet another pressure testing method according to a third embodiment of the present disclosure;
FIG. 6 is a flow chart of yet another pressure testing method according to a fourth embodiment of the present disclosure;
FIG. 7 is a flow chart of yet another pressure testing method according to a fifth embodiment of the present disclosure
FIG. 8 is a flow chart of yet another pressure testing method according to a sixth embodiment of the present disclosure;
FIG. 9 is a flow chart of yet another pressure testing method according to a seventh embodiment of the present disclosure;
FIG. 10 is a pressure testing scenario diagram in which embodiments of the present disclosure may be implemented;
FIG. 11 is a flow chart of yet another pressure testing method according to an eighth embodiment of the present disclosure;
fig. 12 is a schematic structural view of a pressure testing apparatus according to a ninth embodiment of the present disclosure;
fig. 13 is a schematic structural view of a pressure testing apparatus according to a tenth embodiment of the present disclosure;
FIG. 14 is a block diagram of an electronic device for implementing a method of pressure testing of embodiments of the present disclosure;
fig. 15 is a schematic structural view of a pressure testing system according to an eleventh embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The disclosure provides a pressure testing method, a pressure testing device, a pressure testing system, electronic equipment and a storage medium, which are applied to the field of intelligent service testing in artificial intelligence so as to achieve the aim of improving testing precision.
In the related art, in the case where an artificial intelligence algorithm can be packaged as services that provide intelligent computation to the outside, these services can be referred to as intelligent services. Generally, the intelligent service may be configured in a cloud server, and the cloud server may receive a service request initiated by a user and respond to the service request by using a configured artificial intelligence algorithm to obtain a calculation result. For example, the server side of the face recognition service may receive an image provided by a user, and recognize a face in the image, thereby recognizing the identity of the user. In order to better provide intelligent services, it is necessary to confirm the maximum number of service requests that the service end of the artificial intelligent service can handle at the same time. In general, when the maximum processing number of service requests processed by the server side can be tested by adopting a distributed stress test method, the maximum request processing number of the server side can be tested by using a stress test cluster. The stress test cluster may include a control node and a plurality of originating nodes. The control node can control the plurality of the pressure-generating nodes to generate a plurality of service requests at the same time and simultaneously send the generated service requests of the plurality of the pressure-generating nodes to the service end. The server receives a plurality of service requests initiated by a plurality of transmitting nodes and processes and responds to the plurality of service requests. The method comprises the steps of monitoring parameters such as request success rate, average request time consumption and the like of a plurality of service requests by a server so as to obtain a test result of the server. However, since the number of requests set by the user is generally larger, the number of requests to be initiated per node is also larger. The number of service requests actually generated by each node may not reach the set number of requests, which results in that the server cannot receive enough service requests and the obtained test results are not accurate enough.
In order to solve the technical problem, the inventor thinks of monitoring the hardware resources of the nodes participating in the compression so as to accurately control the use condition of the hardware resources of the nodes and realize accurate compression control. Accordingly, the inventors propose a technical solution of the present disclosure.
In the embodiment of the disclosure, when determining the target test data for performing the pressure test on the server to be tested, resource usage information corresponding to hardware resources of a plurality of sending nodes can be obtained, and then the target node information of at least one target node is determined by utilizing the resource usage information, so that the target node information and the target test data are sent to the control node of the pressure test cluster. The control node of the stress test cluster determines at least one target node through the target node information so as to control the at least one target node to perform stress test on the service end to be tested by utilizing the target test data. The resource use information corresponding to the hardware resources of the plurality of the pressure-generating nodes is monitored, so that the resource use condition of the plurality of the pressure-generating nodes can be known in time, the target node information of at least one target node which can participate in the test can be accurately obtained, the preparation control of the at least one target node which participates in the pressure test is realized, the number of service requests generated by each target node is more accurate, the accurate test result is obtained, and the test efficiency is improved.
Fig. 1 is a schematic diagram of a first network architecture for performing a pressure test on a server to be tested according to the present disclosure, as shown in fig. 1, where the network architecture may include a typical server to be tested 1, and the server to be tested may be a cloud configured with an intelligent service. The server 1 to be tested can be connected with the pressure test cluster 2 through a local area network or a wide area network. The stress test cluster 2 may be a master-slave distributed cluster, and the master node, i.e. the control node 21, is connected to a plurality of pressure generating nodes 22 through a local area network or a wide area network. The control node 21 of the stress test cluster 2 may be network-connected with the electronic device 3 via a local area network or a wide area network. The pressure testing method provided according to any of the embodiments shown in fig. 2-9 of the present disclosure may be configured in the electronic device 3. The electronic device 3 may obtain resource usage information corresponding to hardware resources of the plurality of pressing nodes 22 in the pressure test cluster 2, and determine target node information of at least one target node in the plurality of pressing nodes by using the resource usage information, so as to send the target node information and target test data for performing the pressure test on the service end 1 to be tested to the control node 21. The control node 21 and the plurality of pressing nodes 22 may be, for example, a computer, a server node, a cloud server node, etc., and the specific types of the nodes in the stress test cluster are not limited in this disclosure. The control node 21 may be configured with a pressure testing method provided according to the embodiment shown in fig. 11 of the present disclosure, where at least one target node may be determined from a plurality of sending nodes 22 according to target node information, and then the at least one target node is controlled to initiate a pressure test to a service end to be served by using the target test data.
Fig. 2 is a schematic diagram of a second network architecture for performing a pressure test on a server to be tested according to the present disclosure, which is different from fig. 1 in that the pressure test cluster 2 may also establish a network connection with a monitoring node 4 through a local area network or a wide area network. The monitoring node 4 may detect resource usage information corresponding to a hardware resource of at least one target node participating in the pressure generation among the plurality of pressure generating nodes 22 in the pressure test cluster 2. The monitoring node 4 may establish a network communication connection with the electronic device 3 through a local area network or a wide area network, send resource usage information obtained by monitoring to the electronic device 3 through the network, and determine target node information of at least one target node of the plurality of transmitting nodes by using the resource usage information by the electronic device 3. In practical applications, in order to save hardware resources, the monitoring node 4 may also be any node in the pressure test cluster 2, where the monitoring node 4 shown in fig. 2 is not disposed in the pressure test cluster 2, only for illustrating that a terminal for monitoring a plurality of sending nodes needs to be present, where a specific configuration of the terminal may be set according to actual use requirements, and the example shown in fig. 2 is only one network architecture and should not constitute a specific limitation on the system architecture of the present disclosure.
The following describes the technical scheme of the embodiments of the present disclosure in detail with reference to the accompanying drawings.
As shown in fig. 3, a flowchart of a pressure testing method according to a first embodiment of the present disclosure may include the following steps:
301: and determining target test data for performing pressure test on the server to be tested.
In this embodiment, in the network structure shown in fig. 1, the home terminal device may be an electronic device. In practical applications, the electronic device may be a notebook, a computer, an ultra-personal computer, a cloud server, etc., and the specific type of the electronic device in the embodiments of the present disclosure is not limited too much.
The server to be tested may be, for example, a cloud server shown in fig. 1, and the server to be tested may provide test services to the outside. The method comprises the steps of communicating with a user side of a user by providing an external interface, such as an SDK (Software Development Kit ) or an API (Application Programming Interface, application programming interface), receiving a service request, processing the service request based on a configured intelligent service algorithm, obtaining a service result, and feeding back the service result to the user.
The target test data may be at least one test data related to the pressure test of the server to be tested. Taking an image recognition scene as an example, the target test data may be an image that needs to be subjected to an image recognition test. Taking the data processing scenario as an example, the target test data may be original test data that needs to be processed. The target test data may be provided by a user initiating a test request for the server under test.
302: and acquiring resource use information corresponding to hardware resources of a plurality of pressure generating nodes in the pressure test cluster.
The resource usage information may be usage data of hardware resources of at least one historical target node that was previously engaged in the stress test.
The resource usage information may include, for example: CPU (central processing unit ) usage information, memory usage information, throughput information, and the like of each of the transmitting nodes.
303: and determining target node information by utilizing the resource use information.
The target node information is used for determining at least one target node in the plurality of transmitting nodes.
Alternatively, the resource usage information may be used to determine at least one target node of the plurality of originating nodes that is involved in the originating test. The target node information may include the number of nodes. In some application scenarios, the target node information may also include a node identification.
304: and sending the target node information and the target test data to a control node of the pressure test cluster to instruct the control node to utilize the target test data to control at least one target node to initiate a pressure test to the server to be tested.
The target node information and the target test data are sent by the electronic device to a control node of the stress test cluster. The control node may obtain target node information and target test data. The control node can also determine at least one target node from the plurality of pressure-generating nodes according to the target node information, so as to control the at least one target node to initiate a pressure test to the server to be tested by utilizing the target test data.
Any target node can receive target test data sent by the control node, generate at least one service request according to the target test data, and send the at least one service request to the server to be tested. At least one service request sent to the server under test may be referred to as a request stream.
As one possible implementation, the target test data may include at least one test data, and any of the target nodes may generate at least one service request based on the at least one test data. In one alternative, one service request may be generated with each test data, and in another alternative, multiple service requests may be generated with each test data to obtain at least one service request corresponding to at least one test data.
In this embodiment, when determining the target test data for performing the pressure test on the server to be tested, the resource usage information corresponding to the hardware resources of the plurality of pressing nodes may be obtained, and then the target node information of at least one target node is determined by using the resource usage information, so that the target node information and the target test data are sent to the control node of the pressure test cluster. The control node of the stress test cluster determines at least one target node through the node information so as to control the at least one target node to perform stress test on the service end to be tested by utilizing the target test data. The resource use information corresponding to the hardware resources of the plurality of the pressure-generating nodes is monitored, so that the resource use condition of the plurality of the pressure-generating nodes can be known in time, the target node information of at least one target node which can participate in the test can be accurately obtained, the preparation control of the at least one target node which participates in the pressure test is realized, the number of service requests generated by each target node is more accurate, the accurate test result is obtained, and the test efficiency is improved.
The stress test of the server to be tested can be initiated by a user. Fig. 4 is a flowchart of a pressure testing method provided by a second embodiment of the present disclosure, which may include the following steps:
401: responding to a pressure test request initiated by a user aiming at a server to be tested, and acquiring pressure test information provided by the user.
Alternatively, a service initiation page may be provided through which the user may initiate a stress test request to the electronic device. The user may input test information of the to-be-tested server in the service initiation page, for example, the test information may include information such as a service interface or a service address of the to-be-tested server. The user can also provide the pressure test information of the server to be tested through the service initiation page.
402: and determining target test data participating in the pressure test according to the pressure test information.
Alternatively, the target test data may be determined by stress test information provided by the user. The target test data may also be obtained by detecting that the user is directly uploaded by the user.
403: and acquiring resource use information corresponding to hardware resources of a plurality of pressure generating nodes in the pressure test cluster.
404: and determining target node information by utilizing the resource use information.
The target node information is used for determining at least one target node in the plurality of transmitting nodes.
405: and sending the target node information and the target test data to a control node of the pressure test cluster to instruct the control node to utilize the target test data to control at least one target node to initiate a pressure test to the server to be tested.
In this embodiment, step 301 in the pressure testing method provided in the embodiment shown in fig. 3 is further refined, and besides steps 401 to 402, specific implementation manners of other steps in this embodiment may refer to relevant matters described in other embodiments, which are not described in detail herein.
In this embodiment, a user may initiate a test request to a service end to be tested, and external provision of a test service is achieved through interaction with the user, service modularization is achieved, and efficient test service is provided, so that test efficiency is improved.
As one example, step 402 may be an alternative implementation of determining target test data for participation in a stress test based on stress test information as follows:
analyzing the pressure test information to obtain pressure test demand information and a data storage address provided by a user;
and acquiring target test data from the storage space corresponding to the data storage address according to the pressure measurement demand information.
Alternatively, the pressure test requirement information and the data storage address may be provided by the user in a pressure test page. The pressure measurement requirement information can be selection information of test data set by a user aiming at service content of the to-be-measured service end. The data storage address may be an address link accessible to the electronic device, for example, a disk address, a network disk address, a database access address, a web page address, etc., and the specific address type of the data storage address in this embodiment is not limited too much.
In the above embodiment, in the step of obtaining the target test data, according to the pressure measurement requirement information, obtaining the target test data from the storage space corresponding to the data storage address may specifically include:
pulling a plurality of original test data from a storage space corresponding to the data storage address;
and selecting target test data from the plurality of original test data according to the pressure test requirement information.
The target test data may be at least one test data satisfying the pressure test requirement selected from a plurality of raw test data according to the pressure test requirement information.
The pressure measurement demand information may include: data selection conditions, the number of test data, the type of test data and the like.
For easy understanding, taking face recognition as an example, a plurality of original images may be pulled from the storage space corresponding to the data storage address, where the plurality of original images may include: face images, scenic images, animal images, etc. The pressure measurement requirement information may be: 3 face images with resolution higher than 520 x 520 are selected. Wherein, the selection conditions are as follows: the resolution is higher than 520 x 520, the number of the test data is 3, and the type of the test data is a face image. At this time, the target test data may be 3 images including a face and having a resolution higher than 520×520 selected from the face images.
As shown in fig. 5, a flowchart of a pressure testing method according to a third embodiment of the present disclosure may include the following steps:
501: and determining target test data for performing pressure test on the server to be tested.
502: and acquiring resource use information corresponding to hardware resources of a plurality of pressure generating nodes in the pressure test cluster.
503: and under the condition that the plurality of the pressure generating nodes do not meet the pressure generating termination condition, determining the node number of the pressure generating nodes participating in the pressure test by utilizing the resource use information.
504: and generating target node information according to the number of the nodes.
Wherein the target node information may include the number of nodes.
The target node information is used for the control node to determine at least one target node from a plurality of transmitting nodes according to the number of the nodes.
Further, in some embodiments, at least one target node may be determined by the electronic device or by the control node. When the electronic device determines at least one target node, the electronic device may select the number of target nodes from the plurality of transmitting nodes according to the number of nodes, and generate target node information using the node identification of the selected target nodes and the number of nodes. When the control node determines at least one target node, the target node information may include the number of nodes.
505: and sending the target node information and the target test data to a control node of the pressure test cluster to instruct the control node to utilize the target test data to control at least one target node to initiate a pressure test to the server to be tested.
In this embodiment, step 303 in the pressure testing method provided in the embodiment shown in fig. 3 is further refined, and in addition to steps 503 to 504, specific implementation manners of other steps in this embodiment may refer to relevant matters described in other embodiments, which are not described in detail herein.
In this embodiment, after obtaining the resource usage information of the hardware resources of the plurality of node-to-be-pressed nodes in the pressure test cluster, the number of nodes of the node-to-be-pressed nodes participating in the pressure test may be determined by using the resource usage information when the plurality of node-to-be-pressed nodes do not meet the condition of termination of the pressure test, so as to generate the number of nodes of the at least one target node according to the number of nodes. By accurately monitoring the pressure conditions of a plurality of pressure sending nodes, the pressure sending termination nodes can be accurately controlled, so that when the pressure sending termination conditions are not reached, the node number of the pressure sending nodes participating in the pressure test is determined by utilizing the resource use information, the node number of at least one target node participating in the pressure sending is accurately acquired, the accurate test is realized, and the test effectiveness and the test precision are improved.
In some embodiments, in order to make an accurate determination on the transmitting node, after step 505, the method may further include:
and under the condition that the plurality of pressure generating nodes meet the pressure generating termination condition, stopping performing pressure test on the server to be tested. Meanwhile, the prompt message of failure of the pressure test can be output.
Optionally, outputting the prompt message of the failure of the stress test may include: and sending the prompt message of the pressure test failure to the user side so that the user side can display the prompt message of the pressure test failure for the user.
After stopping the pressure test on the server to be tested, the node number can be restored to the node number when the pressure test is executed for the first time, namely the initial node number. For example, in general, when the number of nodes at the time of performing the stress test for the first time is 1, the number of nodes may be restored to 1. When the user initiates the pressure test again, the pressure test is carried out on the server to be tested from 1 target node.
In this embodiment, when the plurality of pressure generating nodes meet the pressure generating termination condition, the pressure test on the server to be tested may be stopped, and a prompt message indicating that the pressure test fails may be output. When the pressure test is stopped, the user is prompted, so that the user can be ensured to know the result of the test failure in time, the timely notification of the message is realized, and the effective interaction is realized.
In order to accurately determine whether the compression node meets the compression termination condition, an optional implementation manner of whether the compression nodes meet the compression termination condition is as follows:
the number of historical nodes of at least one target node used at a previous stress test is obtained.
And when the number of the historical nodes is smaller than the total number of the nodes of the plurality of the sending nodes, determining that the plurality of the sending nodes do not meet the sending termination condition.
And when the number of the historical nodes is equal to the total number of the nodes of the plurality of the sending nodes, determining that the plurality of the sending nodes meet the sending termination condition.
The total node amount can be the node amount of all the sending nodes which can participate in the sending of the plurality of sending nodes, and when the plurality of sending nodes can send the pressure, the node amount can be the node amount of the plurality of sending nodes.
In this embodiment, the accurate judgment is performed on the compression termination conditions of the compression nodes by using the number of nodes, and the judgment mode of the number of nodes is directly adopted, so that the method is simple and accurate, and the judgment efficiency and the judgment accuracy are high.
The resource usage information may be usage data of hardware resources of a target node currently participating in the test in the plurality of transmitting nodes of the stress test cluster.
Specifically, the resource usage information may include: at least one of throughput per second, central processor usage, memory usage of at least one historical target node at a previous stress test.
In this embodiment, the information such as throughput per second, utilization rate of the central processing unit, utilization rate of the memory, and the like of at least one target node are accurately defined to define specific content of the resource utilization information, so that the more detailed resource utilization information is utilized to perform accurate implementation of the following steps such as node determination, condition judgment, and the like, thereby providing a guarantee for further improvement of test accuracy.
The resource usage information and the number of the history nodes can be used for simultaneously measuring whether the plurality of the transmitting nodes currently reach the transmitting termination condition. And when the number of the historical nodes is smaller than the total number of the nodes of the plurality of the sending nodes, determining that the plurality of the sending nodes do not meet the sending termination condition. When the number of the history nodes is equal to the total number of the nodes of the plurality of the sending nodes, the resource use information can be utilized to further judge whether the plurality of the sending nodes meet the sending termination condition.
Wherein when the number of the history nodes is equal to the total number of nodes of the plurality of the node for transmitting the pressure, determining that the plurality of the node for transmitting the pressure satisfies the condition for terminating the pressure may include: when the number of the history nodes is equal to the total number of the nodes of the plurality of the sending nodes, and the throughput Per Second generated by the plurality of the sending nodes is smaller than the QPS (Query Per Second) required by the pressure measurement service and the utilization rate of the CPU or the memory of all the sending nodes is greater than 85% of the total resources, the plurality of the sending nodes are determined to meet the sending termination condition.
When the number of the historical nodes is equal to the total number of the nodes of the plurality of the pressure-generating nodes, throughput per second generated by the plurality of the pressure-generating nodes is greater than QPS required by the pressure measurement service, and the utilization rate of the CPU or the memory of all the pressure-generating nodes is not greater than 85% of all the resources, the plurality of the pressure-generating nodes are determined to not meet the pressure-generating termination condition, the pressure measurement task quantity can be continuously increased, and the pressure measurement task is continuously executed. Particularly for the concurrency test scenario, the step of determining the concurrency number of the concurrency tests under the condition that the concurrency test is executed by the server to be tested can be continuously executed.
When the number of history nodes of at least one target node used at the previous pressure test is obtained, the current number of nodes may be calculated according to the number of history nodes. Thus, step 504: in the case that the plurality of the node for transmitting the pressure does not satisfy the condition for terminating the transmitting the pressure, determining the number of nodes of the node for transmitting the pressure to be tested using the resource usage information may include:
and under the condition that the plurality of the node sending out nodes do not meet the condition of sending out the termination of the pressure, determining the increment of the node needing to be increased by utilizing the resource use information.
And calculating the sum of the number of the historical nodes and the increment of the nodes to obtain the number of the nodes.
Alternatively, when the number of the history nodes is smaller than the total number of nodes of the plurality of the node of the sending node, it may be determined that the plurality of the node of the sending node does not satisfy the sending termination condition. The resource usage information may include: at least one of throughput per second, central processor usage, memory usage of at least one historical target node at a previous stress test. When the number of the history nodes is smaller than the total number of the nodes of the plurality of transmitting nodes, determining the number of the nodes to be increased by using the resource usage information may include: and when the number of the historical nodes is smaller than the total number of the nodes of the plurality of the sending nodes, if at least one historical target node reaches the condition that the throughput Per Second generated by the combination of the historical target nodes is smaller than the QPS (Query Per Second) required by the pressure measurement service, and the utilization rate of the CPU or the memory of all the sending nodes is greater than 85% of the total resources, calculating the sum of the number of the historical nodes and the node increment of the at least one historical target node, and obtaining the number of the nodes.
The node increment can be set according to actual use requirements, and the increased node quantity is tested each time. For example, the node increment may be set to 1.
In this embodiment, when the plurality of node sending out nodes do not meet the condition of terminating sending out the pressure, the node number of at least one target node of the plurality of node sending out the pressure is determined by using the resource usage information, so that the node number is related to the resource usage information of the hardware resource, the obtained node number is more accurate, and when the at least one target node corresponding to the node number is used for carrying out the pressure test, the generated actual test request flow is not affected by the hardware resource, thereby avoiding the sending out the pressure error caused by insufficient hardware resource and improving the test precision.
In the actual test process, the concurrent test mode can be adopted to carry out the cyclic test on the server to be tested, and the task quantity is continuously increased from the smaller task quantity so as to continuously increase the service flow sent by the pressure-sending node and realize the accurate test on the server to be tested.
As shown in fig. 6, a flowchart of a pressure testing method according to a fourth embodiment of the present disclosure may include the following steps:
601: and determining target test data for performing pressure test on the server to be tested.
602: and acquiring resource use information corresponding to hardware resources of a plurality of pressure generating nodes in the pressure test cluster.
603: and under the condition that the concurrency test is executed on the server to be tested, determining the concurrency quantity of the concurrency test.
604: and under the condition that the plurality of the pressure generating nodes do not meet the pressure generating termination condition, determining the node number of the pressure generating nodes participating in the pressure test by utilizing the resource use information.
605: and determining the task quantity of the at least one target node for executing the concurrent tasks respectively according to the node quantity and the concurrent quantity.
Alternatively, the task amount may be the number of threads started by the corresponding target node, and when each thread is started, a service request may be generated according to the target test data.
The task amount of the concurrent task respectively executed by the at least one target node may be determined according to a quotient and a remainder of the concurrent number and the node number. Specifically, the number of nodes is k, the number of concurrency is n, for the ith target node in the k target nodes, if i > n% k (remainder of the number of concurrency and the number of nodes), the amount of tasks required to be performed by the ith target node is n/k (quotient of the number of concurrency and the number of nodes is an integer), and if i < = n% k, the amount of tasks required to be performed by the ith target node is n/k+1. Wherein 1< = i < = k; k. n and i are positive integers. n/k is the quotient of n and k.
606: and generating target node information according to the number of nodes and the task quantity of the concurrent tasks executed by at least one target node respectively.
The control node is used for determining at least one target node from a plurality of transmitting nodes according to the number of the nodes; and controlling at least one target node by utilizing the target test data to initiate a pressure test to the server to be tested according to the respective task quantity.
Optionally, generating the node information of the at least one target node according to the number of nodes and the task amount of the at least one target node to perform concurrent tasks respectively may include: and acquiring task amounts of concurrent tasks respectively executed by at least one target node, acquiring the at least one task amount, and packaging the node amount and the at least one task amount to generate target node information. After receiving the target node information, the control node can acquire the number of nodes and at least one task amount in the target node information, select at least one target node from a plurality of transmitting nodes according to the number of nodes, and sequentially distribute the at least one task amount to the at least one target node so that each target node can acquire the corresponding task amount, and initiate a pressure test to a server to be tested according to the corresponding task amount.
Optionally, the initiating of the pressure test to the server by any target node according to the respective task amounts may specifically be to start a corresponding number of threads or processes according to the task amounts, obtain a plurality of threads or processes, generate at least one service request according to the target test data, so as to send all service requests generated by all threads or processes to the server to be tested simultaneously in a request stream manner.
607: and sending the target node information and the target test data to a control node of the pressure test cluster to instruct the control node to control at least one target node to initiate a pressure test to the server to be tested according to the respective task quantity by utilizing the target test data.
Optionally, the task amount of the concurrent task respectively performed by the at least one target node may also be determined by the control node. After the control node determines at least one target node, the task amount of the at least one target node for executing concurrent tasks respectively can be determined according to the node number and the concurrent number. When at least one target node is determined, the task amount of each target node may be determined according to the task amount determining method described in detail in step 605, so as to achieve accurate allocation of the task amount.
In this embodiment, a concurrent test manner may be used to perform a pressure test on the server to be tested. The concurrency test can be used for continuously increasing the concurrency quantity, realizing accurate test of the server to be tested and controlling multiple concurrency of the nodes. By using the concurrency test mode, quick concurrency can be realized. And the testing efficiency and the testing precision are improved.
In order to accurately test the server to be tested, the server to be tested can be tested in a linear circulation and concurrent test mode. The number of tests per concurrent test may be determined by the number of historical concurrent tests. As one possible implementation manner, in the case of performing the concurrency test on the server to be tested, determining the concurrency number of the concurrency tests includes:
under the condition that the concurrent test is executed on the server to be tested, acquiring the historical concurrent quantity of the previous concurrent test;
and determining the concurrency quantity of the concurrency test according to the historical concurrency quantity and the preset concurrency increment.
The number of concurrency may be a sum of the number of historical concurrency and the concurrency delta.
In this embodiment, in a manner of setting concurrency increment, the concurrency number of the concurrency test is accurately calculated, so as to improve the obtaining efficiency and accuracy of the concurrency number.
Alternatively, the concurrency number may be obtained by multiplying the concurrency number and the single concurrency number.
In practical applications, the maximum number of concurrency may be set. And judging the concurrency condition through the maximum concurrency quantity, executing the concurrency test before the concurrency condition is larger than the maximum concurrency quantity, and stopping executing the concurrency test after the concurrency condition is larger than the maximum concurrency quantity. The number of concurrency greater than the maximum number of concurrency may be less than or equal to the maximum number of concurrency.
As an embodiment, the method further comprises:
obtaining the maximum concurrency quantity set by a user and concurrency increment;
according to the number of nodes and the concurrency number, determining the task quantity of at least one target node for executing the concurrency tasks respectively, wherein the method comprises the following steps:
and under the condition that the concurrency number is not greater than the maximum concurrency number, determining the task quantity of at least one target node for executing the concurrency tasks respectively according to the node number and the concurrency number.
In the embodiment, by accurately monitoring the concurrency quantity, the accurate distribution of the concurrency tasks can be realized, the task distribution accuracy is improved, and invalid distribution is avoided.
As an alternative, the number of nodes and the number of concurrencies are acquired for accuracy. As shown in fig. 7, in the foregoing embodiment, step 502 of obtaining resource usage information corresponding to hardware resources of a plurality of transmitting nodes in the stress test cluster may include:
701: and acquiring resource use information of at least one historical target node when the stress test cluster performs the previous stress test.
The resource usage information may include: throughput per second, usage of the central processor, usage of the memory, and/or the like.
After executing step 701, it may be acquired and executed to determine whether the plurality of transmitting nodes meet the termination condition in the foregoing embodiment, which is specifically described as follows:
702: judging whether the node quantity of at least one historical transmitting node reaches the total node quantity, if so, executing step 703; if not, step 708 is performed.
703: judging whether at least one historical target node reaches the QPS that the throughput per second generated by the combination is smaller than the pressure measurement service requirement, and the utilization rate of the CPU or the memory of all the pressure generating nodes is greater than 85% of all the resources, if so, executing steps 704-705; if not, steps 706-707 are performed.
One embodiment of determining the number of nodes of the originating node involved in the stress test is as follows:
704: and calculating the sum of the number of the historical nodes of at least one historical target node and the node increment to obtain the number of the nodes.
One embodiment of determining the number of concurrency of the concurrency test is as follows:
705: the determination of the number of concurrency involved in the stress test may be a historical number of concurrency of previous concurrency tests.
In the case that the hardware resource of at least one historical target node reaches the use limit, the number of nodes can be increased, and the last pressure measurement task can be re-executed.
Yet another embodiment of determining the number of nodes of the originating node involved in the stress test is as follows:
706: the number of history nodes of the at least one history target node is determined as the number of nodes.
Yet another embodiment of determining the number of concurrency of the concurrency test is as follows:
707: and determining the concurrency quantity of the concurrency test according to the historical concurrency quantity and the preset concurrency increment.
And under the condition that the hardware resource of at least one historical target node does not reach the use limit, the pressure task quantity can be increased, and the pressure generating function of the pressure generating node can be further developed.
708: judging whether at least one historical target node reaches the condition that the throughput per second generated by the historical target node is smaller than the QPS required by the pressure measurement service and the utilization rate of the CPU or the memory of all the pressure generating nodes is greater than 85% of all the resources, if so, executing step 709; if not, step 707 is performed.
709: and stopping the pressure test on the server to be tested, and outputting prompt information of failure of the pressure test.
After the execution of step 707 or step 705 is finished and the number of nodes and the number of concurrent tasks are obtained, other steps in the embodiments of the disclosure may be performed, for example, determining the task amounts of at least one target node to perform the concurrent tasks respectively according to the number of nodes and the number of concurrent tasks. A step of determining whether the number of concurrency is greater than a maximum number of concurrency may also be performed.
In this embodiment, detailed descriptions are made on specific acquisition modes of the number of nodes and the number of concurrency, and other undescribed steps are the same as some of the steps in other embodiments, so that for brevity of description, details are not repeated here.
After initiating the pressure test on the server to be tested, the pressure test result of the server to be tested can be obtained. As shown in fig. 8, a flowchart of a pressure testing method according to a sixth embodiment of the disclosure may include the following steps:
801: and determining target test data for performing pressure test on the server to be tested.
802: and acquiring resource use information corresponding to hardware resources of a plurality of pressure generating nodes in the pressure test cluster.
803: and determining target node information by utilizing the resource use information. The target node information is used for determining at least one target node in the plurality of transmitting nodes.
804: and sending the target node information and the target test data to a control node of the pressure test cluster to instruct the control node to utilize the target test data to control at least one target node to initiate a pressure test to the server to be tested.
805: and acquiring a pressure test result corresponding to the initiation of the pressure test by at least one target node to the server to be tested.
The pressure test result may be processing data of the request stream by the server to be tested, where the pressure test result may include: request success rate, average processing time-consuming and other data.
In this embodiment, after initiating the pressure test to the server to be tested, a pressure test result corresponding to the initiation of the pressure test by the at least one target node to the server to be tested may be obtained. And (3) the pressure test is completed by acquiring the pressure test result of the server to be tested, and an accurate test result is obtained.
And judging whether the server to be tested meets the test termination condition or not by using the pressure test result. At execution step 805: after obtaining the pressure test result corresponding to the pressure test initiated by the at least one target node to the server to be tested, the method may further include:
and under the condition that the server to be tested does not meet the test termination condition, initiating a pressure test on the server to be tested, and returning to acquiring resource use information corresponding to hardware resources of a plurality of pressure generating nodes in the pressure test cluster to continue execution.
In this embodiment, under the condition that the server to be tested does not meet the test termination condition, the pressure mapping can be continuously performed on the server to be tested, so as to obtain a more accurate test result of the server to be tested in a continuous test mode.
As one embodiment, the method further includes, after sending the target node information and the target test data to the control node of the stress test cluster to instruct the control node to control at least one target node to initiate the stress test to the server to be tested by using the target test data:
acquiring a pressure test result corresponding to the initiation of the pressure test by at least one target node to the server to be tested;
judging whether the server to be tested meets the test termination condition according to the pressure test result;
under the condition that the server to be tested does not meet the test termination condition, initiating a pressure test on the server to be tested; and/or stopping initiating the pressure test to the server to be tested and outputting a pressure test result for the user under the condition that the server to be tested meets the test termination condition. In this embodiment, when the pressure test result is obtained, whether the pressure test for the server to be tested is terminated can be determined according to the pressure test result, and when the test termination condition is not satisfied, the server to be tested can continue to initiate the test, and the processing limit of the server to be tested is continuously tested in a cyclic test mode, so that the obtained test result is more accurate than the single test, and the accuracy of the test result is improved.
In one possible design, under the condition that the server to be tested meets the test termination condition, the initiation of the pressure test on the server to be tested is stopped, and a pressure test result is output for the user.
In this embodiment, when the server to be tested satisfies the test termination condition, the pressure test on the user may be stopped. Accurate control of the pressure test is achieved.
In the foregoing embodiment, sending the target node information and the target test data to the control node of the stress test cluster may include:
generating a pressure test instruction according to the target node information and the target test data;
and sending a stress test instruction to a control node of the stress test cluster.
In this embodiment, after the target node information and the target test data are obtained, the target node information and the target test data may be sent to the control node of the pressure test cluster in the form of a pressure test instruction, so that the information transmission efficiency is higher, and an accurate test of the instruction mode is implemented.
In order to describe the technical solution of the present disclosure in detail, as shown in fig. 9, a flowchart of a pressure testing method provided in a seventh embodiment of the present disclosure may include the following steps:
901: and determining target test data for performing pressure test on the server to be tested.
The specific implementation manner of each step in this embodiment is the same as that of the same step in the foregoing embodiment, and for simplicity of description, a detailed description is omitted herein.
902: and acquiring resource use information corresponding to the hardware resources of at least one historical transmitting node in the pressure test cluster.
903: a determination is made as to whether at least one historical originating node has reached the total number of nodes, if so, 904 is performed, and if not, 906 is performed.
904: and determining the node number of the transmitting nodes participating in the pressure test by utilizing the resource use information.
905: the maximum number of concurrency set by the user is obtained, after which 907 is performed.
The target node information is used for the control node to determine at least one target node from a plurality of transmitting nodes according to the number of the nodes.
906: and stopping the pressure test on the server to be tested, and outputting prompt information of failure of the pressure test.
907: and under the condition that the concurrency test is executed on the server to be tested, determining the concurrency quantity of the concurrency test.
908: it is determined whether the number of concurrency is greater than the maximum number of concurrency, if so, step 906 is performed, and if not, step 909 is performed.
909: and determining the task quantity of the at least one target node for executing the concurrent tasks respectively according to the node quantity and the concurrent quantity.
910: and generating target node information according to the number of nodes and the task quantity of the concurrent tasks executed by at least one target node respectively.
The target node information may include the number of nodes and the task amount of at least one target node to perform concurrent tasks, respectively.
911: and sending the target node information and the target test data to a control node of the pressure test cluster to instruct the control node to control at least one target node to initiate a pressure test to the server to be tested according to the respective task quantity by utilizing the target test data.
912: and acquiring a pressure test result corresponding to the initiation of the pressure test by at least one target node to the server to be tested.
913: judging whether the server to be tested meets the test termination condition according to the pressure test result, and if so, returning to the execution step 902; if not, the method comprises the steps of; step 914 is performed.
914: and stopping initiating the pressure test on the server to be tested, and outputting a pressure test result for the user.
In this embodiment, in the pressure testing process, the pressure sending termination condition, the testing mode, the concurrent execution condition and whether the test termination condition of the server to be tested is reached are all determined, so as to implement multi-flow pressure testing, accurately detect the pressure testing process of the server to be tested, and improve the accuracy and effectiveness of the pressure testing.
For easy understanding, fig. 10 illustrates an application scenario of the technical solution of the present disclosure. Referring to fig. 10, an electronic device M2 configured with the stress test method provided by the present disclosure may provide a stress test service to a user. The user may use the pressure test service provided by the electronic device M2 by using the terminal device, taking the terminal device as the mobile phone M1 as an example. After the mobile phone M1 establishes a communication connection with the electronic device M2, the user may initiate a pressure test request using the mobile phone M1. At this time, the user may send information such as stress test information, concurrent test type, and maximum number of concurrent tests to the electronic device M2 in a manner of a stress test request through the mobile phone M1. The electronic device M2 may obtain information such as stress test information, concurrent test type, and maximum number of concurrent tests provided by the user. A communication connection may be established between the electronic device M2 and the stress test cluster M3. The electronic device M2 may determine target test data for performing the stress test, and obtain resource usage information corresponding to hardware resources of the plurality of pressing nodes in the stress test cluster M3. And then determining target node information of at least one target node in the plurality of transmitting nodes by utilizing the resource utilization information. The electronic device M2 may send the target node information and the target test data to the stress test cluster M3. After the pressure test cluster M3 receives the target node information, at least one target node may be determined, and a pressure test is initiated to the server to be tested M4 by using information such as the target test, where at this time, the at least one target node sends a request stream to the server to be tested M4.
In addition, in practical applications, the electronic device M2 may obtain resource usage information of hardware resources of a plurality of transmitting nodes from the monitoring node M5. Specifically, a monitoring node M5 for monitoring the use condition of the hardware resources of the plurality of pressing nodes of the pressure test cluster M3 may be provided. The monitoring node M5 may obtain the usage of the hardware resources of the plurality of transmitting nodes, so as to generate resource usage information, and send the resource usage information to the electronic device M2.
As shown in fig. 11, a flowchart of a pressure testing method according to an eighth embodiment of the disclosure may include the following steps:
1101: and acquiring target node information and target test data.
The target node information is information of at least one target node determined from the plurality of the pressure-generating nodes based on the resource usage information corresponding to the hardware resources of the plurality of the pressure-generating nodes in the pressure test cluster.
The technical solution of the present embodiment may be applied to the control node of the pressure test cluster, and the related descriptions about the steps executed by the control node are described in detail in the foregoing embodiments, which are not repeated herein for the sake of brevity of description.
1102: at least one target node is determined from the plurality of transmitting nodes based on the target node information.
1103: and controlling at least one target node to initiate a pressure test to the server to be tested by using the target test data.
In this embodiment, the control node may acquire the target node information and the target test data. The target node information is based on the corresponding resource use information of the hardware resources of the plurality of the pressure generating nodes in the pressure test cluster. Information of at least one target node determined from a plurality of transmitting nodes. And determining at least one target node from the plurality of transmitting nodes according to the target node information so as to control the at least one target node to perform pressure test on the service end to be tested by utilizing the target test data. The resource use information corresponding to the hardware resources of the plurality of the pressure-generating nodes is monitored, so that the resource use condition of the plurality of the pressure-generating nodes can be known in time, the target node information of at least one target node which can participate in the test can be accurately obtained, the preparation control of the at least one target node which participates in the pressure test is realized, the number of service requests generated by each target node is more accurate, the accurate test result is obtained, and the test efficiency is improved.
As one embodiment, obtaining target node information and target test data includes:
Receiving a pressure test instruction;
and analyzing the pressure test instruction to obtain target node information and target test data.
In this embodiment, after the target node information and the target test data are sent to the control node in the manner of the pressure test instruction, the control node may analyze the pressure test instruction and obtain the target node information and the target test data. The control node can determine the target node information and the target test data through the setting of the pressure test instruction, so that the thorough execution of the test program is ensured, and the stability of the test is improved.
In some embodiments, the target node information includes a number of nodes. Determining at least one target node from the plurality of transmitting nodes according to the target node information may include:
at least one target node is determined from a plurality of originating nodes based on the number of nodes.
In this embodiment, the number of nodes may be included in the target node information, so that the control node may determine at least one target node from a plurality of transmitting nodes according to the node data, so as to achieve accurate acquisition of at least one target node, ensure that all target nodes participating in the pressure test may initiate the test normally, and ensure that the test can be executed effectively.
In one possible design, the target node information may include the number of nodes and the amount of tasks; the controlling at least one target node to initiate a pressure test to the server to be tested by using the target test data may include:
and controlling at least one target node by utilizing the target test data to initiate a pressure test to the server to be tested according to the respective task quantity.
In this embodiment, when the task amount is determined, the workload of each pressure generating node may be determined, so as to implement accurate pressure generation and accurate pressure test.
The controlling at least one target node to initiate the pressure test to the server to be tested by using the target test data may include:
and respectively sending the target test data to at least one target node so that the at least one target node can initiate a pressure test to the server to be tested by using the target test data.
In this embodiment, the target test data are sent to at least one target node respectively, so that each target node can obtain the target test data, ensure effective execution of the pressure test, and realize stable test.
As shown in fig. 12, a schematic structural diagram of an embodiment of a pressure testing apparatus according to a ninth embodiment of the disclosure, where the pressure testing apparatus 1200 for performing pressure testing on a service-side maximum processing flow may include the following steps:
The data determination unit 1201: and the target test data is used for determining the target test data for performing the pressure test on the server to be tested.
Information acquisition unit 1202: and the resource utilization information corresponding to the hardware resources of the plurality of transmitting nodes is acquired.
The node selection unit 1203: for determining target node information using the resource usage information.
The target node information is used for determining at least one target node in the plurality of transmitting nodes.
Test control unit 1204: and the control node is used for sending the target node information and the target test data to the control node of the pressure test cluster so as to instruct the control node to control at least one target node to initiate the pressure test to the server to be tested by utilizing the target test data.
In this embodiment, when determining the target test data for performing the pressure test on the server to be tested, the resource usage information corresponding to the hardware resources of the plurality of pressing nodes may be obtained, and then the target node information of at least one target node is determined by using the resource usage information, so that the target node information and the target test data are sent to the control node of the pressure test cluster. The control node of the stress test cluster determines at least one target node through the node information so as to control the at least one target node to perform stress test on the service end to be tested by utilizing the target test data. The resource use information corresponding to the hardware resources of the plurality of the pressure-generating nodes is monitored, so that the resource use condition of the plurality of the pressure-generating nodes can be known in time, the target node information of at least one target node which can participate in the test can be accurately obtained, the preparation control of the at least one target node which participates in the pressure test is realized, the number of service requests generated by each target node is more accurate, the accurate test result is obtained, and the test efficiency is improved.
As one embodiment, the data determination unit may include:
the request response module is used for responding to a pressure test request initiated by a user aiming at the server to be tested and acquiring pressure test information provided by the user;
and the data determining module is used for determining target test data participating in the pressure test according to the pressure test information.
As one possible implementation, the data determining module includes:
the information analysis sub-module is used for analyzing the pressure test information and acquiring pressure test requirement information and a data storage address provided by a user;
and the data pulling submodule is used for acquiring target test data from the storage space corresponding to the data storage address according to the pressure measurement requirement information.
In one possible design, the data pulling submodule may be specifically configured to:
pulling a plurality of original test data from a storage space corresponding to the data storage address; and selecting target test data from the plurality of original test data according to the pressure test requirement information.
In some embodiments, the node selection unit may include:
the first processing module is used for determining the node number of the pressure generating nodes participating in the pressure test by utilizing the resource use information under the condition that the plurality of pressure generating nodes do not meet the pressure generating termination condition;
The information generation module is used for generating target node information according to the number of the nodes;
the target node information is used for the control node to determine at least one target node from a plurality of transmitting nodes according to the number of the nodes.
As one possible implementation, the node option unit may include:
and the second processing module is used for stopping the pressure test on the server to be tested and outputting prompt information of failure of the pressure test under the condition that the plurality of pressure generating nodes meet the pressure generating termination condition.
In some embodiments, the node selection unit may include:
the quantity acquisition module is used for acquiring the historical node quantity of at least one target node used in the previous pressure test;
the first determining module is used for determining that the plurality of the node sending out nodes do not meet the node sending out termination condition when the number of the historical nodes does not reach the total number of the node sending out nodes;
and the second determining module is used for determining that the plurality of the node sending out nodes meet the node sending out termination condition when the number of the historical nodes reaches the total number of the nodes of the plurality of the node sending out nodes.
In one possible design, the first processing module may include:
the history determining submodule is used for determining node increment needing to be increased by utilizing the resource use information under the condition that a plurality of pressure generating nodes do not meet the pressure generating termination condition;
The node calculation submodule calculates the sum of the number of historical nodes and the increment of the nodes to obtain the number of the nodes.
In order to achieve an accurate test effect, the test types of the pressure test comprise concurrent tests; the apparatus may further include:
the concurrency determining unit is used for determining the concurrency quantity of the concurrency test under the condition that the concurrency test is executed on the server to be tested;
the task allocation unit is used for determining the task quantity of the concurrent tasks executed by at least one target node respectively according to the node quantity and the concurrent quantity;
the information generation module comprises:
the information generation sub-module is used for generating target node information according to the number of nodes and the task amount;
the control node is used for determining at least one target node from a plurality of transmitting nodes according to the number of the nodes; and controlling at least one target node by utilizing the target test data to initiate a pressure test to the server to be tested according to the respective task quantity.
As an embodiment, the concurrency determination unit may include:
the concurrency acquisition module is used for acquiring the historical concurrency quantity of the previous concurrency test under the condition that the concurrency test is executed on the server to be tested;
and the concurrency calculation module is used for determining the concurrency quantity of the concurrency test according to the historical concurrency quantity and the preset concurrency increment.
In some embodiments, it may further include:
the user setting unit is used for obtaining the maximum concurrency quantity and the concurrency increment set by the user;
the task allocation unit may include:
and the task allocation module is used for determining the task quantity of the at least one target node for executing the concurrent tasks respectively according to the node quantity and the concurrency quantity under the condition that the concurrency quantity does not reach the maximum concurrency quantity.
In some embodiments, the resource usage information includes: at least one of throughput per second, central processor usage, memory usage of at least one historical target node at a previous stress test.
As yet another embodiment, the apparatus may further include:
the result acquisition unit is used for acquiring a pressure test result corresponding to the initiation of the pressure test by at least one target node to the server to be tested.
In some embodiments, the apparatus may further comprise:
the test judging unit is used for judging whether the server to be tested meets the test termination condition according to the pressure test result;
the test initiating unit is used for initiating a pressure test on the server to be tested under the condition that the server to be tested does not meet the test termination condition, and jumping to the message obtaining unit to continue execution.
In one possible design, the apparatus may further comprise:
and the test termination unit is used for stopping initiating the pressure test on the server to be tested and outputting a pressure test result for the user under the condition that the server to be tested meets the test termination condition.
As yet another embodiment, wherein the test control unit may include:
the instruction generation module is used for generating a pressure test instruction according to the target node information and the target test data;
the instruction sending module is used for sending the pressure test instruction to the control node of the pressure test cluster.
The pressure-based testing device provided in this embodiment may execute the technical scheme of the method embodiment shown in fig. 1 and the like, and its implementation principle and technical effects are similar to those of the method embodiment shown in fig. 1 and the like, and are not described in detail herein.
As shown in fig. 13, a schematic structural diagram of an embodiment of a pressure testing apparatus according to a tenth embodiment of the disclosure, where the pressure testing apparatus 1300 for testing a service-side maximum processing flow may include the following steps:
the first acquisition unit 1301: the method comprises the steps of acquiring target node information and target test data; the target node information is information of at least one target node determined from a plurality of transmitting nodes based on the corresponding resource use information of hardware resources of the plurality of transmitting nodes in the pressure test cluster;
The node determination unit 1302: the method comprises the steps of determining at least one target node from a plurality of transmitting nodes according to target node information;
test control unit 1303: and the system is used for controlling at least one target node to initiate a pressure test to the server to be tested by using the target test data.
In this embodiment, the control node may acquire the target node information and the target test data. The target node information is based on the corresponding resource use information of the hardware resources of the plurality of the pressure generating nodes in the pressure test cluster. Information of at least one target node determined from a plurality of transmitting nodes. And determining at least one target node from the plurality of transmitting nodes according to the target node information so as to control the at least one target node to perform pressure test on the service end to be tested by utilizing the target test data. The resource use information corresponding to the hardware resources of the plurality of the pressure-generating nodes is monitored, so that the resource use condition of the plurality of the pressure-generating nodes can be known in time, the target node information of at least one target node which can participate in the test can be accurately obtained, the preparation control of the at least one target node which participates in the pressure test is realized, the number of service requests generated by each target node is more accurate, the accurate test result is obtained, and the test efficiency is improved.
As an embodiment, the first acquisition unit may include:
the instruction receiving module is used for receiving the pressure test instruction;
and the instruction analysis module is used for analyzing the pressure test instruction and acquiring target node information and target test data.
In one possible design, the target node information includes the number of nodes; the node determination unit includes:
and the first determining module is used for determining at least one target node from the plurality of transmitting nodes according to the number of the nodes.
In some embodiments, the target node information includes a number of nodes and a task amount; the test control unit includes:
and the pressure test module is used for controlling at least one target node to initiate a pressure test to the server to be tested according to the respective task quantity by utilizing the target test data.
In some embodiments, the test control unit may include:
and the test control unit is used for respectively sending the target test data to at least one target node so that the at least one target node can respectively initiate a pressure test to the server to be tested by utilizing the target test data.
The pressure-based testing device provided in this embodiment may execute the technical scheme of the method embodiment shown in fig. 11, and its implementation principle and technical effects are similar to those of the method embodiment shown in fig. 11, and are not described in detail herein.
In the technical scheme of the disclosure, the acquisition, storage, application and the like of the related user personal information all conform to the regulations of related laws and regulations, and the public sequence is not violated.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
According to an embodiment of the present disclosure, the present disclosure also provides a computer program product comprising: a computer program stored in a readable storage medium, from which at least one processor of an electronic device can read, the at least one processor executing the computer program causing the electronic device to perform the solution provided by any one of the embodiments described above.
Fig. 14 illustrates a schematic block diagram of an electronic device 1400 that may be used to implement any of the embodiments shown in fig. 1-9 or 11 of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 14, the apparatus 1400 includes a computing unit 1401 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 1402 or a computer program loaded from a storage unit 1408 into a Random Access Memory (RAM) 1403. In the RAM 1403, various programs and data required for the operation of the device 1400 can also be stored. The computing unit 1401, the ROM 1402, and the RAM 1403 are connected to each other through a bus 1404. An input/output (I/O) interface 1405 is also connected to the bus 1404.
Various components in device 1400 are connected to I/O interface 1405, including: an input unit 1406 such as a keyboard, a mouse, or the like; an output unit 1407 such as various types of displays, speakers, and the like; a storage unit 1408 such as a magnetic disk, an optical disk, or the like; and a communication unit 1409 such as a network card, a modem, a wireless communication transceiver, and the like. The communication unit 1409 allows the device 1400 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunications networks.
The computing unit 1401 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 1401 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1401 performs the respective methods and processes described above, for example, a pressure test method. For example, in some embodiments, the stress testing method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 1408. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 1400 via the ROM 1402 and/or the communication unit 1409. When a computer program is loaded into RAM 1403 and executed by computing unit 1401, one or more steps of the pressure testing method described above may be performed. Alternatively, in other embodiments, the computing unit 1401 may be configured to perform the pressure testing method by any other suitable means (e.g. by means of firmware).
As shown in fig. 15, which is a schematic structural diagram of a pressure testing system according to an eleventh embodiment of the disclosure, the system 1500 may include:
an electronic device 1501, and a stress test cluster 1502 connected to the electronic device 1501, the stress test cluster 1502 may include a control node 15021 and a plurality of stress nodes 15022; a plurality of transmitting nodes 15022 are connected with the server 1503 to be tested;
the electronic device 1501 is for: determining target test data for performing pressure test on a server to be tested; acquiring resource usage information corresponding to hardware resources of the plurality of pressing nodes 15022 in the pressure test cluster 1502; determining target node information by utilizing the resource use information; transmitting target node information and target test data to control nodes of stress test clusters
The control node 15021 is for: acquiring target node information and target test data sent by electronic equipment 1501; determining at least one target node from the plurality of transmitting nodes 15022 based on the target node information; and controlling at least one target node to initiate a pressure test to the server to be tested by using the target test data.
In this embodiment, when determining the target test data for performing the pressure test on the server to be tested, the resource usage information corresponding to the hardware resources of the plurality of pressing nodes may be obtained, and then the target node information of at least one target node is determined by using the resource usage information, so that the target node information and the target test data are sent to the control node of the pressure test cluster. The control node of the stress test cluster determines at least one target node through the node information so as to control the at least one target node to perform stress test on the service end to be tested by utilizing the target test data. The resource use information corresponding to the hardware resources of the plurality of the pressure-generating nodes is monitored, so that the resource use condition of the plurality of the pressure-generating nodes can be known in time, the target node information of at least one target node which can participate in the test can be accurately obtained, the preparation control of the at least one target node which participates in the pressure test is realized, the number of service requests generated by each target node is more accurate, the accurate test result is obtained, and the test efficiency is improved.
In one possible design, pressure testing system 1500 may further include a monitoring node 1504 connected to pressure testing cluster 1502 and electronic device 1501. The monitoring node 1504 may be configured to monitor resource usage information corresponding to hardware resources of the plurality of pressing nodes 15022 in the stress test cluster 1502, and send the resource usage information to the electronic device 1501.
In addition, other steps performed by the electronic device 1501 or the control node 1502 are already described in detail in the related pressure test method, and are not described herein for brevity.
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service ("Virtual Private Server" or simply "VPS") are overcome. The server may also be a server of a distributed system or a server that incorporates a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel or sequentially or in a different order, provided that the desired results of the technical solutions of the present disclosure are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.
Claims (21)
1. A method of pressure testing, comprising:
determining target test data for performing pressure test on a server to be tested;
acquiring resource use information corresponding to hardware resources of a plurality of pressure generating nodes in a pressure test cluster;
under the condition that the plurality of the pressure generating nodes do not meet the pressure generating termination condition, determining the node number of the pressure generating nodes participating in the pressure test by utilizing the resource use information; when the number of the historical nodes of at least one target node used in the previous pressure test is smaller than the total node number of the plurality of pressure generating nodes, the plurality of pressure generating nodes do not meet the pressure generating termination condition;
generating target node information according to the number of the nodes; the target node information is used for a control node to determine at least one target node from the plurality of transmitting nodes according to the node quantity;
and sending the target node information and the target test data to a control node of the pressure test cluster to instruct the control node to utilize the target test data to control the at least one target node to initiate a pressure test to the server to be tested.
2. The method of claim 1, wherein the determining the target test data for performing the stress test on the server to be tested comprises:
Responding to a pressure test request initiated by a user aiming at the server to be tested, and acquiring pressure test information provided by the user;
and determining the target test data participating in the pressure test according to the pressure test information.
3. The method of claim 2, wherein the determining the target test data for participation in a stress test from the stress test information comprises:
analyzing the pressure test information to obtain pressure test demand information and a data storage address provided by the user;
and acquiring the target test data from the storage space corresponding to the data storage address according to the pressure test requirement information.
4. The method of claim 3, wherein the obtaining the target test data from the data storage address corresponding storage space according to the pressure measurement requirement information includes:
pulling a plurality of original test data from a storage space corresponding to the data storage address;
and selecting the target test data from the plurality of original test data according to the pressure test requirement information.
5. The method of claim 1, further comprising:
and under the condition that the plurality of pressure generating nodes meet the pressure generating termination condition, stopping performing pressure test on the server to be tested.
6. The method of claim 5, further comprising:
acquiring the number of the history nodes;
and when the number of the historical nodes is equal to the total number of the nodes of the plurality of the sending nodes, determining that the plurality of the sending nodes meet the sending termination condition.
7. The method of claim 6, wherein the determining the number of nodes of the nodes participating in the stress test using the resource usage information in the case that the plurality of nodes do not satisfy the stress termination condition comprises:
under the condition that the plurality of the node sending out pressure does not meet the condition of ending sending out pressure, determining the node increment needing to be increased by utilizing the resource use information;
and calculating the sum of the number of the historical nodes and the node increment to obtain the number of the nodes.
8. The method of claim 1, the test type of the stress test comprising concurrent testing; the method further comprises the steps of:
under the condition of executing concurrent test on the server to be tested, determining the concurrent quantity of the concurrent test;
determining the task quantity of the at least one target node for executing concurrent tasks respectively according to the node quantity and the concurrent quantity;
the generating the target node information according to the node number comprises:
Generating target node information according to the number of nodes and the task quantity of the concurrent tasks executed by the at least one target node respectively;
the target node information is used for the control node to determine the at least one target node from the plurality of transmitting nodes according to the node quantity, and control the at least one target node to initiate a pressure test to the server to be tested according to respective task quantity by utilizing the target test data.
9. The method of claim 8, wherein the determining the number of concurrency tests in the case of performing the concurrency tests on the server to be tested includes:
under the condition of executing concurrent test on the server to be tested, acquiring the historical concurrent quantity of the previous concurrent test;
and determining the concurrency quantity of the concurrency test according to the historical concurrency quantity and a preset concurrency increment.
10. The method of claim 8, further comprising:
obtaining the maximum concurrency quantity set by a user and concurrency increment;
and determining the task quantity of the at least one target node for executing concurrent tasks respectively according to the node quantity and the concurrency quantity, wherein the task quantity comprises the following steps:
And under the condition that the concurrency number is not greater than the maximum concurrency number, determining the task quantity of the at least one target node for executing the concurrency tasks respectively according to the node number and the concurrency number.
11. The method of claim 1, the resource usage information comprising: at least one of throughput per second, central processor usage, memory usage of at least one historical target node at a previous stress test.
12. The method according to any one of claims 1-10, further comprising:
acquiring a pressure test result corresponding to the initiation of the pressure test by the at least one target node to the server to be tested;
judging whether the server to be tested meets the test termination condition according to the pressure test result;
under the condition that the server to be tested does not meet the test termination condition, initiating a pressure test on the server to be tested; and/or
And under the condition that the server to be tested meets the test termination condition, stopping initiating the pressure test on the server to be tested, and outputting the pressure test result for a user.
13. A method of pressure testing, comprising:
acquiring target node information and target test data; the target node information is information of at least one target node determined from the plurality of the pressure generating nodes according to the node number after determining the node number of the pressure generating nodes participating in the pressure test based on resource usage information corresponding to hardware resources of the plurality of the pressure generating nodes under the condition that the plurality of the pressure generating nodes in the pressure test cluster do not meet the pressure generating termination condition; when the number of the historical nodes of at least one target node used in the previous pressure test is smaller than the total node number of the plurality of pressure generating nodes, the plurality of pressure generating nodes do not meet the pressure generating termination condition;
Determining the at least one target node from the plurality of transmitting nodes according to the number of nodes in the target node information;
and controlling the at least one target node to initiate a pressure test to the server to be tested by using the target test data.
14. The method of claim 13, wherein the obtaining target node information and target test data comprises:
receiving a pressure test instruction;
and analyzing the pressure test instruction to obtain the target node information and the target test data.
15. The method of claim 14, wherein the target node information further comprises a task volume; the step of using the target test data to control the at least one target node to initiate a pressure test to the server to be tested includes:
and controlling the at least one target node to initiate a pressure test to the server to be tested according to the respective task quantity by utilizing the target test data.
16. The method of claim 14, wherein the controlling the at least one target node to initiate a pressure test to a server to be tested using the target test data comprises:
and respectively sending the target test data to the at least one target node so that the at least one target node can respectively initiate a pressure test to the server to be tested by utilizing the target test data.
17. A pressure testing device, comprising:
the data determining unit is used for determining target test data for performing pressure test on the server to be tested;
the information acquisition unit is used for acquiring resource use information corresponding to the hardware resources of the plurality of transmitting nodes;
the node selection unit is used for determining the node number of the pressure generating nodes participating in the pressure test by utilizing the resource use information under the condition that the plurality of pressure generating nodes do not meet the pressure generating termination condition; when the number of the historical nodes of at least one target node used in the previous pressure test is smaller than the total node number of the plurality of pressure generating nodes, the plurality of pressure generating nodes do not meet the pressure generating termination condition;
generating target node information according to the number of the nodes; the target node information is used for a control node to determine at least one target node from the plurality of transmitting nodes according to the node quantity;
and the test control unit is used for sending the target node information and the target test data to the control nodes of the pressure test cluster so as to instruct the control nodes to control the at least one target node to initiate the pressure test to the server to be tested by utilizing the target test data.
18. A pressure testing device comprises
The first acquisition unit is used for acquiring target node information and target test data; the target node information is information of at least one target node determined from a plurality of transmitting nodes according to the node number after determining the node number of the transmitting nodes participating in the pressure test based on the hardware resource corresponding resource usage information of the plurality of transmitting nodes under the condition that the plurality of transmitting nodes in the pressure test cluster do not meet the transmitting termination condition; when the number of the historical nodes of at least one target node used in the previous pressure test is smaller than the total node number of the plurality of pressure generating nodes, the plurality of pressure generating nodes do not meet the pressure generating termination condition;
a node determining unit, configured to determine the at least one target node from the plurality of transmitting nodes according to the number of nodes in the target node information;
and the test control unit is used for controlling the at least one target node to initiate a pressure test to the server to be tested by utilizing the target test data.
19. A pressure testing system, comprising: the system comprises electronic equipment and a pressure test cluster connected with the electronic equipment, wherein the pressure test cluster comprises a control node and a plurality of pressure generating nodes; the plurality of pressure generating nodes are connected with the server to be tested;
The electronic device is used for: determining target test data for performing pressure test on a server to be tested; acquiring resource use information corresponding to hardware resources of a plurality of pressure generating nodes in a pressure test cluster; under the condition that the plurality of the pressure generating nodes do not meet the pressure generating termination condition, determining the node number of the pressure generating nodes participating in the pressure test by utilizing the resource use information; generating target node information according to the number of the nodes; transmitting the target node information and the target test data to a control node of the pressure test cluster; when the number of the historical nodes of at least one target node used in the previous pressure test is smaller than the total node number of the plurality of pressure generating nodes, the plurality of pressure generating nodes do not meet the pressure generating termination condition;
the control node is configured to: acquiring the target node information and target test data sent by the electronic equipment; determining at least one target node from the plurality of transmitting nodes according to the number of nodes in the target node information; and controlling the at least one target node to initiate a pressure test to the server to be tested by utilizing the target test data.
20. An electronic device, comprising:
at least one processor and a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-12 or 13-16.
21. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-12 or 13-16.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110897953.2A CN113590403B (en) | 2021-08-05 | 2021-08-05 | Pressure testing method, device, system, electronic equipment, storage medium and product |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110897953.2A CN113590403B (en) | 2021-08-05 | 2021-08-05 | Pressure testing method, device, system, electronic equipment, storage medium and product |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113590403A CN113590403A (en) | 2021-11-02 |
CN113590403B true CN113590403B (en) | 2023-08-01 |
Family
ID=78255555
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110897953.2A Active CN113590403B (en) | 2021-08-05 | 2021-08-05 | Pressure testing method, device, system, electronic equipment, storage medium and product |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113590403B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114116339B (en) * | 2021-11-12 | 2023-11-03 | 苏州浪潮智能科技有限公司 | Pressure testing method, system, terminal and storage medium based on STREAM |
CN114328196A (en) * | 2021-12-16 | 2022-04-12 | 北京明朝万达科技股份有限公司 | Method, device and equipment for testing data leakage prevention system and storage medium |
CN114338472B (en) * | 2021-12-31 | 2024-05-07 | 北京百度网讯科技有限公司 | Capacity testing method, device, equipment, medium and product of map server |
CN114924919B (en) * | 2022-04-15 | 2023-01-24 | 北京志凌海纳科技有限公司 | Node management test method, system and storage medium |
CN117194131B (en) * | 2023-11-06 | 2024-02-27 | 腾讯科技(深圳)有限公司 | Data processing method, apparatus, device, readable storage medium, and program product |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104077212A (en) * | 2013-03-26 | 2014-10-01 | 阿里巴巴集团控股有限公司 | Pressure test system and method |
WO2017016212A1 (en) * | 2015-07-30 | 2017-02-02 | 中兴通讯股份有限公司 | Testing method and device for desktop cloud system |
WO2018082451A1 (en) * | 2016-11-01 | 2018-05-11 | 阿里巴巴集团控股有限公司 | Application link expansion method, apparatus and system |
CN109542712A (en) * | 2018-11-02 | 2019-03-29 | 平安科技(深圳)有限公司 | Server stress test method, device, computer equipment and storage medium |
CN110297766A (en) * | 2019-06-03 | 2019-10-01 | 合肥移瑞通信技术有限公司 | Method for testing software and software testing system based on distributed test node cluster |
CN110580206A (en) * | 2019-09-16 | 2019-12-17 | 上海保险交易所股份有限公司 | Method, medium and control device for pressure testing of a blockchain system |
CN110727570A (en) * | 2019-10-11 | 2020-01-24 | 重庆紫光华山智安科技有限公司 | Concurrent pressure measurement method and related device |
CN112765035A (en) * | 2021-01-27 | 2021-05-07 | 北京百家科技集团有限公司 | Distributed pressure test system, method, device, electronic equipment and storage medium |
CN113010392A (en) * | 2021-02-08 | 2021-06-22 | 建信金融科技有限责任公司 | Testing method, device, equipment, storage medium and system for big data platform |
CN113037594A (en) * | 2021-03-24 | 2021-06-25 | 北京百度网讯科技有限公司 | Pressure testing method and device based on cloud service |
-
2021
- 2021-08-05 CN CN202110897953.2A patent/CN113590403B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104077212A (en) * | 2013-03-26 | 2014-10-01 | 阿里巴巴集团控股有限公司 | Pressure test system and method |
WO2017016212A1 (en) * | 2015-07-30 | 2017-02-02 | 中兴通讯股份有限公司 | Testing method and device for desktop cloud system |
WO2018082451A1 (en) * | 2016-11-01 | 2018-05-11 | 阿里巴巴集团控股有限公司 | Application link expansion method, apparatus and system |
CN109542712A (en) * | 2018-11-02 | 2019-03-29 | 平安科技(深圳)有限公司 | Server stress test method, device, computer equipment and storage medium |
CN110297766A (en) * | 2019-06-03 | 2019-10-01 | 合肥移瑞通信技术有限公司 | Method for testing software and software testing system based on distributed test node cluster |
CN110580206A (en) * | 2019-09-16 | 2019-12-17 | 上海保险交易所股份有限公司 | Method, medium and control device for pressure testing of a blockchain system |
CN110727570A (en) * | 2019-10-11 | 2020-01-24 | 重庆紫光华山智安科技有限公司 | Concurrent pressure measurement method and related device |
CN112765035A (en) * | 2021-01-27 | 2021-05-07 | 北京百家科技集团有限公司 | Distributed pressure test system, method, device, electronic equipment and storage medium |
CN113010392A (en) * | 2021-02-08 | 2021-06-22 | 建信金融科技有限责任公司 | Testing method, device, equipment, storage medium and system for big data platform |
CN113037594A (en) * | 2021-03-24 | 2021-06-25 | 北京百度网讯科技有限公司 | Pressure testing method and device based on cloud service |
Non-Patent Citations (2)
Title |
---|
城轨云平台及其承载业务***测试研究;孟伟君;陈瑞军;刘占英;朝鲁;刘楠;;交通世界(第25期);全文 * |
大规模负载生成客户端影响因素研究;晋文明;颜硕彦;钱巨;;计算机与现代化(第08期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN113590403A (en) | 2021-11-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113590403B (en) | Pressure testing method, device, system, electronic equipment, storage medium and product | |
CN109684228A (en) | A kind of performance test methods, device, system and storage medium | |
CN114500339B (en) | Node bandwidth monitoring method and device, electronic equipment and storage medium | |
CN111563014A (en) | Interface service performance test method, device, equipment and storage medium | |
CN112261120A (en) | Cloud-side cooperative task unloading method and device for power distribution internet of things | |
CN109144846B (en) | Test method and device for testing server | |
US9565060B2 (en) | Managing a network connection for use by a plurality of application program processes | |
CN105471674A (en) | Method and system for testing performance of server | |
CN117009283A (en) | Multi-core multi-chip data processing method, device, chip and storage medium | |
CN106961490A (en) | A kind of resource monitoring method and system, a kind of home server | |
WO2022262253A1 (en) | Task allocation method and apparatus, electronic device, and computer readable medium | |
CN116126719A (en) | Interface testing method and device, electronic equipment and storage medium | |
CN109842665B (en) | Task processing method and device for task allocation server | |
CN115576791A (en) | Dynamic adjustment method and device for pressure measurement thread, electronic equipment and storage medium | |
CN113641688A (en) | Node updating method, related device and computer program product | |
CN113535020A (en) | Method, apparatus, device, medium and product for generating application icons | |
CN114598705B (en) | Message load balancing method, device, equipment and medium | |
CN113220555B (en) | Method, apparatus, device, medium, and article for processing data | |
CN113411390B (en) | Scheduling method and device of content distribution network and electronic equipment | |
CN114546852B (en) | Performance test method and device, electronic equipment and storage medium | |
CN113225228B (en) | Data processing method and device | |
EP4167096A1 (en) | Task allocation method and apparatus, electronic device, and computer readable medium | |
CN115543188A (en) | Performance test method, device, equipment and storage medium | |
CN117234736A (en) | Instruction processing method, device, equipment and medium | |
CN118301278A (en) | Video conference quality adjusting method, device, equipment, medium and product |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |