CN113742217B - Performance test method, device and storage medium - Google Patents
Performance test method, device and storage medium Download PDFInfo
- Publication number
- CN113742217B CN113742217B CN202110888363.3A CN202110888363A CN113742217B CN 113742217 B CN113742217 B CN 113742217B CN 202110888363 A CN202110888363 A CN 202110888363A CN 113742217 B CN113742217 B CN 113742217B
- Authority
- CN
- China
- Prior art keywords
- node
- address
- access node
- pressing
- target
- 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
- 238000011056 performance test Methods 0.000 title claims abstract description 76
- 238000000034 method Methods 0.000 title claims abstract description 42
- 238000012360 testing method Methods 0.000 claims abstract description 84
- 238000009530 blood pressure measurement Methods 0.000 claims abstract description 51
- 230000005540 biological transmission Effects 0.000 claims abstract description 10
- 238000013507 mapping Methods 0.000 claims description 14
- 230000004044 response Effects 0.000 claims description 9
- 238000004590 computer program Methods 0.000 claims description 4
- 239000002699 waste material Substances 0.000 abstract description 3
- 230000009286 beneficial effect Effects 0.000 description 8
- 238000010586 diagram Methods 0.000 description 8
- 238000012423 maintenance Methods 0.000 description 7
- 238000004891 communication Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 5
- 238000012545 processing Methods 0.000 description 5
- 238000013461 design Methods 0.000 description 4
- 238000005259 measurement Methods 0.000 description 3
- 230000006978 adaptation Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 230000003139 buffering effect Effects 0.000 description 1
- 239000013078 crystal Substances 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012546 transfer Methods 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/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/50—Testing arrangements
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Debugging And Monitoring (AREA)
Abstract
The disclosure relates to a performance test method, performance test equipment and a storage medium, and relates to the technical field of pressure measurement. The embodiment of the disclosure at least solves the problem of transmission resource waste in performance test in the related art. The method comprises the following steps: acquiring an initial address of a program to be tested and an identifier of at least one access node corresponding to the program to be tested; the initial address comprises a host address of a program to be tested; at least one access node corresponds to a host address; determining a target access node from at least one access node, and generating a target address; the target address comprises an identifier of a target access node, and is used for indicating that the performance test of the program to be tested is requested through the target access node; generating a pressure measurement request based on the target address and the host address, and sending the pressure measurement request to the target access node; the pressure test request comprises a target address and a host address, and is used for requesting performance test of the program to be tested.
Description
Technical Field
The disclosure relates to the technical field of pressure measurement, and in particular relates to a performance test method, performance test equipment and a storage medium.
Background
Currently, when an operation and maintenance person performs performance test on a program to be tested, in order to relieve the operation pressure of the program to be tested, an access layer program is generally set between a pressing program and the program to be tested, so as to realize the function of load balancing. Specifically, a server where a pressing program is located responds to a pressing measurement start operation of an operation and maintenance person, a uniform resource locator (uniform resource locator, URL) of the program to be tested is obtained, a pressing measurement request comprising the URL is generated, and the pressing measurement request is sent to the server where an access layer program is located through a gateway. Correspondingly, after receiving the pressure measurement request, the gateway acquires the domain name of the server of the program to be tested from the URL of the pressure measurement request, and forwards the pressure measurement request to the server of the access layer program according to the domain name.
In the actual application process, the server where the pressing program is located and the server of the program to be tested are usually disposed in the same intranet, so that in the forwarding process of the pressing request, the pressing request can go from the intranet to the external network through the gateway, and then go back to the intranet from the external network through the gateway, which results in waste of transmission resources.
Disclosure of Invention
The disclosure provides a performance test method, a device and a storage medium, so as to at least solve the problem of transmission resource waste in performance test in the related art. The technical scheme of the present disclosure is as follows:
according to a first aspect of embodiments of the present disclosure, there is provided a performance test method, including: acquiring an initial address of a program to be tested and an identifier of at least one access node corresponding to the program to be tested; the initial address comprises a host address of a program to be tested; at least one access node corresponds to a host address; determining a target access node from at least one access node, and generating a target address; the target address comprises an identifier of a target access node, and is used for indicating that the performance test of the program to be tested is requested through the target access node; generating a pressure measurement request based on the target address and the host address, and sending the pressure measurement request to the target access node; the pressure test request comprises a target address and a host address, and is used for requesting performance test of the program to be tested.
Optionally, the "generating a target address" includes: the host address in the initial address is replaced with the identity of the target access node.
Optionally, the initial address further includes test content of the performance test and a path of the test content; the "generating a target address" includes: and generating a target address based on the identification of the target access node, the test content and the path of the test content.
Optionally, the target address is located in a request line of the pressure measurement request, and the host address is located in a request header of the pressure measurement request.
Optionally, the Host address is a value of a target key value pair in the request header, and a key of the target key value pair is a Host.
Optionally, the identification of the target access node includes a device identification of the target access node or a physical address of the target access node.
Optionally, the "obtaining the initial address of the program to be tested and the identifier of the at least one access node corresponding to the program to be tested" includes: receiving a pressurizing instruction sent by a pressurizing main control node, and acquiring an initial address and an identifier of at least one access node from the pressurizing instruction; the pressing instruction is generated by the pressing main control node in response to the test starting operation of the program to be tested, and is used for indicating the pressing node to perform performance test on the program to be tested through at least one access node.
Optionally, the identifier of the at least one access node is obtained from the access master control node by the pressing master control node according to the host address; the pressure main control node stores a mapping relation between a host address and an identifier of at least one access node.
According to a second aspect of embodiments of the present disclosure, there is provided a pressing node including an acquisition unit, a determination unit, a generation unit, and a transmission unit; the acquisition unit is used for acquiring an initial address of a program to be tested and an identifier of at least one access node corresponding to the program to be tested; the initial address comprises a host address of a program to be tested; at least one access node corresponds to a host address; a determining unit configured to determine a target access node from at least one access node; a generation unit configured to generate a target address; the target address comprises an identifier of a target access node, and is used for indicating that the performance test of the program to be tested is requested through the target access node; the generating unit is also used for generating a pressure measurement request based on the target address and the host address; the pressure test request comprises a target address and a host address, and is used for requesting performance test of the program to be tested; and the sending unit is used for sending the pressure measurement request generated by the generating unit to the target access node.
Optionally, the generating unit is specifically configured to: the host address in the initial address is replaced with the identity of the target access node.
Optionally, the initial address further includes test content of the performance test and a path of the test content; the generating unit is specifically configured to: and generating a target address based on the identification of the target access node, the test content and the path of the test content.
Optionally, the target address is located in a request line of the pressure measurement request, and the host address is located in a request header of the pressure measurement request.
Optionally, the Host address is a value of a target key value pair in the request header, and a key of the target key value pair is a Host.
Optionally, the identification of the target access node includes a device identification of the target access node or a physical address of the target access node.
Optionally, the acquiring unit is specifically configured to: receiving a pressurizing instruction sent by a pressurizing main control node, and acquiring an initial address and an identifier of at least one access node from the pressurizing instruction; the pressing instruction is generated by the pressing main control node in response to the test starting operation of the program to be tested, and is used for indicating the pressing node to perform performance test on the program to be tested through at least one access node.
Optionally, the identifier of the at least one access node is obtained from the access master control node by the pressing master control node according to the host address; the pressure main control node stores a mapping relation between a host address and an identifier of at least one access node.
According to a third aspect of embodiments of the present disclosure, there is provided a performance testing system including at least one pressing node, at least one access node, at least one pressed node, a pressing master node, and an access master node; the access master control node is used for managing at least one access node, and comprises a mapping relation between a host address and an identifier of the access node; the host address is used for identifying the program to be tested; the pressing main control node is used for managing at least one pressing node, generating a pressing instruction and sending the pressing instruction to the at least one pressing node; the pressing instruction is generated by the pressing main control node in response to the test starting operation of the program to be tested, and is used for indicating at least one pressing node to perform performance test on the program to be tested through at least one access node. Each of the at least one stressing node comprises a stressing program and each stressing node is adapted to perform the performance test method as provided in the first aspect; each of the at least one access node includes an access stratum procedure; each access node is configured to send a pressure measurement request as provided in the first aspect to a pressed node through an access layer procedure; each pressed node in the at least one pressed node comprises a program to be tested, and each pressed node is used for performing performance test on the program to be tested after receiving the pressing test request.
According to a fourth aspect of embodiments of the present disclosure, there is provided a pressing node comprising: a processor, a memory for storing instructions executable by the processor; wherein the processor is configured to execute instructions to implement the performance testing method as provided in the first aspect.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer readable storage medium, which when executed by a processor of a pressing node, causes the pressing node to perform the performance test method as provided in the first aspect.
According to a sixth aspect of embodiments of the present disclosure, there is provided a computer program product comprising computer instructions which, when run on a pressing node, cause the pressing node to perform the performance test method as provided in the first aspect.
The technical scheme provided by the disclosure at least brings the following beneficial effects: after acquiring the initial address, the booster node determines a target access node and generates a target address including an identification of the target access node. Further, the pressing node generates a pressing request according to the target address and the host address, and sends the pressing request to the target access node. Because the pressure test request comprises the target address and the host address, the gateway can directly forward the pressure test request to the target access node according to the identification of the target access node in the target address and the host address of the program to be tested when forwarding the pressure test request, thereby avoiding forwarding through an external network and saving transmission resources in performance test.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure and do not constitute an undue limitation on the disclosure.
FIG. 1 is a schematic diagram of a multi-performance test system, according to an exemplary embodiment;
FIG. 2 is one of the flow diagrams of a performance testing method shown in accordance with an exemplary embodiment;
FIG. 3 is a second flow chart diagram illustrating a performance test method according to an exemplary embodiment;
FIG. 4 is a third flow chart diagram illustrating a performance test method according to an exemplary embodiment;
FIG. 5 is a diagram illustrating a data structure of a pressure measurement request, according to an example embodiment;
FIG. 6 is one of the schematic structural diagrams of a pressing node shown according to an exemplary embodiment;
fig. 7 is a second schematic diagram of a pressing node structure according to an exemplary embodiment.
Detailed Description
In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the foregoing figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the disclosure described herein may be capable of operation in sequences other than those illustrated or described herein. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
In addition, in the description of the embodiments of the present disclosure, "/" means or, unless otherwise indicated, for example, a/B may mean a or B. "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone. In addition, in the description of the embodiments of the present disclosure, "a plurality" means two or more than two.
The performance test method provided by the embodiment of the disclosure can be applied to a performance test system. Fig. 1 shows a schematic diagram of a structure of the performance test system. As shown in fig. 1, the performance test system 10 is configured to perform a stress test on a program to be tested, where the performance test system 10 includes at least one stress node (fig. 1 illustrates a stress node 111 and a stress node 112, in which more or fewer stress nodes may be present in practical applications, and the embodiment of the present disclosure is not limited thereto), a gateway 12, at least one access node (fig. 1 illustrates an access node 131 and an access node 132, in which more or fewer access nodes may be present in practical applications, and the embodiment of the present disclosure is not limited thereto), at least one pressed node (fig. 1 illustrates a pressed node 141 and a pressed node 142, in which more or fewer pressed nodes may be present in practical applications, and the embodiment of the present disclosure is not limited thereto), a stress master node 15, and an access master node 16.
Wherein at least one pressing node is connected with the gateway 12 and the pressing master node 15, respectively. At least one access node is connected to gateway 12, at least one pressed node, and access master node 16, respectively, and one access node is connected to one pressed node. The pressing master node 15 is connected with the access master node 16. The nodes may be connected in a wired manner or may be connected in a wireless manner, which is not limited in the embodiments of the present disclosure.
The pressing node comprises a pressing program and is used for generating a pressing request through the pressing program and sending the pressing request to any one access node through the gateway.
The access node comprises an access layer program, and is used for caching or buffering the pressure measurement request after receiving the pressure measurement request sent by the pressure application program through the gateway through the access layer program, and sending the pressure measurement request to the pressed node connected with the pressure measurement request.
The pressed node comprises a program to be pressed, and is used for performing performance test on the program to be tested in the pressed node through the pressed program and returning a test result.
The pressing master control node is used for managing the at least one pressing node, for example, sending a pressing instruction to the at least one pressing node. The pressure application master control node is further configured to perform data interaction with the access master control node, for example, obtain an identifier of at least one access node from the access master control node.
The access master node is configured to manage the at least one access node. The access master control node also has a storage function, and is further used for storing the identification of at least one access node and the mapping relation between the identification of each access node and the host address of the program to be tested.
The above-mentioned various nodes according to the embodiments of the present disclosure may be a single server, a server cluster including a plurality of servers, or a cloud computing service center.
The performance test method provided by the embodiment of the present disclosure is described below with reference to the accompanying drawings, and the performance test method related to the embodiment of the present disclosure may be applied to the performance test system described above.
As shown in fig. 2, the performance test method provided by the embodiment of the present disclosure includes the following S201 to S205.
S201, the pressing node acquires an initial address of a program to be tested and an identifier of at least one access node corresponding to the program to be tested.
The initial address includes a host address of a program to be tested. At least one access node corresponds to a host address.
As a possible implementation manner, the pressing node may receive a pressing instruction sent by the pressing main control node, and obtain an initial address of the program to be tested and an identifier of at least one access node corresponding to the program to be tested from the pressing instruction.
It should be noted that the pressing instruction is an instruction generated by the pressing master control node in response to the test start operation after receiving the test start operation of the program to be tested by the operation and maintenance personnel. The pressing instruction is used for indicating the pressing node to perform performance test on the program to be tested through the at least one access node.
In the embodiment of the present disclosure, the initial address may be a URL, and the host address of the program to be tested included in the initial address may be a domain name where at least one pressed node where the program to be tested is located. The initial address may also include a path where the program to be tested is located and test content corresponding to the pressure test request. The at least one access node may be an identification of the access node to which the at least one pressed node is connected, respectively, and which includes the access layer procedure. The identifier of the access node may be a node name of the access node or an address of the access node.
Illustratively, the initial address may be represented in the form: https:// aaa.com/rest/n/com/listphotoId = 123. The aaa.com in the initial address is used to represent the domain name, i.e. the host address, of at least one pressed node where the procedure to be tested is located. Rest/n in the initial address is the path where the program to be tested is located. The comment/listphotoId =123 in the initial address is the test content corresponding to the push test request.
The technical scheme provided by the disclosure at least brings the following beneficial effects: the pressing master control node sends the initial address of the program to be tested and the identifier of at least one access node corresponding to the program to be tested to the pressing node in the form of a pressing instruction, namely, an implementation mode that the pressing node can acquire the initial address and the identifier of the at least one access node is provided, and meanwhile, a basis can be provided for the subsequent generation of the pressing request by the pressing node.
S202, the pressurizing node determines a target access node from at least one access node.
As a possible implementation, the pressing node may determine the target access node from the at least one access node using a preset selection algorithm.
It should be noted that, the foregoing preset selection algorithm may be determined in advance by an operation and maintenance personnel in the pressing node, and the target access node to be selected may be any one of at least one access node.
S203, the pressurizing node generates a target address.
The target address includes an identifier of the target access node, and is used for indicating that the performance test is requested to be performed on the program to be tested through the target access node.
In one design, as shown in fig. 3, S203 provided in the embodiment of the present disclosure may specifically include the following S2031:
s2031, the pressing node replaces the host address in the initial address with the identity of the target access node.
Illustratively, taking the identification of the target access node as bbb.com as an example, the pressing node replaces aaa.com in the initial address with bbb.com, and the final target address is https:// bbb.com/rest/n/com/listphotoId =123.
Under such circumstances, the above technical solution provided by the present disclosure brings at least the following beneficial effects: the host address in the initial address is replaced by the identification of the target access node, so that the target address is generated simply and conveniently, and an implementation mode for generating the target address is provided.
In one design, the initial address referred to by the embodiments of the present disclosure also includes the test content of the performance test and the path of the test content. Therefore, as shown in fig. 4, S203 provided by the embodiment of the present disclosure may further include the following S2032:
S2032, the pressing node generates a target address based on the identification of the target access node, the test content, and the path of the test content.
In this case, the target address includes the identity of the target access node, the test content, and the path of the test content.
It can be appreciated that the above technical scheme provided by the present disclosure at least brings the following beneficial effects: the target address generated based on the identification of the target access node, the test content and the path of the test content comprises the identification of the target access node, the test content and the path of the test content, so that the generated target result can be ensured to be accurate, and another implementation mode for generating the target address is provided.
S204, the pressing node generates a pressing request based on the target address and the host address.
The press test request comprises a target address and an initial address, and is used for indicating a target access node and a pressed node connected with the target access node to start performance test of a program to be tested. The target address is located in the request line of the pressure measurement request and the host address is located in the request header of the pressure measurement request.
As one possible implementation, the pressing node sets the target address in the request row of the press-test request, and sets the host address in the request header of the press-test request to generate the press-test request.
Illustratively, the pressure measurement request referred to in the embodiments of the present disclosure may be an HTTP request. The pressure test request is used for requesting the pressed node to perform performance test on the program to be tested in the pressed node.
It can be appreciated that the above technical scheme provided by the present disclosure at least brings the following beneficial effects: the target address is set in the request row of the pressure measurement request, and the host address is set in the request head of the pressure measurement request, so that the validity of the pressure measurement request can be ensured, and meanwhile, the follow-up gateway can be ensured to directly forward the pressure measurement request to the target access node in the intranet.
S205, the pressing node sends a pressure measurement request to the target access node.
As a possible implementation manner, after the pressing node generates the pressing request, the pressing node sends the pressing request to the target access node through the gateway, so that the gateway directly forwards the pressing request to the target access node according to the target address and the host address in the pressing request after receiving the pressing request.
The technical scheme provided by the disclosure at least brings the following beneficial effects: after acquiring the initial address, the booster node determines a target access node and generates a target address including an identification of the target access node. Further, the pressing node generates a pressing request according to the target address and the host address, and sends the pressing request to the target access node. Because the pressure test request comprises the target address and the host address, the gateway can directly forward the pressure test request to the target access node according to the identification of the target access node in the target address and the host address of the program to be tested when forwarding the pressure test request, thereby avoiding forwarding through an external network and saving transmission resources in performance test.
In one design, in order to set the target address in the request header of the pressure measurement request, the request header of the pressure measurement request provided in the embodiment of the present disclosure includes a plurality of key value pairs, the Host address is a value of a target key value pair in the plurality of key value pairs of the request header, and a key of the target key value pair is a Host.
The target key value pair is any one key value pair of a plurality of key value pairs of a request head of the pressure measurement request.
The target key value pair in the request header of the pressure measurement request may be a newly added key value pair in the request header, or may be obtained by setting a spare key value pair in the request header.
By way of example, fig. 5 shows a data format of a pressure measurement request. As shown in fig. 5, the pressure measurement request includes a request line, a request header, and a request body. The target address is located in a request row of the pressure measurement request, a key of the target key value pair is HOST, and a value of the target key value pair is HOST address in a request header of the pressure measurement request.
The request body, the request method, the space, the carriage return symbol and the line feed symbol shown in fig. 5 may refer to the definition of the HTTP request in the prior art, and will not be described herein.
The technical scheme provided by the disclosure at least brings the following beneficial effects: the key value pairs in the request header of the pressure measurement request can be set based on the data format of the pressure measurement request, so that the domain name of the pressed node of the program to be tested can be determined according to the content of the target key value pair in the request header after the subsequent gateway receives the pressure measurement request, and the accuracy of forwarding the pressure measurement request by the gateway is ensured.
In one design, since the pressing node may obtain the initial address of the program to be tested and the identifier of at least one access node corresponding to the target address from the pressing command sent by the pressing master node, the performance test method provided in the embodiment of the present disclosure may also be applied to the pressing master node in order to ensure that the pressing master node can generate the pressing command. The performance test method provided by the embodiment of the disclosure further includes the following steps S301 to S305.
S301, the pressing main control node responds to the test starting operation to acquire an initial address of a program to be tested.
The test starting operation is used for indicating the pressing master control node to start controlling at least one pressing node managed by the pressing master control node to start performance test on the program to be tested.
As a possible implementation manner, the pressing main control node responds to the test start operation of the operation and maintenance personnel to acquire the initial address of the program to be tested.
It should be noted that, the initial address of the program to be tested may be input by the operation and maintenance personnel in the pressing master control node before the operation of clicking the test start.
The initial address input by the operation and maintenance personnel comprises the host address of at least one pressed node of the program to be tested, the test content of the program to be tested and the path of the test content.
S302, the pressing main control node acquires a host address of the program to be tested from the initial address.
As a possible implementation manner, the pressing master control node analyzes the initial address to obtain the host address of the program to be tested from the initial address.
S303, the pressing main control node obtains the identification of at least one access node corresponding to the host address currently from the access main control node based on the host address.
Wherein, the mapping relation between the host address and the identification of at least one access node is stored in the pressure main control node.
It will be appreciated that the identity of the at least one access node is obtained by the pressing master node from the access master node based on the host address.
As a possible implementation manner, the pressing master node generates an identification request according to the host address, and sends the identification request to the access master node.
Wherein the identification request comprises a host address, the identification request being for requesting acquisition of an identification of at least one access node corresponding to the host address.
Correspondingly, after receiving the identification request, the access master control node responds to the identification request and analyzes the identification request to acquire a host address in the identification request. Further, the access master control node queries the identification of at least one access node currently corresponding to the host address from the memory thereof according to the host address.
It should be noted that, the pressing master control node stores mapping relations between different host addresses and identifiers of different access nodes. The access master control node can periodically or aperiodically acquire the corresponding relation between all the access nodes managed by the access master control node and the host address, and store the acquired corresponding relation into a memory of the access master control node.
Illustratively, the memory of the access master node stores a list of mappings. The list of mappings includes mappings between different host addresses and identities of different access nodes.
Further, the access master node transmits the identity of the at least one access node to the pressure master node after determining the identity of the at least one access node.
Correspondingly, the pressing master control node receives the identification of at least one access node corresponding to the host address, which is sent by the access master control node.
And S304, the pressing main control node generates a pressing instruction based on the initial address and the identification of at least one access node.
Wherein the pressing instruction comprises the initial address and an identifier of at least one access node. The pressing instruction is used for instructing any pressing node to start performance test.
As a possible implementation manner, after acquiring the identifier of at least one access node, the pressing master node generates a pressing instruction according to the initial address and the identifier of the at least one access node.
And S305, the pressing master control node sends a pressing instruction to at least one pressing node.
As a possible implementation manner, the pressing master node sends a pressing instruction to at least one pressing node, so that the at least one pressing node can start to execute the performance test method.
The technical scheme provided by the disclosure at least brings the following beneficial effects: through the data interaction between the pressing main control node and the access main control node, and the pressing instruction is sent to the pressing node, the pressing node can acquire the identifier of at least one access node corresponding to the host address currently, and meanwhile, when the equipment topology and the function setting in the performance test system are changed, the pressing node can acquire the identifier of the access node corresponding to the host address currently, so that the real-time performance of the generated pressing instruction can be ensured.
In addition, the present disclosure further provides a pressing node for executing the performance test method performed by the pressing node provided in the embodiment of the present disclosure, and referring to fig. 6, the pressing node 40 includes an acquisition unit 401, a determination unit 402, a generation unit 403, and a transmission unit 404.
The obtaining unit 401 is configured to obtain an initial address of a program to be tested and an identifier of at least one access node corresponding to the program to be tested. The initial address includes the host address of the program to be tested. At least one access node corresponds to a host address. For example, in connection with fig. 2, the acquisition unit 401 may be used to perform S201.
A determining unit 402, configured to determine a target access node from at least one access node. For example, in connection with fig. 2, the determining unit 402 may be used to perform S202.
A generating unit 403 for generating a target address. The target address includes an identification of the target access node, and the target address is used for indicating that performance testing of the program to be tested is requested by the target access node. For example, in connection with fig. 2, the generation unit 403 may be used to perform S203.
The generating unit 403 is further configured to generate a pressure measurement request based on the target address and the host address. The pressure test request comprises a target address and a host address, and is used for requesting performance test of the program to be tested. For example, in connection with fig. 2, the generation unit 403 may be used to perform S204.
A sending unit 404, configured to send the pressure measurement request generated by the generating unit 403 to the target access node. For example, in connection with fig. 2, the transmission unit 404 may be used to perform S205.
Optionally, as shown in fig. 6, the generating unit 403 provided in the embodiment of the present disclosure is specifically configured to replace a host address in the initial address with an identifier of the target access node. For example, in connection with fig. 3, the generating unit 403 may be used to perform S2031.
Optionally, as shown in fig. 6, in the pressing node 40 provided in the embodiment of the present disclosure, the initial address further includes test content of the performance test and a path of the test content. The generating unit 403 is specifically configured to generate the target address based on the identifier of the target access node, the test content, and the path of the test content. For example, in connection with fig. 3, the generating unit 403 may be used to perform S2032.
Optionally, as shown in fig. 6, in the pressing node 40 provided in the embodiment of the present disclosure, the target address is located in the request row of the pressing request, and the host address is located in the request header of the pressing request.
Optionally, as shown in fig. 6, in the pressing node 40 provided in the embodiment of the present disclosure, the Host address is a value of a target key value pair in the request header, and the key of the target key value pair is a Host.
Optionally, as shown in fig. 6, in the pressing node 40 provided in the embodiment of the present disclosure, the identifier of the target access node includes a device identifier of the target access node or a physical address of the target access node.
Optionally, as shown in fig. 6, the obtaining unit 401 provided in the embodiment of the present disclosure is specifically configured to receive a pressing instruction sent by a pressing master node, and obtain an initial address and an identifier of at least one access node from the pressing instruction. The pressing instruction is generated by the pressing master control node in response to a test start operation of the program to be tested, and the pressing instruction is used for instructing the pressing node 40 to perform performance test on the program to be tested through at least one access node.
Optionally, as shown in fig. 6, in the pressing node 40 provided in the embodiment of the present disclosure, the identifier of at least one access node is obtained from the access master node by the pressing master node according to the host address. The pressure main control node stores a mapping relation between a host address and an identifier of at least one access node.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
Fig. 7 is a schematic structural view of another pressing node provided by the present disclosure. As shown in fig. 7, the pressure applying node 50 may include at least one processor 501 and a memory 503 for storing processor-executable instructions. Wherein the processor 501 is configured to execute instructions in the memory 503 to implement the performance test method in the above-described embodiments.
In addition, the pressure applicator node 50 may also include a communication bus 502 and at least one communication interface 504.
The processor 501 may be a processor (central processing units, CPU), a microprocessor unit, ASIC, or one or more integrated circuits for controlling the execution of programs in accordance with aspects of the present disclosure.
Communication bus 502 may include a path to transfer information between the aforementioned components.
Communication interface 504, using any transceiver-like means for communicating with other devices or communication networks, such as ethernet, radio access network (radio access network, RAN), wireless local area network (wireless local area networks, WLAN), etc.
The memory 503 may be, but is not limited to, a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (random access memory, RAM) or other type of dynamic storage device that can store information and instructions, or an electrically erasable programmable read-only memory (ELECTRICALLY ERASABLE PROGRAMMABLE READ-only memory, EEPROM), a compact disc read-only memory (compact disc read-only memory) or other optical disc storage, a compact disc storage (including compact disc, laser disc, optical disc, digital versatile disc, blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. The memory may be stand alone and be connected to the processing unit by a bus. The memory may also be integrated with the processing unit.
Wherein the memory 503 is used to store instructions for performing the disclosed aspects and is controlled for execution by the processor 501. The processor 501 is configured to execute instructions stored in the memory 503 to implement the functions in the methods of the present disclosure.
As an example, in connection with fig. 6, the acquisition unit 401, the determination unit 402, the generation unit 403, and the transmission unit 404 in the pressing node 40 realize the same functions as those of the processor 501 in fig. 7.
In a particular implementation, as one embodiment, processor 501 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 7.
In a particular implementation, as one embodiment, the pressure applying node 50 may include a plurality of processors, such as processor 501 and processor 507 in fig. 7. Each of these processors may be a single-core (single-CPU) processor or may be a multi-core (multi-CPU) processor. A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
In a specific implementation, as an embodiment, the pressing node 50 may further include an output device 505 and an input device 506. The output device 505 communicates with the processor 501 and may display information in a variety of ways. For example, the output device 505 may be a Liquid Crystal Display (LCD) CRYSTAL DISPLAY, a Light Emitting Diode (LED) display device, a Cathode Ray Tube (CRT) display device, or a projector (projector), or the like. The input device 506 communicates with the processor 501 and may accept user input in a variety of ways. For example, the input device 506 may be a mouse, a keyboard, a touch screen device, a sensing device, or the like.
Those skilled in the art will appreciate that the configuration shown in fig. 7 is not limiting of the pressure applying node 50 and may include more or fewer components than shown, or may combine certain components, or may employ a different arrangement of components.
In addition, the present disclosure provides a performance testing system including at least one pressing node, at least one access node, at least one pressed node, a pressing master node, and an access master node.
The access master node is used for managing at least one access node, and the access master node comprises a mapping relation between a host address and an identifier of the access node. The host address is used to identify the program to be tested.
The pressing master control node is used for managing at least one pressing node, generating a pressing instruction and sending the pressing instruction to the at least one pressing node. The pressing instruction is generated by the pressing main control node in response to the test starting operation of the program to be tested, and is used for indicating at least one pressing node to perform performance test on the program to be tested through at least one access node.
Each of the at least one pressing node includes a pressing program, and each pressing node is used to perform the performance test method provided by the above embodiment.
Each of the at least one access node includes an access stratum procedure. Each access node is configured to send the pressure measurement request provided in the foregoing embodiment to the pressed node through an access layer procedure.
Each pressed node in the at least one pressed node comprises a program to be tested, and each pressed node is used for performing performance test on the program to be tested after receiving the pressing test request.
In addition, the present disclosure also provides a computer-readable storage medium, which when executed by a processor of the pressing node, causes the pressing node to perform the performance test method as provided in the above embodiments.
In addition, the present disclosure also provides a computer program product comprising computer instructions that, when run on a pressure applying node, cause the pressure applying node to perform the performance test method as provided in the above embodiments.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any adaptations, uses, or adaptations of the disclosure following the general principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
Claims (14)
1. A performance testing method applied to a pressing node, comprising:
Receiving a pressing instruction sent by a pressing main control node, and acquiring an initial address of a program to be tested and an identifier of at least one access node corresponding to the program to be tested from the pressing instruction; the pressing instruction is generated by the pressing main control node in response to the test starting operation of the program to be tested, and is used for indicating the pressing node to perform performance test on the program to be tested through the at least one access node; the initial address comprises a host address of the program to be tested; the at least one access node corresponds to the host address; the identification of the at least one access node is obtained from the access master control node by the pressure exerting master control node according to the host address; the pressure main control node stores a mapping relation between the host address and the identifier of the at least one access node;
Determining a target access node from the at least one access node, and generating a target address; the target address comprises an identifier of the target access node, and is used for indicating that the target access node requests performance test of the program to be tested; the identification of the target access node comprises the equipment identification of the target access node or the physical address of the target access node;
Generating a pressure measurement request based on the target address and the host address, and sending the pressure measurement request to the target access node; the pressure test request comprises the target address and the host address, and is used for requesting performance test of the program to be tested.
2. The performance testing method according to claim 1, wherein the generating the target address includes:
the host address in the initial address is replaced with the identity of the target access node.
3. The performance testing method of claim 1, wherein the initial address further comprises test content of the performance test and a path of the test content; the generating the target address includes:
And generating the target address based on the identification of the target access node, the test content and the path of the test content.
4. The performance testing method of claim 1, wherein the target address is located in a request row of the push-to-test request and the host address is located in a request header of the push-to-test request.
5. The method of claim 4, wherein the Host address is a value of a target key value pair in the request header, and wherein a key of the target key value pair is a Host.
6. A pressing device, characterized by comprising an acquisition unit, a determination unit, a generation unit and a transmission unit;
The acquiring unit is used for acquiring an initial address of a program to be tested and an identifier of at least one access node corresponding to the program to be tested; the initial address comprises a host address of the program to be tested; the at least one access node corresponds to the host address; the identification of the at least one access node is obtained from the access master control node by the pressing master control node according to the host address; the pressure main control node stores a mapping relation between the host address and the identifier of the at least one access node;
The determining unit is configured to determine a target access node from the at least one access node; the identification of the target access node comprises the equipment identification of the target access node or the physical address of the target access node;
the generating unit is used for generating a target address; the target address comprises an identifier of the target access node, and is used for indicating that the target access node requests performance test of the program to be tested;
The generating unit is further configured to generate a pressure measurement request based on the target address and the host address; the pressure test request comprises the target address and the host address, and is used for requesting performance test of the program to be tested;
the sending unit is used for sending the pressure measurement request generated by the generating unit to the target access node;
The acquiring unit is specifically configured to receive a pressing instruction sent by a pressing master control node, and acquire the initial address and the identifier of the at least one access node from the pressing instruction; the pressing instruction is generated by the pressing main control node in response to the test starting operation of the program to be tested, and is used for indicating the pressing node to perform performance test on the program to be tested through the at least one access node.
7. The pressure applicator of claim 6, wherein the generating unit is specifically configured to replace the host address in the initial address with an identification of the target access node.
8. The applicator of claim 6, wherein the initial address further comprises test content of the performance test and a path of the test content; the generating unit is specifically configured to generate the target address based on the identifier of the target access node, the test content, and the path of the test content.
9. The pressure applicator of claim 6, wherein the target address is located in a request line of the pressure measurement request and the host address is located in a request header of the pressure measurement request.
10. The pressure applicator of claim 9, wherein the Host address is a value of a target key value pair in the request header, the key of the target key value pair being a Host.
11. The performance test system is characterized by comprising at least one pressing node, at least one access node, at least one pressed node, a pressing master control node and an access master control node;
The access master control node is used for managing the at least one access node, and comprises a mapping relation between a host address and an identifier of the access node; the host address is used for identifying a program to be tested;
The pressing main control node is used for managing the at least one pressing node, generating a pressing instruction and sending the pressing instruction to the at least one pressing node; the pressing instruction is generated by the pressing main control node in response to the test starting operation of the program to be tested, and is used for indicating the at least one pressing node to perform performance test on the program to be tested through the at least one access node;
Each of the at least one stressing nodes comprises a stressing program and is adapted to perform the performance test method according to any one of claims 1-5;
each of the at least one access node includes an access stratum procedure; each access node is configured to send the pressure measurement request of any one of claims 1-5 to a pressed node through the access layer procedure;
Each pressed node of the at least one pressed nodes comprises the program to be tested, and each pressed node is used for performing performance test on the program to be tested after receiving the pressing test request.
12. A pressing apparatus, characterized by comprising: a processor, a memory for storing instructions executable by the processor; wherein the processor is configured to execute instructions to implement the performance testing method of any one of claims 1-5.
13. A computer readable storage medium, characterized in that instructions in the computer readable storage medium, when executed by a processor of a pressure applying node, cause the pressure applying node to perform the performance test method according to any of claims 1-5.
14. A computer program product comprising computer instructions which, when run on a pressure application node, cause the pressure application node to perform the performance test method of any of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110888363.3A CN113742217B (en) | 2021-08-03 | 2021-08-03 | Performance test method, device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110888363.3A CN113742217B (en) | 2021-08-03 | 2021-08-03 | Performance test method, device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113742217A CN113742217A (en) | 2021-12-03 |
CN113742217B true CN113742217B (en) | 2024-06-11 |
Family
ID=78730006
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110888363.3A Active CN113742217B (en) | 2021-08-03 | 2021-08-03 | Performance test method, device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113742217B (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110457199A (en) * | 2018-05-08 | 2019-11-15 | 北京京东尚科信息技术有限公司 | The method and apparatus of performance test |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2015106461A1 (en) * | 2014-01-20 | 2015-07-23 | 华为技术有限公司 | Address obtaining method and network virtualization edge device |
US11032235B2 (en) * | 2019-04-24 | 2021-06-08 | Dell Products L.P. | System and method for multi-agent coordination |
CN111858360B (en) * | 2020-07-23 | 2023-09-29 | 百度在线网络技术(北京)有限公司 | Applet testing method, device, equipment and storage medium |
CN112486838A (en) * | 2020-12-14 | 2021-03-12 | 广州品唯软件有限公司 | Interface testing method and device, computer equipment and storage medium |
CN113094287B (en) * | 2021-05-12 | 2024-03-15 | 深圳市腾讯信息技术有限公司 | Page compatibility detection method, device, equipment and storage medium |
-
2021
- 2021-08-03 CN CN202110888363.3A patent/CN113742217B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110457199A (en) * | 2018-05-08 | 2019-11-15 | 北京京东尚科信息技术有限公司 | The method and apparatus of performance test |
Also Published As
Publication number | Publication date |
---|---|
CN113742217A (en) | 2021-12-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108984388B (en) | Method and terminal equipment for generating automatic test case | |
US10425502B2 (en) | System and method for acquiring, processing and updating global information | |
US20100235509A1 (en) | Method, Equipment and System for Resource Acquisition | |
CN111460129B (en) | Method, device, electronic equipment and storage medium for generating identification | |
US20210092073A1 (en) | Resource trees by management controller | |
CN112131504B (en) | Webpage editing and displaying method, device, equipment and storage medium | |
US20210336861A1 (en) | Detection method and detection device for detecting quality of service of bgp anycast cluster | |
US20230297557A1 (en) | Method for monitoring a state of an external data source, device, and medium | |
CN111200649B (en) | Scheduling method and device and scheduling model generation method and device | |
CN108733545B (en) | Pressure testing method and device | |
CN113010224A (en) | Front-end micro-service method, device, computer equipment and storage medium | |
CN110943876B (en) | URL state detection method, device, equipment and system | |
CN109471713B (en) | Method and device for inquiring information | |
CN110737856A (en) | page acquisition method, device and system | |
CN112492060B (en) | Service resource processing method and system, proxy equipment and request equipment | |
CN113742217B (en) | Performance test method, device and storage medium | |
CN110928594A (en) | Service development method and platform | |
CN107547599B (en) | Resource allocation method and system | |
JP5857806B2 (en) | Distributed processing system test method and distributed processing system | |
CN109922120B (en) | Method and terminal for improving DNS availability | |
CN112491943A (en) | Data request method, device, storage medium and electronic equipment | |
CN116074195A (en) | Domain name synchronization method, service container, cluster, computing node and storage medium | |
CN112804366A (en) | Method and device for resolving domain name | |
KR20210044281A (en) | Method and apparatus for ensuring continuous device operation stability in cloud degraded mode | |
IL268670A (en) | Automatic server cluster discovery |
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 |