CN116501559A - Method for realizing distributed HTTP interface performance test based on Netty - Google Patents

Method for realizing distributed HTTP interface performance test based on Netty Download PDF

Info

Publication number
CN116501559A
CN116501559A CN202310413115.2A CN202310413115A CN116501559A CN 116501559 A CN116501559 A CN 116501559A CN 202310413115 A CN202310413115 A CN 202310413115A CN 116501559 A CN116501559 A CN 116501559A
Authority
CN
China
Prior art keywords
pressure
request
pressure measurement
netty
interface
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.)
Granted
Application number
CN202310413115.2A
Other languages
Chinese (zh)
Other versions
CN116501559B (en
Inventor
宋杨
冯辉
卢良辉
花京武
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Diji Intelligent Technology Co ltd
Original Assignee
Hangzhou Diji Intelligent Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Diji Intelligent Technology Co ltd filed Critical Hangzhou Diji Intelligent Technology Co ltd
Priority to CN202310413115.2A priority Critical patent/CN116501559B/en
Publication of CN116501559A publication Critical patent/CN116501559A/en
Application granted granted Critical
Publication of CN116501559B publication Critical patent/CN116501559B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application relates to a performance test method for realizing a distributed HTTP interface based on Netty. Each node automatically counts the own pressure measurement result. The interfaces can be subjected to modes of single, batch, weight and the like. The invention fully considers the use convenience of the user and the stability of the system, thereby having the following advantages: easy use: the visual page is provided for operation, so that usability is enhanced. Although a distributed multi-pressure node mode is used, the final statistical result is automatically counted through tasks without manual intervention; convenient: after the pressure measurement is finished, the pressure measurement data of the multiple pressure nodes are automatically counted, and the pressure measurement data are pushed to related people in a mail and message mode; high efficiency: the method uses NIO as the bottom layer, adopts multiplexing IO model, and realizes multiplexing in each operating system differently.

Description

Method for realizing distributed HTTP interface performance test based on Netty
Technical Field
The disclosure relates to the technical field of software testing, in particular to a testing architecture, a Netty-based distributed HTTP interface performance testing method and device and electronic equipment.
Background
Before the software is released, performance test is required to be carried out on the software to verify whether the software reaches the performance index of a user, the performance bottleneck of the software is detected, the performance test method can be used for rapidly carrying out the performance test on the software, the system defects can be found timely, and the problem is solved in a positioning mode.
Therefore, performance test is required to be performed on the HTTP interface of the software before the software is on line, system performance of the software is to be evaluated, performance change trend is analyzed, bottleneck risk of the software is located, planning of system capacity of the software is assisted, and stable operation of the software under some high-flow scenes after the software is on line is ensured.
A certain computer foundation is needed for performance testing of software. The traditional common performance test software is basically a C/S architecture, supports multiple protocol types, has multiple functions and impurities, increases the learning cost, is complex to use and has high secondary development cost.
Disclosure of Invention
In order to solve the problems, the application provides a test architecture, a method and a device for realizing distributed HTTP interface performance test based on Netty, and electronic equipment.
In one aspect of the present application, a test architecture is provided, including:
the display end provides a visual operation page and triggers a pressure measurement request;
the service end provides the capability of issuing a pressure measurement task, registering a pressure end node and counting a pressure measurement result;
the pressure end provides distributed deployment of the pressure end, and the current node metadata is automatically registered to the service end after starting based on the Netty framework;
a persistence layer, providing data storage.
In another aspect of the present application, a Netty-based distributed HTTP interface performance testing method is provided, implemented based on the testing architecture, including the following steps:
an API interface of a pressure end which needs to be subjected to pressure test is issued to a service end at a display end;
triggering a pressure end, judging whether proportional pressure measurement is needed, and determining a pressure measurement interface and a request parameter;
establishing connection between a Netty client and a tested server, initializing an API request record, and writing an HTTP request;
and counting and storing the pressure measurement results of the multiple nodes according to the request response.
As an optional embodiment of the present application, optionally, before the exposing end issues the API interface of the pressure end that needs to be subjected to the pressure test to the service end, the method further includes:
after the starting of each pressure end is completed, registering node metadata of the pressure node into Redis of the pressure end;
after the service end has a performance test request, the service end removes redis to pull the registered pressure nodes, and sends basic data of the performance test to each pressure end needing to be subjected to the pressure test.
As an optional embodiment of the present application, optionally, the API interface information includes:
interface domain name/HOST, port;
URI information of the interface;
header information of the interface;
a request mode of the interface;
the request parameters of the interface, if the variable parameters are needed, the parameters can be automatically replaced according to the created data during the compression by using a mode of fixed grammar $ { Param };
time of press measurement.
As an optional embodiment of the present application, optionally, triggering the pressure end, determining whether proportional pressure measurement is needed, and determining a pressure measurement interface and a request parameter includes:
receiving a pressure measurement request through a service end;
when a service end receives a pressure testing request, acquiring pressure nodes which are registered to the service end, and transmitting pressure testing information to each pressure node in a HTTP request mode according to a preset timing scheme;
after each pressure node receives the pressure measurement request, a timing task corresponding to the fixed time is automatically created.
As an optional embodiment of the present application, optionally, triggering the pressure end, determining whether proportional pressure measurement is needed, and determining a pressure measurement interface and a request parameter, further includes:
executing timing tasks of each pressure node;
judging whether the access interface of each pressure node needs proportional pressure measurement or not:
if yes, sorting the requests according to a preset proportion, and acquiring sorted pressure measurement requests; if not, directly acquiring a pressure measurement request;
and determining the pressure measurement interfaces according to the pressure measurement requests, and constructing request parameters of the interfaces.
As an optional embodiment of the present application, optionally, establishing a connection between the Netty client and the measured server, initializing an API request record, and writing an HTTP request, including:
initializing a Netty client;
establishing connection with a pressed server by using a Netty client, and initializing an API request record, a working thread group and a channel connection pool;
and writing the constructed HTTP request into a channel which is successfully connected in a circulating way, recording the sending time, and obtaining the pressure measurement data of each pressure node.
As an optional embodiment of the present application, optionally, counting and storing the pressure measurement result of the multiple nodes according to the request response includes:
executing each timing task on the service end, and counting the pressure measurement data of each pressure node;
storing the pressure measurement data of each pressure node to a persistent layer;
and pushing the pressure measurement data of each pressure node to the front end through the service end.
In another aspect of the present application, a device for implementing the Netty-based distributed HTTP interface performance testing method is further provided, including:
the API interface issuing module is used for issuing the API interface of the pressure end which needs to be subjected to pressure test to the service end at the display end;
the triggering module is used for triggering the pressure end, judging whether proportional pressure measurement is needed or not, and determining a pressure measurement interface and request parameters;
the Netty initialization module is used for establishing connection between the Netty client and the tested server, initializing an API request record and writing an HTTP request;
and the response module is used for responding according to the request, counting and storing the pressure measurement results of the multiple nodes.
In another aspect of the present application, an electronic device for implementing a distributed HTTP interface performance test method based on Netty is provided, including:
a processor;
a memory for storing processor-executable instructions;
the processor is configured to implement the distributed HTTP interface performance test method based on Netty when executing the executable instructions.
The invention has the technical effects that:
according to the method for testing the performance of the server, the Netty is used for testing the performance of the server, and the performance of the server can be tested in a high performance mode. Each node automatically counts the own pressure measurement result. The interfaces can be subjected to modes of single, batch, weight and the like.
The invention fully considers the convenience of use and the stability of the system of the user, so the invention has the following advantages:
easy use: the visual page is provided for operation, so that usability is enhanced. Although a distributed multi-pressure node mode is used, the final statistical result is automatically counted through tasks without manual intervention;
convenient: after the pressure measurement is finished, the pressure measurement data of the multiple pressure nodes are automatically counted, and the pressure measurement data are pushed to related people in a mail and message mode;
high efficiency: the method uses NIO as the bottom layer, adopts multiplexing IO model, and realizes multiplexing in each operating system differently.
Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate exemplary embodiments, features and aspects of the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a schematic diagram of a test architecture according to the present invention;
FIG. 2 is a schematic diagram of an implementation flow of the distributed HTTP interface performance test method based on Netty according to the present invention;
FIG. 3 is a schematic diagram showing the registration of a pressure node at a service end according to the present invention;
FIG. 4 shows a timing diagram of the pressure test of the present invention;
fig. 5 shows a schematic application diagram of the electronic device of the present invention.
Detailed Description
Various exemplary embodiments, features and aspects of the disclosure will be described in detail below with reference to the drawings. In the drawings, like reference numbers indicate identical or functionally similar elements. Although various aspects of the embodiments are illustrated in the accompanying drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
In addition, numerous specific details are set forth in the following detailed description in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, well known means, elements, and circuits have not been described in detail so as not to obscure the present disclosure.
As shown in fig. 1, in one aspect, the present application proposes a test architecture, including:
the display end provides a visual operation page and triggers a pressure measurement request;
the service end provides the capability of issuing a pressure measurement task, registering a pressure end node and counting a pressure measurement result;
the pressure end provides distributed deployment of the pressure end, and the current node metadata is automatically registered to the service end after starting based on the Netty framework;
a persistence layer, providing data storage.
The pressure testing tool adopts a B/S architecture, and uses a browser as a client. The system is divided into three parts, namely a display end, a service end and a pressure measurement end.
The display end (front end) is mainly used for providing a visual operation page and triggering a pressure measurement request; the method has the advantages that the page is displayed on the tool, the visual page is provided, the use is simpler than that of a command line mode, errors are not easy to occur, and the operability is higher.
The service end (back end) is the service processing end of the tool and provides registration of the pressure end node and data statistics of the pressure measurement result. The rear end provides the capability of issuing a pressure measurement task and counting the pressure measurement result; the method comprises the steps that web provides Http service, core provides Interface, entity and Patrol for business processing; the performance processes the prepositive data of the pressure request, and calculates the starting time of the pressure measurement task; the job is responsible for final multi-node speculative performance result statistics.
The pressure end is a core of a performance tool, has distributed capability, is a method core based on Netty, and automatically registers the current node metadata to the service end after starting. The pressure end can be deployed in multiple points, and the specific deployment quantity is determined according to the actual situation of a user.
The data layer under the architecture, the persistence layer, may use MSQL, REDIS, mongoDB for data storage.
The application scheme of the test architecture will be described below.
Example 1
As shown in fig. 2, in another aspect of the present application, a Netty-based distributed HTTP interface performance testing method is provided, and implemented based on the testing architecture, including the following steps:
an API interface of a pressure end which needs to be subjected to pressure test is issued to a service end at a display end;
triggering a pressure end, judging whether proportional pressure measurement is needed, and determining a pressure measurement interface and a request parameter;
establishing connection between a Netty client and a tested server, initializing an API request record, and writing an HTTP request;
and counting and storing the pressure measurement results of the multiple nodes according to the request response.
For implementation, please refer to the schematic diagram of the business process in embodiment 2. Mainly comprises the steps of 1-11.
1. First, before testing is performed, registration of the pressure end is required
As shown in the pressure end registration flow in fig. 3, each pressure end registers node metadata of the pressure node into the Redis after starting, and when the service end has a performance test request, the service end removes the Redis to pull the registered pressure node and issues basic data of the performance test to each pressure end.
2. Beginning to conduct pressure node test
1. Acquiring data
And the API interface which needs to be subjected to pressure test is issued to the service end (the back end) at the display end (the front end), and the issuing mode can be a file mode (JSON data structure) or a form submitting mode at the display end.
The API interface information contains the following information:
1, interface domain name/HOST, port;
URI information of the interface;
3, header information of the interface;
4, request mode (GET, POST, PUT, DELETE) of interface;
the request parameters of the interface, if the variable parameters are needed, the parameters can be automatically replaced according to the created data when the request parameters are compressed by using a mode of fixed grammar $ { Param };
6, time for pressure measurement;
2. trigger pressure end
When a service end (rear end) receives a pressure testing request, pressure nodes registered to the service end are acquired, and pressure testing information is issued to each node in an HTTP request mode; in order to ensure that the pressure is not increased but is directly full, the service end converts the current time delay of 30 seconds into a CRON expression (fixed time) and transmits the CRON expression to the pressure end, and the pressure end automatically creates a timing task with fixed time after receiving a pressure measurement request;
3. whether or not proportional pressure measurement is required
The access frequency of some interfaces in software is not so high, so that the weight of the interfaces can be reduced in batch or scene pressure measurement, and the weight of other interfaces which are easy to be accessed by high frequency can be improved;
4. requiring proportional pressure measurement
When the set of interfaces is to be compressed proportionally, the set of interfaces is put into a queue according to the formula weight 100;
5. does not need to be measured by proportional pressure
When the interface requests do not need to be compressed in proportion, the interface requests do not need to be processed;
6. constructing request parameters
At this point the pressure sensing interfaces have determined that the request parameters need to be constructed for each interface. The method mainly aims at replacing the variable parameters in the interface, and the variable parameters in the interface are replaced by constructed parameters;
7. initializing Netty clients
This step is particularly important, and requires to use Netty to establish connection with the tested server, initialize API request records, work thread groups and channel connection pools;
8. writing HTTP requests
After the connection is completed, starting to circularly write the constructed HTTP request into a channel with successful connection, and recording the sending time;
9. storing pressure measurement data
When the pressing time is over, a new thread is started to count the pressing data of the node, and the data is stored in the Redis after the data statistics is completed;
10. counting multinode data
And under the condition that the service end has the sub-node performance data of a constant timing task, the performance data of more sub-nodes are summarized, and the final result of the performance data is stored. Pushing the result to related personnel by means of mail or message;
11. ending
So far, the pressure test has been completely ended.
Therefore, the method for testing the performance of the server can test the performance of the server with high performance by using the Netty as the performance test method. Each node automatically counts the own pressure measurement result. The interfaces can be subjected to performance test in a single, batch, weight and other modes. The Netty is optimized, so that the throughput capability of the client network IO is greatly improved.
The invention has the following advantages:
easy use: the visual page is provided for operation, so that usability is enhanced. Although a distributed multi-pressure node mode is used, the final statistical result is automatically counted through tasks without manual intervention.
Convenient: after the pressure measurement is finished, the pressure measurement data of the multiple pressure nodes are automatically counted, and the pressure measurement data are pushed to related people in a mail and message mode;
high efficiency: the method uses NIO as the bottom layer, adopts multiplexing IO model, and realizes multiplexing in each operating system differently. For example, in Linux, the multiplexing implementation kernel is epoll, which upgrades multiplexing, and multiple input and output sources can be monitored in one thread to support more concurrent connection requests, so that the performance test method is very efficient.
It should be apparent to those skilled in the art that implementing all or part of the above-described embodiments may be accomplished by computer programs to instruct related hardware, and the programs may be stored in a computer readable storage medium, which when executed may include the processes of the embodiments of the controls described above. It will be appreciated by those skilled in the art that implementing all or part of the above-described embodiments may be accomplished by computer programs to instruct related hardware, and the programs may be stored in a computer readable storage medium, which when executed may include the processes of the embodiments of the controls described above. The storage medium may be a magnetic disk, an optical disc, a Read-only memory (ROM), a random access memory (RandomAccessMemory, RAM), a flash memory (flash memory), a hard disk (HDD), or a Solid State Drive (SSD); the storage medium may also comprise a combination of memories of the kind described above.
Example 2
Based on the implementation principle of embodiment 1, in another aspect, the present application further proposes an apparatus for implementing the Netty-based distributed HTTP interface performance test method, including:
the API interface issuing module is used for issuing the API interface of the pressure end which needs to be subjected to pressure test to the service end at the display end;
the triggering module is used for triggering the pressure end, judging whether proportional pressure measurement is needed or not, and determining a pressure measurement interface and request parameters;
the Netty initialization module is used for establishing connection between the Netty client and the tested server, initializing an API request record and writing an HTTP request;
and the response module is used for responding according to the request, counting and storing the pressure measurement results of the multiple nodes.
For a specific use of the respective modules, reference may be made to a timing diagram as shown in fig. 4.
When a user issues a press measurement task at a display end, the user can take a list needing press measurement from a request body/file, wherein the press measurement list comprises pressed server information, press measurement interface information, weight and press measurement events;
after the service end takes the press measurement task, the task execution time is calculated through the current time and 30 seconds, and the task execution time is converted into an expression of Cron. Then, the registered pressure node is obtained from Redis, a pressure measurement task is issued to the pressure node in a HTTP request mode, and a timing task training check task is started per se to finish execution;
after each pressure node acquires the pressure measurement information, analyzing the pressure measurement data, packaging a pressure measurement request according to weight, constructing the pressure measurement request, and writing the request into a channel;
after the task is executed (the expected pressure measurement time is reached), starting a new thread to count the pressure measurement result, and storing the result into a Redis;
the task of the service end gathers task results after detecting that the statistics of each node is finished, and stores the results into Mysql;
when the final result is pushed to the individual by means of mail or message.
The above steps can be understood in conjunction with the description of example 1.
The modules or steps of the invention described above may be implemented in a general-purpose computing device, they may be centralized in a single computing device, or distributed across a network of computing devices, or they may alternatively be implemented in program code executable by a computing device, such that they may be stored in a memory device and executed by a computing device, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps within them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
Example 3
As shown in fig. 5, in another aspect of the present application, an electronic device for implementing a distributed HTTP interface performance test method based on Netty is further provided, including:
a processor;
a memory for storing processor-executable instructions;
the processor is configured to implement the distributed HTTP interface performance test method based on Netty when executing the executable instructions.
Embodiments of the present disclosure provide for an electronic device that includes a processor and a memory for storing processor-executable instructions. The processor is configured to implement any of the above methods for implementing distributed HTTP interface performance testing based on Netty when executing executable instructions.
Here, it should be noted that the number of processors may be one or more. Meanwhile, in the electronic device of the embodiment of the disclosure, an input device and an output device may be further included. The processor, the memory, the input device, and the output device may be connected by a bus, or may be connected by other means, which is not specifically limited herein.
The memory is a computer-readable storage medium that can be used to store software programs, computer-executable programs, and various modules, such as: a program or a module corresponding to a distributed HTTP interface performance testing method is realized based on Netty. The processor executes various functional applications and data processing of the electronic device by running software programs or modules stored in the memory.
The input device may be used to receive an input number or signal. Wherein the signal may be a key signal generated in connection with user settings of the device/terminal/server and function control. The output means may comprise a display device such as a display screen.
The foregoing description of the embodiments of the present disclosure has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the various embodiments described. The terminology used herein was chosen in order to best explain the principles of the embodiments, the practical application, or the technical improvement of the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (10)

1. A test architecture, comprising:
the display end provides a visual operation page and triggers a pressure measurement request;
the service end provides the capability of issuing a pressure measurement task, registering a pressure end node and counting a pressure measurement result;
the pressure end provides distributed deployment of the pressure end, and the current node metadata is automatically registered to the service end after starting based on the Netty framework;
a persistence layer, providing data storage.
2. A Netty-based implementation of a distributed HTTP interface performance test method, implemented based on the test architecture of claim 1, comprising the steps of:
an API interface of a pressure end which needs to be subjected to pressure test is issued to a service end at a display end;
triggering a pressure end, judging whether proportional pressure measurement is needed, and determining a pressure measurement interface and a request parameter;
establishing connection between a Netty client and a tested server, initializing an API request record, and writing an HTTP request;
and counting and storing the pressure measurement results of the multiple nodes according to the request response.
3. The Netty-based distributed HTTP interface performance testing method according to claim 2, further comprising, before the exposing end issues the API interface of the pressure end that needs to be pressure tested to the service end:
after the starting of each pressure end is completed, registering node metadata of the pressure node into Redis of the pressure end;
after the service end has a performance test request, the service end removes redis to pull the registered pressure nodes, and sends basic data of the performance test to each pressure end needing to be subjected to the pressure test.
4. The Netty-based implementation of a distributed HTTP interface performance test method according to claim 2, wherein the API interface information includes:
interface domain name/HOST, port;
URI information of the interface;
header information of the interface;
a request mode of the interface;
the request parameters of the interface, if the variable parameters are needed, the parameters can be automatically replaced according to the created data during the compression by using a mode of fixed grammar $ { Param };
time of press measurement.
5. The Netty-based distributed HTTP interface performance test method according to claim 2, wherein triggering the pressure end, determining whether proportional pressure measurement is needed, and determining a pressure measurement interface and a request parameter, includes:
receiving a pressure measurement request through a service end;
when a service end receives a pressure testing request, acquiring pressure nodes which are registered to the service end, and transmitting pressure testing information to each pressure node in a HTTP request mode according to a preset timing scheme;
after each pressure node receives the pressure measurement request, a timing task corresponding to the fixed time is automatically created.
6. The Netty-based distributed HTTP interface performance test method according to claim 5, wherein triggering the pressure end, determining whether proportional pressure measurement is needed, and determining a pressure measurement interface and a request parameter, further comprises:
executing timing tasks of each pressure node;
judging whether the access interface of each pressure node needs proportional pressure measurement or not:
if yes, sorting the requests according to a preset proportion, and acquiring sorted pressure measurement requests; if not, directly acquiring a pressure measurement request;
and determining the pressure measurement interfaces according to the pressure measurement requests, and constructing request parameters of the interfaces.
7. The Netty-based implementation of a distributed HTTP interface performance test method according to claim 6, wherein establishing a connection between a Netty client and a pressed server, initializing an API request record, and writing an HTTP request, comprises:
initializing a Netty client;
establishing connection with a pressed server by using a Netty client, and initializing an API request record, a working thread group and a channel connection pool;
and writing the constructed HTTP request into a channel which is successfully connected in a circulating way, recording the sending time, and obtaining the pressure measurement data of each pressure node.
8. The Netty-based implementation of a distributed HTTP interface performance test method according to claim 7, wherein counting and storing the multi-node crush test results according to the request response, comprises:
executing each timing task on the service end, and counting the pressure measurement data of each pressure node;
storing the pressure measurement data of each pressure node to a persistent layer;
and pushing the pressure measurement data of each pressure node to the front end through the service end.
9. An apparatus for implementing the Netty-based implementation of the distributed HTTP interface performance test method as set forth in any one of claims 2-8, comprising:
the API interface issuing module is used for issuing the API interface of the pressure end which needs to be subjected to pressure test to the service end at the display end;
the triggering module is used for triggering the pressure end, judging whether proportional pressure measurement is needed or not, and determining a pressure measurement interface and request parameters;
the Netty initialization module is used for establishing connection between the Netty client and the tested server, initializing an API request record and writing an HTTP request;
and the response module is used for responding according to the request, counting and storing the pressure measurement results of the multiple nodes.
10. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to implement the Netty-based implementation of the distributed HTTP interface performance test method of any of claims 2-8 when executing the executable instructions.
CN202310413115.2A 2023-04-18 2023-04-18 Method for realizing distributed HTTP interface performance test based on Netty Active CN116501559B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310413115.2A CN116501559B (en) 2023-04-18 2023-04-18 Method for realizing distributed HTTP interface performance test based on Netty

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310413115.2A CN116501559B (en) 2023-04-18 2023-04-18 Method for realizing distributed HTTP interface performance test based on Netty

Publications (2)

Publication Number Publication Date
CN116501559A true CN116501559A (en) 2023-07-28
CN116501559B CN116501559B (en) 2024-04-26

Family

ID=87319510

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310413115.2A Active CN116501559B (en) 2023-04-18 2023-04-18 Method for realizing distributed HTTP interface performance test based on Netty

Country Status (1)

Country Link
CN (1) CN116501559B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130179947A1 (en) * 2012-01-05 2013-07-11 Adept Cloud, Inc. System and method for decentralized online data transfer and synchronization
CN108959000A (en) * 2018-06-20 2018-12-07 深圳市腾讯网络信息技术有限公司 A kind of server stress test method, system and terminal
CN109726014A (en) * 2018-12-29 2019-05-07 武汉斗鱼网络科技有限公司 Implementation method, system, server and storage medium of the Rpc client based on Netty in Testing Platform
WO2020048453A1 (en) * 2018-09-03 2020-03-12 南京中兴软件有限责任公司 Network element management method and apparatus, system and storage medium
CN111211934A (en) * 2019-12-25 2020-05-29 曙光信息产业(北京)有限公司 Cluster remote communication test method and system
CN111694748A (en) * 2020-06-18 2020-09-22 行吟信息科技(武汉)有限公司 Pressure testing method and device
CN112134754A (en) * 2020-09-18 2020-12-25 中移(杭州)信息技术有限公司 Pressure testing method and device, network equipment and storage medium
CN112486791A (en) * 2020-12-14 2021-03-12 政采云有限公司 Performance test method, device and equipment of server cluster
CN115098349A (en) * 2022-06-21 2022-09-23 平安普惠企业管理有限公司 Full link voltage measurement method, device and equipment based on micro-service architecture
CN115794570A (en) * 2021-09-10 2023-03-14 顺丰科技有限公司 Pressure testing method, device, equipment and computer readable storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130179947A1 (en) * 2012-01-05 2013-07-11 Adept Cloud, Inc. System and method for decentralized online data transfer and synchronization
CN108959000A (en) * 2018-06-20 2018-12-07 深圳市腾讯网络信息技术有限公司 A kind of server stress test method, system and terminal
WO2020048453A1 (en) * 2018-09-03 2020-03-12 南京中兴软件有限责任公司 Network element management method and apparatus, system and storage medium
CN109726014A (en) * 2018-12-29 2019-05-07 武汉斗鱼网络科技有限公司 Implementation method, system, server and storage medium of the Rpc client based on Netty in Testing Platform
CN111211934A (en) * 2019-12-25 2020-05-29 曙光信息产业(北京)有限公司 Cluster remote communication test method and system
CN111694748A (en) * 2020-06-18 2020-09-22 行吟信息科技(武汉)有限公司 Pressure testing method and device
CN112134754A (en) * 2020-09-18 2020-12-25 中移(杭州)信息技术有限公司 Pressure testing method and device, network equipment and storage medium
CN112486791A (en) * 2020-12-14 2021-03-12 政采云有限公司 Performance test method, device and equipment of server cluster
CN115794570A (en) * 2021-09-10 2023-03-14 顺丰科技有限公司 Pressure testing method, device, equipment and computer readable storage medium
CN115098349A (en) * 2022-06-21 2022-09-23 平安普惠企业管理有限公司 Full link voltage measurement method, device and equipment based on micro-service architecture

Also Published As

Publication number Publication date
CN116501559B (en) 2024-04-26

Similar Documents

Publication Publication Date Title
CN108521353B (en) Processing method and device for positioning performance bottleneck and readable storage medium
WO2018120721A1 (en) Method and system for testing user interface, electronic device, and computer readable storage medium
WO2018184361A1 (en) Application test method, server, terminal, and storage media
CN110750458A (en) Big data platform testing method and device, readable storage medium and electronic equipment
CN105607994A (en) Mobile terminal software testing method and system
CN111563014A (en) Interface service performance test method, device, equipment and storage medium
US8046638B2 (en) Testing of distributed systems
CN111352836A (en) Pressure testing method and related device
CN113887161A (en) Verification method, device, equipment and medium for network-on-chip design example
US20190034325A1 (en) Evidence gathering system and method
CN116501559B (en) Method for realizing distributed HTTP interface performance test based on Netty
CN108763052B (en) Performance detection method and system of virtual reality software memory recovery mechanism
CN105468488A (en) Method, device and system of diskless CPU (Central Processing Unit) on the basis of IB (InfiniBand) network
CN112380115A (en) Regression testing method and device, electronic equipment and storage medium
CN110708211B (en) Network flow testing method and system
CN114518984A (en) Reporting method and device of embedded point information, storage medium and terminal equipment
CN116974874A (en) Database testing method and device, electronic equipment and readable storage medium
CN111143216A (en) Quality report generation method, quality report generation device, quality report generation equipment and computer readable storage medium
CN111143177B (en) Method, system, device and storage medium for collecting RMF III data of IBM host
CN113138917A (en) Performance test platform
CN112395176A (en) Method, device, system, equipment, processor and storage medium for testing distributed cloud storage performance
CN113392005B (en) Large file processing test method and system
CN116048975A (en) Database testing method and device, electronic equipment and storage medium
CN113742226B (en) Software performance test method and device, medium and electronic equipment
CN115334153B (en) Data processing method and device for service grid

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