CN116302877A - Message queue performance test method and device - Google Patents

Message queue performance test method and device Download PDF

Info

Publication number
CN116302877A
CN116302877A CN202310107638.4A CN202310107638A CN116302877A CN 116302877 A CN116302877 A CN 116302877A CN 202310107638 A CN202310107638 A CN 202310107638A CN 116302877 A CN116302877 A CN 116302877A
Authority
CN
China
Prior art keywords
message
message queue
information
target
jmeter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310107638.4A
Other languages
Chinese (zh)
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.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Haier Uplus Intelligent Technology Beijing Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Haier Uplus Intelligent Technology Beijing 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 Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd, Haier Uplus Intelligent Technology Beijing Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202310107638.4A priority Critical patent/CN116302877A/en
Publication of CN116302877A publication Critical patent/CN116302877A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/547Messaging middleware
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/548Queue
    • 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)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The utility model discloses a message queue performance test method and device, relate to intelligent household technical field, load the Mqmeteter plug-in through the Jmeter instrument, construct the test engineering package of target equipment message queue through the Mqmeteter plug-in, monitor target sampling parameter through the Mqmeteter sampler in the execution test engineering package process, realize message transmission scene simulation and test record to message queue, according to the information of the target sampling parameter of message queue that monitors, the message queue test result of target equipment is generated, accomplish the performance test to the message queue of target equipment, the defect that can't carry out the performance test to the message queue based on the Jmeter instrument in the prior art is solved.

Description

Message queue performance test method and device
Technical Field
The present disclosure relates to the field of performance testing technologies, and in particular, to a method and an apparatus for testing performance of a message queue.
Background
Message Queue (MQ) is abbreviated as MQ, and is used as a mainstream middleware at present in many software or programs, and testers encounter transformation related to MQ in the testing process, so that performance test is required for the MQ.
In the prior art, the performance test performed by using the Jmeter tool is mainly an interface test, the performance test of the MQ cannot be performed by using the Jmeter tool, and the performance test of the MQ performed by using other colder tools also slows down the test efficiency.
Therefore, providing a method for testing the performance of a message queue is a current urgent problem to be solved.
Disclosure of Invention
The application provides a method and a device for testing message queue performance, which are used for solving the defect that a Jmeter tool cannot be used for testing the message queue performance in the prior art and realizing the message queue performance test based on the Jmeter tool.
The application provides a message queue performance test method, which comprises the following steps:
loading an Mqmeteter plug-in by a Jmeter tool;
constructing a test engineering package of a message queue of the target equipment through the Mqmeter plugin;
acquiring target sampling parameters, and creating an Mqmeteter sampler by using the Jmeter tool;
monitoring information of target sampling parameters of the message queue in the process of executing the test engineering package through the Mqmeteter sampler;
and generating a message queue test result of the target equipment according to the monitored information of the target sampling parameters of the message queue.
According to the method for testing the performance of the message queue provided by the application, the test engineering package of the message queue of the target device is constructed through the Mqmeter plug-in, and the method comprises the following steps:
determining Jmeter server information, target device information, and consumption module information;
determining message placement information according to the Jmeter server information and the target device information;
determining message extraction information according to the target equipment information and the consumption module information;
and generating a test engineering package of a message queue of the target equipment according to the Jmeter server information, the target equipment information, the consumption module information, the message placement information and the message extraction information through an Mqmeter plug-in.
According to the method for testing the performance of the message queue provided by the application, the executing the test engineering package comprises the following steps:
establishing a first communication connection between a Jmeter server and the target equipment and a second communication connection between the target equipment and a consumption module according to the Jmeter server information, the target equipment information and the consumption module information;
the Jmeter server sends a message to a message queue of the target device according to the message placement information and the first communication connection;
and the consumption module extracts the message from the message queue of the target equipment according to the message extraction information and the second communication connection.
According to the message queue performance test method provided by the application, the target equipment information comprises an IP address, a port number, a user name, a password and message queue information;
the establishing a first communication connection between the Jmeter server and the target device, and a second communication connection between the target device and the consumption module, includes:
determining an application interface of the target equipment according to the IP address and the port number;
establishing a first communication connection of an application interface of the Jmeter server and the target equipment according to the user name and the password;
and establishing a second communication connection of the message queues of the consumption module and the target equipment according to the message queue information.
According to the method for testing the performance of the message queue provided by the application, the Jmeter server sends the message to the message queue of the target device according to the message placement information and the first communication connection, and the method comprises the following steps:
the Jmeter server sends a message to an application interface of the target device according to the message placement information and the first communication connection;
and writing the message received by the application interface into the message queue by the preset application program of the target equipment.
According to the message queue performance test method provided by the application, the target sampling parameters comprise the queue depth of the message queue, a queue depth field, a read-write performance parameter and response time;
the monitoring, by the Mqmeter sampler, information of the target sampling parameter of the message queue in the process of executing the test engineering package includes:
monitoring the queue depth, the queue depth field and the read-write performance parameters of the message queue in the process of sending the message and extracting the message through the Mqmeter sampler;
recording the sending time of the message after the sending of the message is completed by the Mqmeter sampler, and recording the extracting time of the message after the extracting of the message is completed;
and determining response time of the message queue according to the sending time and the extracting time through the Mqmeteter sampler.
According to the method for testing the performance of the message queue provided by the application, the message queue testing result of the target device is generated according to the monitored information of the target sampling parameter of the message queue, and the method comprises the following steps:
and generating a test report file and a test result tree of the message queue of the target equipment according to the queue depth, the queue depth field, the read-write performance parameter and the response time of the message queue.
The application also provides a message queue performance test device, which comprises:
a preparation unit for loading the Mqmeter plug-in by the Jmeter tool; constructing a test engineering package of a message queue of the target equipment through the Mqmeter plugin; acquiring target sampling parameters, and creating an Mqmeteter sampler by using the Jmeter tool;
the monitoring unit is used for monitoring the information of the target sampling parameters of the message queue in the process of executing the test engineering packet through the Mqmeter sampler;
and the summarizing unit is used for generating a message queue test result of the target equipment according to the monitored information of the target sampling parameters of the message queue.
The present application also provides an electronic device comprising a memory having stored therein a computer program and a processor arranged to implement a message queue performance test method as described in any one of the above by execution of the computer program.
The present application also provides a computer readable storage medium comprising a stored program, wherein the program when run performs a method of implementing any one of the message queue performance test methods described above.
The present application also provides a computer program product comprising a computer program which when executed by a processor implements a method of message queue performance testing as described in any one of the above.
According to the method and the device for testing the performance of the message queue, the Mqmeteter plug-in is loaded through the Jmeter tool, the test engineering package of the message queue of the target device is built through the Mqmeteter plug-in, the target sampling parameter is monitored through the Mqmeteter sampler in the process of executing the test engineering package, the message transmission scene simulation and the test record of the message queue are realized, the message queue test result of the target device is generated according to the monitored information of the target sampling parameter of the message queue, the performance test of the message queue of the target device is completed, and the defect that the performance test of the message queue cannot be carried out on the basis of the Jmeter tool in the prior art is overcome.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic diagram of a hardware environment of a message queue performance test method according to an embodiment of the present application;
FIG. 2 is a flow chart of a message queue performance test method provided by the present application;
FIG. 3 is a schematic diagram of simulated message queue messaging provided herein;
FIG. 4 is a schematic diagram of a message queue performance test apparatus provided herein;
fig. 5 is a schematic structural diagram of an electronic device provided in the present application.
Detailed Description
In order to make the present application solution better understood by those skilled in the art, the following description will be made in detail and with reference to the accompanying drawings in the embodiments of the present application, it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above 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 embodiments of the present application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to one aspect of the embodiments of the present application, a method for testing performance of a message queue is provided. The message queue performance testing method is widely applied to full-house intelligent digital control application scenes such as intelligent Home (Smart Home), intelligent Home equipment ecology, intelligent Home (Intelligence House) ecology and the like. Alternatively, in the present embodiment, the above-described message queue performance test method may be applied to a hardware environment constituted by the terminal device 102 and the server 104 as shown in fig. 1. As shown in fig. 1, the server 104 is connected to the terminal device 102 through a network, and may be used to provide services (such as application services and the like) for a terminal or a client installed on the terminal, a database may be set on the server or independent of the server, for providing data storage services for the server 104, and cloud computing and/or edge computing services may be configured on the server or independent of the server, for providing data computing services for the server 104.
The network may include, but is not limited to, at least one of: wired network, wireless network. The wired network may include, but is not limited to, at least one of: a wide area network, a metropolitan area network, a local area network, and the wireless network may include, but is not limited to, at least one of: WIFI (Wireless Fidelity ), bluetooth. The terminal device 102 may not be limited to a PC, a mobile phone, a tablet computer, an intelligent air conditioner, an intelligent smoke machine, an intelligent refrigerator, an intelligent oven, an intelligent cooking range, an intelligent washing machine, an intelligent water heater, an intelligent washing device, an intelligent dish washer, an intelligent projection device, an intelligent television, an intelligent clothes hanger, an intelligent curtain, an intelligent video, an intelligent socket, an intelligent sound box, an intelligent fresh air device, an intelligent kitchen and toilet device, an intelligent bathroom device, an intelligent sweeping robot, an intelligent window cleaning robot, an intelligent mopping robot, an intelligent air purifying device, an intelligent steam box, an intelligent microwave oven, an intelligent kitchen appliance, an intelligent purifier, an intelligent water dispenser, an intelligent door lock, and the like.
The application provides a message queue performance test method, as shown in fig. 2, comprising the following steps:
s21, loading an Mqmeteter plug-in through a Jmeter tool;
s22, constructing a test engineering packet of a message queue of the target equipment through the Mqmeter plug-in;
s23, acquiring target sampling parameters, and creating an Mqmeteter sampler by using the Jmeter tool;
s24, monitoring information of target sampling parameters of the message queue in the process of executing the test engineering package through the Mqmeter sampler;
s25, generating a message queue test result of the target equipment according to the monitored information of the target sampling parameters of the message queue.
Specifically, jmeter is a mainstream performance testing tool, mainly for performing performance testing on an interface, and Mqmeter plug-in is an expansion plug-in based on Jmeter tool design. The Mqmeteter plug-in is loaded through the JMter tool, so that the message can be placed and extracted in the message queue of the target equipment according to the Mqmeteter plug-in the JMter tool, the situation that the message queue transmits the message is simulated, and further a precondition is provided for testing the performance of the message queue. Alternatively, the target device may be an IBMAIX mini-machine.
The Mqmeteter plug-in can be used for constructing a test engineering packet of a test queue of the target equipment, and the test engineering packet can be in the form of a jar packet (a format). And the message can be placed and extracted in the message queue of the target equipment according to the test engineering package, so that the message queue can be conveniently tested.
According to the actual needs, the target sampling parameters which need to be concerned or want to be tested can be obtained, and an Mqmeteter sampler for monitoring the target sampling parameters is created by utilizing a Jmeter tool. The target sampling parameters may include, but are not limited to, queue depth of the message queue, queue depth field, read-write performance parameters, response time, and the like.
And executing the test engineering package to place and extract the message in the message queue of the target equipment, monitoring the information of the target sampling parameters in the message queue through the Mqmeteter sampler in the process, and generating a message queue test result of the target equipment according to the monitored information of the target sampling parameters of the message queue.
In the embodiment of the application, the Mqmeteter plug-in is loaded through the Jmeter tool, the test engineering package of the message queue of the target equipment is constructed through the Mqmeteter plug-in, the Mqmeteter sampler monitors the target sampling parameter in the process of executing the test engineering package, the message transmission scene simulation and the test record of the message queue are realized, the message queue test result of the target equipment is generated according to the monitored information of the target sampling parameter of the message queue, the performance test of the message queue of the target equipment is finished, and the defect that the performance test of the message queue cannot be carried out based on the Jmeter tool in the prior art is overcome.
According to the message queue performance test method provided by the application, the step S22 comprises S31-S34:
s31, determining Jmeter server information, target equipment information and consumption module information.
Specifically, jmeter server information may be predetermined, where the Jmeter server information is used to define various attribute parameters of a Jmeter server, such as a server IP address and a server port of the Jmeter server, and the Jmeter server is a cloud server used by a Jmeter tool to provide services. Consumption module information may be predetermined, the consumption module information defining various attribute parameters of the consumption module.
Target device information may be predetermined, the target device information including various attribute parameters of the target device, such as:
mq_manager: MQ manager name.
mq_queue_rqst: the message queue name for placing the message can be a local message queue or a remote queue.
mq_queue_rsps: the message queue name of the acquired message can be a local message queue or a remote queue, and can be set empty if the response message is not wanted to be received.
mq_correlate_rsps_msg: the response message is associated with the request message and a new message is retrieved from the MQ queue. The response message may be left empty if it is not intended.
mq_wait_interval: setting a wait interval for the get message call to wait for the appropriate message to arrive.
mq_hostname: the hostname or IP address of the MQ Server (i.e., the target device application) is running.
mq_port: the MQ server (i.e., the target device) listens for port numbers of the listener.
mq_channel: server channel names on MQ servers (i.e., target devices).
mq_user_id: a user name of a channel connected to the MQ server (i.e., the target device).
mq_user_password: user passwords for channels connected to the MQ server (i.e., the target device).
mq_encoding_message: character encoding criteria for messages.
S32, determining information placement information according to the Jmeter server information and the target equipment information.
Specifically, according to the Jmeter server information and the target device information, the message queues of the corresponding Jmeter server and target device can be determined, and then the message placement information for guiding the Jmeter server to place/send the message to the message queue of the target device can be determined.
S33, determining message extraction information according to the target equipment information and the consumption module information.
Specifically, according to the target device information and the consumption module information, a message queue and a consumption module of the corresponding target device can be determined, and further message extraction information for guiding the consumption module to extract messages from the message queue of the target device can be determined.
S34, generating a test engineering package of the message queue of the target equipment according to the Jmeter server information, the target equipment information, the consumption module information, the message placement information and the message extraction information through an Mqmeter plug-in.
Through the Mqmeter plug-in, the information can be integrated into a test engineering packet of a message queue of target equipment in a jar packet form, so that the subsequent execution of the test engineering packet is facilitated for performance test.
In the embodiment of the application, the Jmeter server, the target device and the consumption module are represented by Jmeter server information, target device information and consumption module information, and interaction information between every two is further determined according to the respective information. According to the information of the Jmeter server, the target device and the consumption module and the interaction information between the Jmeter server, the test engineering package of the message queue of the target device with detailed content can be integrated and generated, and the subsequent execution of the test engineering package is facilitated to realize the message transmission among the Jmeter server, the target device and the consumption module.
According to the message queue performance test method provided by the application, the executing the test engineering package comprises the following steps:
s41, establishing a first communication connection between a Jmeter server and the target equipment and a second communication connection between the target equipment and a consumption module according to the Jmeter server information, the target equipment information and the consumption module information;
s42, the Jmeter server sends a message to a message queue of the target device according to the message placement information and the first communication connection;
s43, the consumption module extracts the message from the message queue of the target device according to the message extraction information and the second communication connection.
Specifically, fig. 3 is a schematic diagram illustrating message transmission performed by the simulated message queue, and when executing the test engineering package, first, according to Jmeter server information, target device information and consumption module information in the test engineering package, a first communication connection between the Jmeter server and the target device, and a second communication connection between the target device and the consumption module are established.
After the first communication connection between the Jmeter server and the target device is established, the Jmeter server may determine, according to the message placement information, relevant information required for sending the message to the message queue of the target device, and then send/place the message to the message queue of the target device according to the first communication connection.
After the second communication connection between the target device and the consumption module is established, the consumption module may determine, according to the message extraction message, relevant information required for extracting the message from the message queue of the target device, and further extract, according to the second communication connection, the message sent/placed by the Jmeter server before from the message queue of the target device.
In the embodiment of the application, when the test engineering package is executed, first, a first communication connection between the Jmeter server and the target device and a second communication connection between the target device and the consumption module are established, so that a communication function among the Jmeter server, the target device and the consumption module is realized. And then the Jmeter server sends the message to the message queue of the target equipment through the first communication connection according to the message placement information, and the consumption module extracts the message from the message queue of the target equipment through the second communication connection according to the message extraction information, so that the placement and extraction of the message in the message queue of the target equipment are realized, the situation that the message queue transmits the message is simulated, and a basis is provided for testing the performance of the message queue.
According to the message queue performance test method provided by the application, the target equipment information comprises an IP address, a port number, a user name, a password and message queue information;
step S41 includes:
s51, determining an application interface of the target equipment according to the IP address and the port number;
s52, establishing a first communication connection of the Jmeter server and an application interface of the target device according to the user name and the password;
s53, establishing a second communication connection of the consumption module and the message queue of the target device according to the message queue information.
Specifically, the Jmeter tool is a mainstream tool for implementing performance test of the interface, and the Jmeter tool interfaces with an application interface, so that the Jmeter tool cannot directly interface with a message queue. According to the characteristics of the Jmeter tool, the Jmeter server can send the message to the application interface of the target device corresponding to the message queue, and then the application program of the target device writes/puts the message received by the application interface into the message queue, so that the Jmeter server can send/put the message to the message queue of the target device.
Because the Jmeter server is in butt joint with the interface, firstly, the application interface of the target device is determined according to the IP address and the port number of the target device, and then the server of the message queue (namely the target device) is logged in according to the user name and the password of the target device, namely the first communication connection between the Jmeter server and the application interface of the target device is established.
The consumption module can be directly connected to the message queue of the target device through the message queue information of the target device, and a second communication connection between the consumption module and the message queue of the target device is established.
In this embodiment of the present application, the destination device information includes an IP address, a port number, a user name, a password, and message queue information. Firstly, determining an application interface of target equipment through an IP address and a port number of the target equipment, then establishing a first communication connection between a JMter server and the application interface of the target equipment according to a user name and a password, realizing communication connection between the JMter server and the application interface of the target equipment by establishing the communication connection between the JMter server and the application interface of the target equipment in a manner of the application interface based on characteristics of a JMter tool, and then establishing a second communication connection between a consumption module and a message queue of the target equipment according to message queue information, so as to realize communication connection among the JMter server, the target equipment and the consumption module.
According to the message queue performance test method provided by the application, step S42 includes:
s61, the Jmeter server sends a message to an application interface of the target device according to the message placement information and the first communication connection;
s62, the preset application program of the target equipment writes the message received by the application interface into the message queue.
Specifically, in the embodiment, based on the characteristics of the Jmeter tool, the Jmeter server may send a message to an application interface of the target device corresponding to the message queue, and then the application program of the target device writes/places the message received by the application interface into the message queue, so as to send/place the message to the message queue of the target device.
According to the message queue performance test method provided by the application, the target sampling parameters comprise the queue depth of the message queue, a queue depth field, a read-write performance parameter and response time;
step S24 includes:
s71, monitoring the queue depth, the queue depth field and the read-write performance parameters of the message queue in the process of sending the message and extracting the message through the Mqmeter sampler;
s72, after the message sending is completed, recording the sending time of the message through the Mqmeteter sampler, and after the message extracting is completed, recording the message extracting time;
s73, determining response time of the message queue according to the sending time and the extracting time through the Mqmeter sampler.
Specifically, the queue depth, queue depth field, and read-write performance parameters are directly readable and determinable, while the response time is calculated. Therefore, in the process of sending and extracting the message, the Mqmeteter sampler can directly monitor the attributes such as the queue depth, the queue depth field, the read-write performance parameters and the like of the read message queue.
For the determination of the response time, the time node may be determined to be the sending time after the Jmeter server completes sending/placing the message to the message queue of the target device, and the time node may be determined to be the extraction time after the consumption module extracts the message from the message queue of the target device. The time difference between the two time nodes is calculated, i.e. the time taken to put a message into the message queue and to pull it out of the message queue is determined, resulting in a response time of the message queue.
In the embodiment of the application, through the Mqmeter sampler, the queue depth field and the read-write performance parameters of the message queue can be monitored and determined in real time in the process of sending and extracting the message, and the response time of the message queue is determined through the sending time after the completion of sending the message and the extracting time after the completion of extracting the message, so that the monitoring of a plurality of target sampling parameters is realized, and the monitoring of various indexes in the performance test of the message queue is realized.
According to the message queue performance test method provided by the application, step S25 specifically includes:
and generating a test report and a test result tree of the message queue of the target equipment according to the queue depth of the message queue, the queue depth field, the read-write performance parameter and the response time.
According to the embodiment of the application, the test report of the message queue and the structured test result tree are integrally generated according to the queue depth, the queue depth field, the read-write performance parameters and the response time of the message queue in the message queue performance test process, so that a tester can conveniently check indexes in the test in different forms.
The message queue performance testing device provided by the application is described below, and the message queue performance testing device described below and the message queue performance testing method described above can be referred to correspondingly.
The application further provides a message queue performance testing device, as shown in fig. 4, including:
a preparation unit 41 for loading the Mqmeter plug-in by the Jmeter tool; constructing a test engineering package of a message queue of the target equipment through the Mqmeter plugin; acquiring target sampling parameters, and creating an Mqmeteter sampler by using the Jmeter tool;
a monitoring unit 42, configured to monitor, by using the Mqmeter sampler, information of a target sampling parameter of the message queue during the process of executing the test engineering packet;
a summarizing unit 43, configured to generate a message queue test result of the target device according to the monitored information of the target sampling parameter of the message queue.
In the embodiment of the application, the Mqmeteter plug-in is loaded through the Jmeter tool, the test engineering package of the message queue of the target equipment is constructed through the Mqmeteter plug-in, the Mqmeteter sampler monitors the target sampling parameters in the process of executing the test engineering package, the message transmission scene simulation and the test record of the message queue are realized, the message queue test result of the target equipment is generated according to the information of the target sampling parameters of the monitored message queue, and the performance test of the message queue of the target equipment is completed.
According to the message queue performance test apparatus provided in the present application, the preparation unit 41 is specifically configured to:
determining Jmeter server information, target device information, and consumption module information;
determining message placement information according to the Jmeter server information and the target device information;
determining message extraction information according to the target equipment information and the consumption module information;
and generating a test engineering package of a message queue of the target equipment according to the Jmeter server information, the target equipment information, the consumption module information, the message placement information and the message extraction information through an Mqmeter plug-in.
According to the message queue performance test device provided in the present application, the monitoring unit 42 is further configured to:
establishing a first communication connection between a Jmeter server and the target equipment and a second communication connection between the target equipment and a consumption module according to the Jmeter server information, the target equipment information and the consumption module information;
the Jmeter server sends a message to a message queue of the target device according to the message placement information and the first communication connection;
and the consumption module extracts the message from the message queue of the target equipment according to the message extraction information and the second communication connection.
According to the message queue performance testing device provided by the application, the target equipment information comprises an IP address, a port number, a user name, a password and message queue information;
the listening unit 42 is specifically configured to:
determining an application interface of the target equipment according to the IP address and the port number;
establishing a first communication connection of an application interface of the Jmeter server and the target equipment according to the user name and the password;
and establishing a second communication connection of the message queues of the consumption module and the target equipment according to the message queue information.
According to the message queue performance test device provided in the present application, the monitoring unit 42 is specifically configured to:
sending a message to an application interface of the target device according to the message placement information and the first communication connection through the Jmeter server;
and writing the message received by the application interface into the message queue through a preset application program of the target equipment.
According to the message queue performance test device provided by the application, the target sampling parameters comprise the queue depth of the message queue, a queue depth field, a read-write performance parameter and response time;
the listening unit 42 is specifically configured to:
monitoring the queue depth, the queue depth field and the read-write performance parameters of the message queue in the process of sending the message and extracting the message through the Mqmeter sampler;
recording the sending time of the message after the sending of the message is completed by the Mqmeter sampler, and recording the extracting time of the message after the extracting of the message is completed;
and determining response time of the message queue according to the sending time and the extracting time through the Mqmeteter sampler.
According to the message queue performance test device provided in the present application, the summarizing unit 43 is specifically configured to:
and generating a test report file and a test result tree of the message queue of the target equipment according to the queue depth, the queue depth field, the read-write performance parameter and the response time of the message queue.
Fig. 5 illustrates a physical schematic diagram of an electronic device, as shown in fig. 5, the electronic device may include: processor 510, communication interface (Communications Interface) 520, memory 530, and communication bus 540, wherein processor 510, communication interface 520, memory 530 complete communication with each other through communication bus 540. Processor 510 may invoke logic instructions in memory 530 to perform a message queue performance test method comprising: loading an Mqmeteter plug-in by a Jmeter tool; constructing a test engineering package of a message queue of the target equipment through the Mqmeter plugin; acquiring target sampling parameters, and creating an Mqmeteter sampler by using the Jmeter tool; monitoring information of target sampling parameters of the message queue in the process of executing the test engineering package through the Mqmeteter sampler; and generating a message queue test result of the target equipment according to the monitored information of the target sampling parameters of the message queue.
Further, the logic instructions in the memory 530 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present application further provides a computer program product, where the computer program product includes a computer program, where the computer program can be stored on a computer readable storage medium, where the computer program when executed by a processor can perform a method for testing performance of a message queue provided by the above methods, and the method includes: loading an Mqmeteter plug-in by a Jmeter tool; constructing a test engineering package of a message queue of the target equipment through the Mqmeter plugin; acquiring target sampling parameters, and creating an Mqmeteter sampler by using the Jmeter tool; monitoring information of target sampling parameters of the message queue in the process of executing the test engineering package through the Mqmeteter sampler; and generating a message queue test result of the target equipment according to the monitored information of the target sampling parameters of the message queue.
In still another aspect, the present application further provides a computer readable storage medium, where the computer readable storage medium includes a stored program, where the program executes a method for testing performance of a message queue provided by the above methods, where the method includes: loading an Mqmeteter plug-in by a Jmeter tool; constructing a test engineering package of a message queue of the target equipment through the Mqmeter plugin; acquiring target sampling parameters, and creating an Mqmeteter sampler by using the Jmeter tool; monitoring information of target sampling parameters of the message queue in the process of executing the test engineering package through the Mqmeteter sampler; and generating a message queue test result of the target equipment according to the monitored information of the target sampling parameters of the message queue.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and are not limiting thereof; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the corresponding technical solutions.

Claims (10)

1. A method for testing performance of a message queue, comprising:
loading an Mqmeteter plug-in by a Jmeter tool;
constructing a test engineering package of a message queue of the target equipment through the Mqmeter plugin;
acquiring target sampling parameters, and creating an Mqmeteter sampler by using the Jmeter tool;
monitoring information of target sampling parameters of the message queue in the process of executing the test engineering package through the Mqmeteter sampler;
and generating a message queue test result of the target equipment according to the monitored information of the target sampling parameters of the message queue.
2. The method for testing the performance of the message queue according to claim 1, wherein the constructing, by the Mqmeter plug-in, the test engineering packet of the message queue of the target device comprises:
determining Jmeter server information, target device information, and consumption module information;
determining message placement information according to the Jmeter server information and the target device information;
determining message extraction information according to the target equipment information and the consumption module information;
and generating a test engineering package of a message queue of the target equipment according to the Jmeter server information, the target equipment information, the consumption module information, the message placement information and the message extraction information through an Mqmeter plug-in.
3. The method of claim 2, wherein said executing the test engineering package comprises:
establishing a first communication connection between a Jmeter server and the target equipment and a second communication connection between the target equipment and a consumption module according to the Jmeter server information, the target equipment information and the consumption module information;
the Jmeter server sends a message to a message queue of the target device according to the message placement information and the first communication connection;
and the consumption module extracts the message from the message queue of the target equipment according to the message extraction information and the second communication connection.
4. The message queue performance test method of claim 3, wherein the target device information comprises an IP address, a port number, a user name, a password, and message queue information;
the establishing a first communication connection between the Jmeter server and the target device, and a second communication connection between the target device and the consumption module, includes:
determining an application interface of the target equipment according to the IP address and the port number;
establishing a first communication connection of an application interface of the Jmeter server and the target equipment according to the user name and the password;
and establishing a second communication connection of the message queues of the consumption module and the target equipment according to the message queue information.
5. The method of claim 4, wherein the Jmeter server sending a message to a message queue of the target device according to the message placement information and the first communication connection, comprising:
the Jmeter server sends a message to an application interface of the target device according to the message placement information and the first communication connection;
and writing the message received by the application interface into the message queue by the preset application program of the target equipment.
6. A method of testing the performance of a message queue according to claim 3, wherein the target sampling parameters include a queue depth of the message queue, a queue depth field, a read-write performance parameter, and a response time;
the monitoring, by the Mqmeter sampler, information of the target sampling parameter of the message queue in the process of executing the test engineering package includes:
monitoring the queue depth, the queue depth field and the read-write performance parameters of the message queue in the process of sending the message and extracting the message through the Mqmeter sampler;
recording the sending time of the message after the sending of the message is completed by the Mqmeter sampler, and recording the extracting time of the message after the extracting of the message is completed;
and determining response time of the message queue according to the sending time and the extracting time through the Mqmeteter sampler.
7. The method for testing the performance of a message queue according to claim 6, wherein the generating the message queue test result of the target device according to the monitored information of the target sampling parameter of the message queue comprises:
and generating a test report file and a test result tree of the message queue of the target equipment according to the queue depth, the queue depth field, the read-write performance parameter and the response time of the message queue.
8. A message queue performance testing apparatus, comprising:
a preparation unit for loading the Mqmeter plug-in by the Jmeter tool; constructing a test engineering package of a message queue of the target equipment through the Mqmeter plugin; acquiring target sampling parameters, and creating an Mqmeteter sampler by using the Jmeter tool;
the monitoring unit is used for monitoring the information of the target sampling parameters of the message queue in the process of executing the test engineering packet through the Mqmeter sampler;
and the summarizing unit is used for generating a message queue test result of the target equipment according to the monitored information of the target sampling parameters of the message queue.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored program, wherein the program when run performs the method of any one of claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method according to any of claims 1 to 7 by means of the computer program.
CN202310107638.4A 2023-01-31 2023-01-31 Message queue performance test method and device Pending CN116302877A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310107638.4A CN116302877A (en) 2023-01-31 2023-01-31 Message queue performance test method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310107638.4A CN116302877A (en) 2023-01-31 2023-01-31 Message queue performance test method and device

Publications (1)

Publication Number Publication Date
CN116302877A true CN116302877A (en) 2023-06-23

Family

ID=86800438

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310107638.4A Pending CN116302877A (en) 2023-01-31 2023-01-31 Message queue performance test method and device

Country Status (1)

Country Link
CN (1) CN116302877A (en)

Similar Documents

Publication Publication Date Title
US10958434B1 (en) System and method of detecting end-of-life of internet of things (IoT) device and closing associated block chain
CN113014449A (en) Local communication protocol pressure test method and system of electricity consumption information acquisition system
CN103795762A (en) Reverse agent test system and method
CN103716826A (en) Wireless data service simulated scene-based user experience quality testing method
CN107544837A (en) Cloud service device performance data acquisition system, method and apparatus
CN112256542A (en) eBPF-based micro-service system performance detection method, device and system
CN110912751A (en) Network equipment topological graph generation method and related device
CN108390795A (en) Household appliance and its monitoring method, intelligent domestic system and readable storage medium storing program for executing
CN116048467A (en) Micro-service development platform and business system development method
CN105959174B (en) Testing method and device for intelligent equipment platform
CN109981377B (en) Distributed data center link monitoring method and system
CN116016002A (en) Intelligent household appliance network distribution method and device and electronic device
CN109802842A (en) The generation method and relevant device of applied topology
CN110557292A (en) Topological graph obtaining method, device and equipment based on distributed routing Internet of things
CN116302877A (en) Message queue performance test method and device
CN116360584A (en) Virtual target product generation method and device, storage medium and electronic device
CN116361155A (en) Method and device for testing software development kit, storage medium and electronic device
CN116033006A (en) Data processing method, system, storage medium and electronic device
CN115499333A (en) Method, system, storage medium and electronic device for determining association relationship
CN108363922A (en) A kind of automation malicious code emulation detection method and system
CN114760235B (en) Method and device for executing dial testing task, storage medium and electronic device
CN115174296B (en) Equipment function access method and device, storage medium and electronic device
CN116346686A (en) Information transmission method and device, storage medium and electronic device
CN114756348A (en) Execution method and device of dial testing task, storage medium and electronic device
CN114826899B (en) Debugging method and device for equipment control service, storage medium and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination