CN114020590A - Pressure measurement method and device, electronic equipment and storage medium - Google Patents

Pressure measurement method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114020590A
CN114020590A CN202111107842.3A CN202111107842A CN114020590A CN 114020590 A CN114020590 A CN 114020590A CN 202111107842 A CN202111107842 A CN 202111107842A CN 114020590 A CN114020590 A CN 114020590A
Authority
CN
China
Prior art keywords
pressure measurement
feedback data
pressure
recording
parameters
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
CN202111107842.3A
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.)
Beijing Shareit Information Technology Co Ltd
Original Assignee
Beijing Shareit Information 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 Beijing Shareit Information Technology Co Ltd filed Critical Beijing Shareit Information Technology Co Ltd
Priority to CN202111107842.3A priority Critical patent/CN114020590A/en
Publication of CN114020590A publication Critical patent/CN114020590A/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
    • G06F11/3414Workload generation, e.g. scripts, playback
    • 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/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Computational Linguistics (AREA)
  • Measuring Fluid Pressure (AREA)

Abstract

The disclosed embodiment relates to a pressure measurement method and device, an electronic device and a storage medium, wherein the pressure measurement method comprises the following steps: acquiring a pressure measurement instruction; inquiring configuration data corresponding to the pressure measurement type indicated by the pressure measurement instruction; the configuration data at least comprises: pressure measurement parameters and a pressure measurement process; executing the pressure measurement process based on the pressure measurement parameters; and recording pressure measurement feedback data generated in the pressure measurement process. Therefore, the pressure measurement parameters and the pressure measurement flow information required by different types of pressure measurement are automatically matched and provided, and a user does not need to frequently and manually input parameters and configuration commands, so that the pressure measurement efficiency is greatly improved.

Description

Pressure measurement method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of electronic technologies, and in particular, to a pressure measurement method and apparatus, an electronic device, and a storage medium.
Background
The service pressure test is a conventional pressure test aiming at the stability of resources such as servers and server interfaces provided on line, prevents the condition that the service is unavailable when the large flow works, and ensures the availability and the correctness of the service in a preset range. Service pressure measurement has become a routine measurement link before service is brought online, wherein data preparation of service pressure measurement is particularly important.
In the related art, the configuration sources of the pressure measurement data mainly include a command line mode and a meter pressure measurement script mode. In the command line mode, a user needs to search corresponding command parameters and manual configuration commands and submit pressure measurement commands in a command line window, the process is complicated, parameter omission easily occurs, and the pressure measurement effect is not ideal. And the pressure measurement result can only be observed in a command line window, which is not visual enough. In the Jmeter script mode, although enough pressure measurement data can be collected by the pressure measurement script, the pressure measurement script is used and firstly needs to be provided with software, and secondly needs to be uploaded to a server to execute pressure measurement. Because the pressure measurement data needs to be adjusted in stages, frequent writing and uploading of scripts are time-consuming and labor-consuming, and the working efficiency is low.
The two modes are very inefficient and tedious in the using process, cannot provide real-time pressure measurement conditions for users, and can only provide pressure measurement results after pressure measurement is completely finished.
Disclosure of Invention
The embodiment of the disclosure provides a pressure measurement method and device, electronic equipment and a storage medium.
A first aspect of the embodiments of the present disclosure provides a pressure measurement method, where the method includes:
acquiring a pressure measurement instruction;
inquiring configuration data corresponding to the pressure measurement type indicated by the pressure measurement instruction; the configuration data at least comprises: pressure measurement parameters and a pressure measurement process;
executing the pressure measurement process based on the pressure measurement parameters;
and recording pressure measurement feedback data generated in the pressure measurement process.
Based on the above scheme, the executing the pressure measurement process based on the pressure measurement parameter includes:
generating at least one pressure measurement instance based on the pressure measurement parameters;
and executing the pressure measuring process according to the pressure measuring example.
Based on the above scheme, the recording of pressure measurement feedback data generated in the pressure measurement process includes:
acquiring pressure measurement feedback data corresponding to each pressure measurement instance in the pressure measurement process;
and sending the pressure measurement feedback data to a pressure measurement result database.
Based on the above scheme, sending the pressure measurement feedback data to a pressure measurement result database includes:
writing the ID of the pressure measurement example and the pressure measurement feedback data into a kafka message;
sending the kafka message to a pressure measurement result database; and the kafka message is used for reading and recording pressure measurement feedback data by the pressure measurement result database.
Based on the above scheme, the method further comprises:
acquiring a query instruction;
searching pressure measurement feedback data corresponding to the pressure measurement instance ID carried by the query instruction in a pressure measurement result database;
and outputting the pressure measurement feedback data.
Based on the above scheme, the executing the pressure measurement process based on the pressure measurement parameter includes:
if the pressure measurement type is the jmeter pressure measurement, setting a pressure measurement process based on the pressure measurement parameters;
configuring information of a tested server; the tested server information at least comprises one of the following information: the IP address of the Internet protocol of the tested server, the port number of the tested server and the transmission protocol of the tested server;
configuring a tested server to assert a trigger condition;
generating a pressure measurement fruit tree based on pressure measurement feedback data generated by at least one pressure measurement example in the pressure measurement process; the pressure measurement result tree is used for recording the pressure measurement feedback data according to the execution sequence of the pressure measurement examples;
the recording of pressure measurement feedback data generated in the pressure measurement process includes:
and recording the pressure measurement result tree in a pressure measurement result database.
Based on the above scheme, the pressure measurement feedback data at least includes one of the following: the available memory capacity of the tested server, the response time length of the pressure measurement example and the error report rate corresponding to the pressure measurement example.
Based on the above scheme, the pressure measurement parameters at least include one of the following parameters: the number of pressure measurement threads, the duration time of pressure measurement and the number of pressure measurement cycles.
A second aspect of the embodiments of the present disclosure provides a pressure measurement device, including:
the acquisition unit is used for acquiring a pressure measurement instruction;
the query unit is used for querying configuration data corresponding to the pressure measurement type indicated by the pressure measurement instruction; the configuration data at least comprises: pressure measurement parameters and a pressure measurement process;
the execution unit is used for executing the pressure measurement process based on the pressure measurement parameters;
and the recording unit is used for recording pressure measurement feedback data generated in the pressure measurement process.
Based on the above scheme, the execution unit is specifically configured to:
generating at least one pressure measurement instance based on the pressure measurement parameters;
and executing the pressure measuring process according to the pressure measuring example.
Based on the above scheme, the recording unit is specifically configured to:
acquiring pressure measurement feedback data corresponding to each pressure measurement instance in the pressure measurement process;
and sending the pressure measurement feedback data to a pressure measurement result database.
Based on the above scheme, the recording unit is specifically configured to:
writing the ID of the pressure measurement example and the pressure measurement feedback data into a kafka message;
sending the kafka message to a pressure measurement result database; and the kafka message is used for reading and recording pressure measurement feedback data by the pressure measurement result database.
Based on the above scheme, the obtaining unit is further configured to: acquiring a query instruction;
the device further comprises:
the searching unit is used for searching the pressure measurement feedback data corresponding to the pressure measurement instance ID carried by the query instruction in a pressure measurement result database;
and the output unit is used for outputting the pressure measurement feedback data.
Based on the above scheme, the execution unit is specifically configured to:
if the pressure measurement type is the jmeter pressure measurement, setting a pressure measurement process based on the pressure measurement parameters;
configuring information of a tested server; the tested server information at least comprises one of the following information: the IP address of the Internet protocol of the tested server, the port number of the tested server and the transmission protocol of the tested server;
configuring a tested server to assert a trigger condition;
generating a pressure measurement fruit tree based on pressure measurement feedback data generated by at least one pressure measurement example in the pressure measurement process; the pressure measurement result tree is used for recording the pressure measurement feedback data according to the execution sequence of the pressure measurement examples;
the recording unit is specifically configured to:
and recording the pressure measurement result tree in a pressure measurement result database.
Based on the above scheme, the pressure measurement feedback data at least includes one of the following: the available memory capacity of the tested server, the response time length of the pressure measurement example and the error report rate corresponding to the pressure measurement example.
Based on the above scheme, the pressure measurement parameters at least include one of the following parameters: the number of pressure measurement threads, the duration time of pressure measurement and the number of pressure measurement cycles.
A third aspect of the embodiments of the present disclosure provides an electronic device, including:
a memory for storing processor-executable instructions;
a processor coupled to the memory;
wherein the processor is configured to execute the pressure measurement method provided by any of the above technical solutions.
A fourth aspect of the embodiments of the present disclosure provides a non-transitory computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and when executed by a processor, the computer-executable instructions implement the pressure measurement method provided in any of the foregoing technical solutions.
The pressure measurement method provided by the embodiment of the disclosure comprises the following steps: acquiring a pressure measurement instruction; inquiring configuration data corresponding to the pressure measurement type indicated by the pressure measurement instruction; the configuration data at least comprises: pressure measurement parameters and a pressure measurement process; executing the pressure measurement process based on the pressure measurement parameters; and recording pressure measurement feedback data generated in the pressure measurement process. Therefore, the required pressure measurement parameters, pressure measurement flow information and the like can be automatically matched and provided aiming at different types of pressure measurement processes, and a user does not need to frequently and manually input parameters and configure flow related commands in the pressure measurement process, so that the efficiency and the intelligence of the pressure measurement process are greatly improved. And the pressure measurement feedback data is recorded, so that the pressure measurement condition in the pressure measurement process can be fed back to a user in time, and the poor real-time performance caused by the fact that the pressure measurement result can be output only after the pressure measurement is finished is restrained.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
Fig. 1 is a schematic flow chart diagram illustrating a pressure measurement method according to an embodiment of the present disclosure;
FIG. 2 is a schematic flow chart diagram illustrating a pressure measurement method according to an embodiment of the present disclosure;
FIG. 3 is a schematic flow chart diagram illustrating a pressure measurement method according to an embodiment of the present disclosure;
FIG. 4 is a schematic flow chart diagram illustrating a pressure measurement method according to an embodiment of the present disclosure;
FIG. 5 is a schematic flow chart diagram illustrating a pressure measurement method according to an embodiment of the present disclosure;
FIG. 6 is a schematic structural diagram of a pressure measurement device according to an embodiment of the present disclosure;
fig. 7 is a schematic flow chart of a pressure measurement method according to an embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
As shown in fig. 1, an embodiment of the present disclosure provides a pressure measurement method, including:
s110: acquiring a pressure measurement instruction;
s120: inquiring configuration data corresponding to the pressure measurement type indicated by the pressure measurement instruction; the configuration data at least comprises: pressure measurement parameters and a pressure measurement process;
s130: executing the pressure measurement process based on the pressure measurement parameters;
s140: and recording pressure measurement feedback data generated in the pressure measurement process.
In the embodiment of the present disclosure, the pressure measurement instruction is used to instruct the start of pressure testing on an object such as a designated server and a cloud platform, and may be an instruction issued by a user as required, or an instruction issued automatically by a server according to a certain trigger condition, for example, when it is determined that the server needs to run a certain service, or after it is determined that the server stops working for a certain period of time, the pressure measurement is started automatically.
The pressure measurement instructions are also used to indicate the type of pressure measurement that needs to be performed, such as the type of pressure measurement that may be manually selected by a user. Here, the pressure measurement types may include: apache (ab) pressure measurement, microsoft Research Kernel pressure measurement (Windows Research Kernel, wrk) pressure measurement, jmeter pressure measurement, and the like.
In one embodiment, the pressure measurement method disclosed by the present disclosure may be applied to an online pressure measurement platform, and the platform may collect configuration data required in a pressure measurement process corresponding to each pressure measurement type, and store the configuration data in a pressure measurement configuration database. For example, the configuration data in the execution process may be collected as the configuration data corresponding to each pressure test type by executing at least one test case in each pressure test type in advance. Accordingly, the S120 may include: and searching configuration data corresponding to the pressure measurement type indicated by the pressure measurement instruction in a preset pressure measurement configuration database.
In another embodiment, the configuration data to be collected may also be predefined, for example, the pressure measurement parameters and/or the pressure measurement flow to be collected are defined for each pressure measurement type, and then the configuration data is collected to construct the pressure measurement configuration database. Therefore, the data collection is more standard and reliable, and the condition that the pressure measurement is failed or the pressure measurement result is not credible due to incomplete or incorrect configuration of the pressure measurement data is reduced.
In one embodiment, the configuration data is data required to perform a pressure test, for example, the configuration data may include: pressure measurement parameters, pressure measurement process and the like. The pressure measurement parameters may be working parameters corresponding to different flows or actions in the pressure measurement process, such as data packet capacity used for pressure measurement, pressure measurement cycle, pressure measurement repetition times, and the like. The pressure measurement process may be information such as the number of processes required to perform a complete pressure measurement, the specific content of each process, and the execution sequence of each process.
In another embodiment, in the pressure measurement execution process, different pressure measurement processes perform different operations on the pressure measurement object after execution, and further generate different pressure measurement feedback data, such as resource occupancy of the measured server, response time of the current pressure measurement process, and the like. Therefore, the pressure measurement feedback data can be recorded in real time, for example, in a pressure measurement result database, or the pressure measurement feedback data can be directly output and displayed in the form of a list, a histogram and the like for a user to view in real time.
In an embodiment, the pressure measurement instruction may further carry identification information of the measured object, for example, information such as an Identity Document (ID) of the measured application server, an ID of the measured cloud platform, and the like. After the online pressure measurement platform obtains the pressure measurement instruction, the method may further include: the pressure measurement system of the measured object is determined according to the identification information of the measured object, for example, a history pressure measurement record may be recorded, or a desired pressure measurement system may be acquired by accessing the measured object. Here, the pressure measurement architecture may include at least one pressure measurement node for characterizing different services of the object to be measured, for example, for a game server, a scene output node, a session interaction node, and the like may be included. In the pressure measurement process, each pressure measurement node may include one or more pressure measurement processes.
In one embodiment, after determining the pressure measurement system of the measured object, the method may further include: and outputting all the pressure measurement nodes of the measured object to the user equipment so that the user can select one or more pressure measurement nodes required to execute pressure measurement according to the node test requirement, or sorting the pressure measurement nodes according to parameters such as service processing capacity and/or resource occupancy rate and outputting the sorted pressure measurement nodes to the user equipment as reference.
In another embodiment, when the pressure measurement process includes a pressure measurement forming cycle repeated multiple times, step S130 may include: before one-time pressure measurement is started, determining pressure measurement nodes with abnormal conditions such as pressure measurement failure, error reporting rate higher than a preset threshold value or incomplete pressure measurement in the last-time pressure measurement, and outputting node information of the pressure measurement nodes with the abnormal conditions to user equipment; and according to a selection instruction from the user equipment, determining that the pressure measurement is carried out only on the pressure measurement node with the abnormal condition in the next pressure measurement, or the pressure measurement of all the nodes is still carried out.
Based on the method, the flexibility of the pressure measurement process can be further improved, the pertinence to the nodes with higher test requirements in the measured object can be further improved, and unnecessary repeated pressure measurement processes can be reduced for the pressure measurement nodes without problems.
In yet another embodiment, prior to performing the pressure measurement procedure based on the pressure measurement parameter, the method may further comprise: providing a pressure measurement node working mode selection for a user; if the instruction that the user selects the conventional mode is detected, executing a pressure measurement process that the pressure measurement flow and the pressure measurement node of each pressure measurement are completely consistent; and if the instruction that the user selects the high-efficiency mode is detected, starting from the second pressure measurement, only performing pressure measurement on the pressure measurement node with the abnormal condition in the previous pressure measurement. Therefore, the pressure measurement efficiency can be improved, and the resource occupation can be reduced.
Therefore, the required pressure measurement parameters, pressure measurement flow information and the like can be automatically matched and provided aiming at the pressure measurement processes of different types, and a user can implement pressure measurement only by selecting the pressure measurement type and observe a real-time result. The complex operations of repeatedly modifying command lines, compiling uploading scripts and the like are not needed, and therefore the efficiency and the intelligence of the pressure measurement process are greatly improved. And through recording the pressure measurement feedback data, the pressure measurement condition in the pressure measurement process can be fed back to the user in more time, the poor real-time performance caused by the fact that the pressure measurement result can be output only after the pressure measurement is finished is restrained, and the real-time observation of the pressure measurement condition and the test state of the tested server by the user is met.
In some embodiments, as shown in fig. 2, the S130 may include:
s131: generating at least one pressure measurement instance based on the pressure measurement parameters;
s132: and executing the pressure measuring process according to the pressure measuring example.
In the embodiment of the present disclosure, the pressure measurement process may include one or more pressure measurement instances, and each pressure measurement instance may represent one or more pressure measurement processes, or may also represent one pressure measurement step in one pressure measurement process, so as to implement isolation implementation and effective differentiation of different pressure measurement steps. For example, each pressure measurement instance may have a different Identity (ID), and different pressure measurement instances may be distinguished based on different instance IDs, thereby distinguishing different pressure measurement flows.
In one embodiment, the pressure measurement parameters may include parameters corresponding to different pressure measurement stages and different pressure measurement processes, so that at least one pressure measurement instance may be generated according to a change condition of the pressure measurement parameters or according to a corresponding condition of the pressure measurement parameters and the pressure measurement processes. Wherein, the pressure measurement example comprises part or all of the pressure measurement parameters.
In another embodiment, when the pressure measurement process includes multiple repeated pressure measurement cycles, after one pressure measurement is completed, the next pressure measurement cycle may be adjusted according to the pressure measurement history that has completed the pressure measurement. For example, after the first pressure measurement is finished, a pressure measurement instance set can be formed based on all pressure measurement instances in the first pressure measurement, and the abnormal pressure measurement instance ID with errors occurring in the first pressure measurement, incomplete pressure measurement, or error reporting rate higher than a preset value can be recorded. Before the second pressure measurement is started, the abnormal pressure measurement instance ID may be output to a user, and the user determines whether to execute only the pressure measurement procedure corresponding to the abnormal pressure measurement instance ID in the second pressure measurement, or preferentially execute the pressure measurement procedure corresponding to the abnormal pressure measurement instance ID.
In yet another embodiment, a pressure measurement instance operating mode selection may also be output to a user prior to performing the pressure measurement procedure based on the pressure measurement parameter. For example, if the user selects the conventional pressure measurement, the pressure measurement process in which the pressure measurement flow and the pressure measurement example of each pressure measurement cycle are completely consistent is executed; if the user selects the high-efficiency pressure measurement, the pressure measurement process corresponding to the abnormal pressure measurement instance ID in the second and later pressure measurement cycles can be automatically processed preferentially or only processed. Therefore, the intelligence and the flexibility of the pressure measurement platform for executing pressure measurement can be further improved, the pressure measurement efficiency is further improved, and unnecessary waste of pressure measurement resources is reduced.
Therefore, different pressure measurement flows can be effectively distinguished based on the pressure measurement examples, and then the corresponding pressure measurement flows and the pressure measurement conditions thereof can be accurately searched based on the ID of the pressure measurement examples.
In some embodiments, as shown in fig. 3, the S140 may include:
s141: acquiring pressure measurement feedback data corresponding to each pressure measurement instance in the pressure measurement process;
s142: and sending the pressure measurement feedback data to a pressure measurement result database.
In the embodiment of the present disclosure, each pressure measurement instance may correspond to one pressure measurement process, or correspond to one pressure measurement step in one pressure measurement process. Therefore, pressure measurement feedback data corresponding to one pressure measurement example is obtained, namely pressure measurement feedback data generated in the process of one pressure measurement flow or one pressure measurement step is obtained.
In one embodiment, the pressure measurement feedback data can be acquired in real time, and the corresponding pressure measurement feedback data is recorded based on the ID of the pressure measurement example, so that the pressure measurement feedback data of each pressure measurement example can be uniformly recorded. Correspondingly, the pressure measurement feedback data is sent to the pressure measurement result database, and the pressure measurement feedback data corresponding to each pressure measurement instance ID can be sent to the pressure measurement result database for recording according to the execution sequence of the pressure measurement instances.
In another embodiment, the pressure measurement feedback data corresponding to the pressure measurement instance may be output and displayed in real time, or the pressure measurement instance ID of the currently performed pressure measurement instance may be output and the pressure measurement feedback data may be correspondingly displayed, so that the user may grasp the pressure measurement completion in real time and feed back the state of the server to be measured.
In one embodiment, the pressure measurement instance ID corresponding to the pressure measurement instance whose incomplete pressure measurement instance, error reporting rate is higher than the preset threshold and/or response duration is higher than the preset duration may also be recorded as abnormal pressure measurement instance information and stored in the pressure measurement feedback data, and the pressure measurement feedback data may be sent to the pressure measurement result database.
In yet another embodiment, the pressure measurement nodes with errors and error reporting rates higher than the preset threshold or incomplete pressure measurement in the pressure measurement example can be recorded as abnormal pressure measurement node information and stored in the pressure measurement feedback data, and the pressure measurement feedback data is sent to the pressure measurement result database.
In some embodiments, as shown in fig. 4, the S142 may include:
s1421: writing the ID of the pressure measurement example and the pressure measurement feedback data into a kafka message;
s1422: sending the kafka message to a pressure measurement result database; and the kafka message is used for reading and recording pressure measurement feedback data by the pressure measurement result database.
In the embodiment of the present disclosure, after pressure measurement feedback data is obtained in real time, the current pressure measurement instance ID and the obtained pressure measurement feedback data may be packaged and written in the kafka message, or after obtaining all pressure measurement feedback data corresponding to one pressure measurement instance is completed, the current pressure measurement instance ID and all corresponding pressure measurement feedback data may be packaged and written in the kafka message.
In one embodiment, after receiving the kafka message, the pressure measurement result database reads the pressure measurement instance ID and the pressure measurement feedback data recorded therein, and records the corresponding relationship between the pressure measurement instance ID and the pressure measurement feedback data. And respectively recording all pressure measurement feedback data corresponding to each pressure measurement instance ID in a pressure measurement result database so as to effectively distinguish the pressure measurement feedback data correspondingly generated in different pressure measurement processes or pressure measurement steps.
Since the kafka messages can automatically form a message queue according to the generation sequence, the pressure measurement feedback data in the pressure measurement result database can form a sequence according to the generation sequence or the sending sequence of the kafka messages. Therefore, the pressure measurement feedback data do not need to be arranged again according to the execution sequence of the pressure measurement examples by the pressure measurement result database, and the workload of data processing and integration is greatly reduced.
In some embodiments, as shown in fig. 5, the method further comprises:
s150: acquiring a query instruction;
s160: searching pressure measurement feedback data corresponding to the pressure measurement instance ID carried by the query instruction in a pressure measurement result database;
s170: and outputting the pressure measurement feedback data.
In the embodiment of the disclosure, the pressure measurement feedback data can be output and displayed in real time, and a query instruction carrying the ID of the pressure measurement instance to be checked can be issued when the user needs to check the pressure measurement progress condition and the test state of the tested server.
In one embodiment, if it is determined that the pressure measurement instance corresponding to the pressure measurement instance ID carried in the query instruction is completed, all pressure measurement feedback data corresponding to the pressure measurement instance ID may be output for the user to view. If it is determined that the pressure measurement instance corresponding to the pressure measurement instance ID carried in the query instruction is not complete, the acquired pressure measurement feedback data corresponding to the pressure measurement instance ID can be output, and on the basis, the acquired pressure measurement feedback data corresponding to the pressure measurement instance ID can be output in the same manner after the remaining pressure measurement feedback data of the pressure measurement instance are acquired, so that a user can view the complete pressure measurement feedback data of the pressure measurement instance.
In another embodiment, the abnormal pressure measurement instance information and/or the abnormal pressure measurement node information in the corresponding pressure measurement feedback data can be determined according to the pressure measurement instance ID in the query instruction and provided to the user as a reference.
Therefore, the required pressure measurement feedback data can be accurately provided based on the viewing requirements of the user, the viewing real-time performance of the pressure measurement process can be greatly improved, the situation that the pressure measurement result is completely output due to the fact that different pressure measurement flows cannot be finely distinguished can be restrained, and the output data volume is greatly reduced. Therefore, the method is more beneficial for the user to master the proceeding condition of the pressure measurement process and the response state of the tested server under different pressure measurement examples.
In some embodiments, the S130 may include:
if the pressure measurement type is the jmeter pressure measurement, setting a pressure measurement process based on the pressure measurement parameters;
configuring information of a tested server; the tested server information at least comprises one of the following information: the IP address of the Internet protocol of the tested server, the port number of the tested server and the transmission protocol of the tested server;
configuring a tested server to assert a trigger condition;
generating a pressure measurement fruit tree based on pressure measurement feedback data generated by at least one pressure measurement example in the pressure measurement process; the pressure measurement result tree is used for recording the pressure measurement feedback data according to the execution sequence of the pressure measurement examples;
the S140 may include:
and recording the pressure measurement result tree in a pressure measurement result database.
In the embodiment of the present invention, the execution of the pressure measurement process of the jmeter pressure measurement may include the following process stages: configuring the tested server information, which may be set for a collection thread group and/or a tested service configuration, for example, the setting for the collection thread group may include determining a starting thread number, a duration, a cycle number, and the like; the service configuration to be tested may include an Internet Protocol (IP) address of the server to be tested, a port number of the server to be tested, a transmission Protocol of the server to be tested, a transmission interface of the server to be tested, and the like.
In one embodiment, the configuration of the server under test to assert the trigger condition may be to set the assertion of the service under test. Here, the assertion is an instruction for the server to automatically enable or terminate certain operations during the pressure measurement process based on the detection of a certain trigger condition. For example, when the occupancy rate of the tested server resource is detected to exceed a preset threshold value, the current pressure test process is terminated by assertion, or a server protection program is started.
In another embodiment, if the server under test triggers assertion during the execution of one pressure measurement instance, the pressure measurement node where the assertion is located is determined and recorded as abnormal pressure measurement node information, and/or the pressure measurement instance ID corresponding to the assertion is determined and recorded as abnormal pressure measurement instance information.
In another embodiment, the abnormal pressure measurement node information and/or the abnormal pressure measurement instance information may be stored in a pressure measurement result tree and recorded in a pressure measurement result database.
In another embodiment, a pressure measurement result tree is generated based on pressure measurement feedback data generated by at least one pressure measurement example in the pressure measurement process, where the pressure measurement result tree may be an execution sequence of the pressure measurement examples, or may also display, in multiple cycles of the pressure measurement process, corresponding pressure measurement feedback data under the same pressure measurement flow in the multiple cycles in a time sequence. Therefore, the pressure measurement instance ID and the corresponding pressure measurement feedback data are summarized and displayed, so that a user can conveniently check information such as the pressure measurement progress and the feedback data according to the result tree.
In one embodiment, the pressure measurement result is recorded in the pressure measurement result database, and the pressure measurement example ID can be summarized and displayed for all pressure measurement feedback data in one complete pressure measurement process, so that the same number of pressure measurement result trees as the number of cycles are generated for the pressure measurement process of multiple cycles. Pressure measurement feedback data generated in the pressure measurement process of multiple cycles can be recorded in the same pressure measurement result tree, so that a user can compare the feedback states of the server of the multiple cycles.
In some embodiments, the pressure measurement feedback data includes at least one of: the available memory capacity of the tested server, the response time length of the pressure measurement example and the error report rate corresponding to the pressure measurement example.
Here, the available memory capacity of the server under test may be expressed as a current memory availability of the server under test, a memory occupancy of the server under test, and the like. The response duration of the pressure measurement instance may be the response duration of the server under test from the start time to the end time of the pressure measurement instance counted after the current pressure measurement instance is completed. The error reporting rate corresponding to the pressure measurement instance may be an error rate generated by the server under test in the pressure measurement instance execution process after the pressure measurement instance is completed.
In one embodiment, the pressure measurement feedback data may further include: the data of the processing resource occupancy rate, the disk space availability rate, the average response speed of the tested server and the like of a Central Processing Unit (CPU) of the host where the tested server is located.
In some embodiments, the pressure measurement parameters include at least one of: the number of pressure measurement threads, the duration time of pressure measurement and the number of pressure measurement cycles.
In an embodiment of the present disclosure, the number of pressure measurement threads represents the number of a plurality of pressure measurement threads that are performed synchronously. The pressure measurement duration may be an execution time required for each pressure measurement process, and/or a total time required for the pressure measurement process, and the like. The pressure measurement cycle number represents the number of times that pressure measurement needs to be repeatedly performed in the pressure measurement process.
In one embodiment, the pressure measurement parameters may further include a period of a single pressure measurement cycle, a time interval between two adjacent pressure measurement cycles, a size of a data packet sent to the server under test for performing the pressure test, and the like.
As shown in fig. 6, an embodiment of the present disclosure provides a pressure measurement apparatus, including:
an acquiring unit 10 configured to acquire a pressure measurement instruction;
the query unit 20 is configured to query configuration data corresponding to the pressure measurement type indicated by the pressure measurement instruction; the configuration data at least comprises: pressure measurement parameters and a pressure measurement process;
an execution unit 30, configured to execute the pressure measurement process based on the pressure measurement parameter;
and the recording unit 40 is used for recording pressure measurement feedback data generated in the pressure measurement process.
In some embodiments, the execution unit 30 is specifically configured to:
generating at least one pressure measurement instance based on the pressure measurement parameters;
and executing the pressure measuring process according to the pressure measuring example.
In some embodiments, the recording unit 40 is specifically configured to:
acquiring pressure measurement feedback data corresponding to each pressure measurement instance in the pressure measurement process;
and sending the pressure measurement feedback data to a pressure measurement result database.
In some embodiments, the recording unit 40 is specifically configured to:
writing the ID of the pressure measurement example and the pressure measurement feedback data into a kafka message;
sending the kafka message to a pressure measurement result database; and the kafka message is used for reading and recording pressure measurement feedback data by the pressure measurement result database.
In some embodiments, the obtaining unit 10 is further configured to:
acquiring a query instruction;
the device further comprises:
the searching unit is used for searching the pressure measurement feedback data corresponding to the pressure measurement instance ID carried by the query instruction in a pressure measurement result database;
and the output unit is used for outputting the pressure measurement feedback data.
In some embodiments, the execution unit 30 is specifically configured to:
if the pressure measurement type is the jmeter pressure measurement, setting a pressure measurement process based on the pressure measurement parameters;
configuring information of a tested server; the tested server information at least comprises one of the following information: the IP address of the Internet protocol of the tested server, the port number of the tested server and the transmission protocol of the tested server;
configuring a tested server to assert a trigger condition;
generating a pressure measurement fruit tree based on pressure measurement feedback data generated by at least one pressure measurement example in the pressure measurement process; the pressure measurement result tree is used for recording the pressure measurement feedback data according to the execution sequence of the pressure measurement examples;
the recording unit 40 is specifically configured to:
and recording the pressure measurement result tree in a pressure measurement result database.
In some embodiments, the pressure measurement feedback data includes at least one of: the available memory capacity of the tested server, the response time length of the pressure measurement example and the error report rate corresponding to the pressure measurement example.
In some embodiments, the pressure measurement parameters include at least one of: the number of pressure measurement threads, the duration time of pressure measurement and the number of pressure measurement cycles.
One specific example is provided below in connection with any of the embodiments described above:
as shown in fig. 7, the embodiment of the present disclosure provides a platform for generating a pressure measurement configuration on line, aiming at the problems that the processes of command line pressure measurement and script pressure measurement are complicated, the operation is not easy, and the pressure measurement result cannot be observed in real time.
Firstly, a user manually selects a pressure measurement type on line, a platform outputs corresponding pressure measurement specifications and flow filling information, and a background automatically generates corresponding pressure measurement data;
secondly, according to the pressure measurement type, a user can directly execute pressure measurement on the pressure measurement platform;
and finally, automatically collecting real-time pressure measurement results by the platform.
Therefore, by defining the flow and standardization of different pressure measurement types, the data collection is more standard and reliable, and the problems of pressure measurement failure or low confidence rate of pressure measurement effect caused by incomplete or incorrect pressure measurement data configuration are solved. The process operation is simpler and more efficient, and the user can implement pressure measurement and observe a real-time result only by selecting a pressure measurement type and submitting pressure measurement configuration. And complicated and inefficient operations such as repeatedly modifying command lines or scripts, uploading scripts and the like are not needed.
Specifically, the embodiment of the present disclosure provides a specific scheme for constructing a streamlined and normalized online pressure measurement platform system:
1) the online pressure measurement platform is standardized and configured in a flow pressure measurement mode:
normalization: for basic pressure measurement and simple pressure measurement parameters, collecting the parameters necessary for pressure measurement and making clear description on the parameters, such as parameters in ab and wrk pressure measurement, so as to play a role in standardizing the parameters;
the process is as follows: for complex pressure measurement configuration, a plurality of steps are required to be specified and completed, each step is clearly illustrated, and a flow function is achieved. For example: jmeter pressure we will collect it in four procedural operations:
the first step is as follows: collecting thread group setting: initial thread number, duration, cycle number;
the second step is that: service configuration under test: the IP and port number, protocol, interface, etc. being serviced;
the third step: setting the assertion condition of the tested service;
the fourth step: setting and checking results of the fruiting trees, and the like.
2) The adjusting and optimizing pressure measurement machine is characterized in that various types of pressure measurement plug-ins or clients are installed on a server for deploying a pressure measurement platform, and a user can apply pressure conveniently.
3) Collecting/previewing the pressure measurement result in real time:
and (3) data collection stage: newly designing a pressure measurement result database for storing and updating real-time pressure measurement results;
and (3) data collection stage: updating the database in real time according to the pressure measurement result through kafka information;
and (3) a preview stage: and reading the pressure measurement result in real time according to the pressure measurement example ID, wherein the reading comprises the following steps: memory capacity, CPU state, disk capacity, response time, error rate, etc. of server under test
An embodiment of the present disclosure provides an electronic device, including:
a memory for storing processor-executable instructions;
a processor connected with the memory;
wherein the processor is configured to execute the pressure measurement method provided by any of the above technical solutions.
The processor may include various types of storage media, which are non-transitory computer storage media capable of continuing to remember the information stored thereon after a power failure of the electronic device.
The processor may be connected to the memory via a bus or the like for reading the executable program stored in the memory, for example, to be able to perform one or more of the methods described in the preceding claims.
An embodiment of the present disclosure shows a structure of an electronic device. The electronic device includes a processing component that further includes one or more processors, and memory resources, represented by memory, for storing instructions, such as application programs, that are executable by the processing component. The application program stored in the memory may include one or more modules that each correspond to a set of instructions. Furthermore, the processing component is configured to execute the instructions to perform any of the methods described above as applied to the electronic device, for example, the methods described in one or more of the preceding claims.
The electronic device may also include a power supply component configured to perform power management of the electronic device, a wired or wireless network interface configured to connect the electronic device to a network, and an input-output (I/O) interface. The electronic device may operate based on an operating system stored in memory, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, or the like.
The embodiment of the present disclosure provides a non-transitory computer-readable storage medium, and when instructions in the storage medium are executed by a processor of a computer, the computer is enabled to execute the pressure measurement method according to one or more of the foregoing technical solutions.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (18)

1. A method of pressure measurement, the method comprising:
acquiring a pressure measurement instruction;
inquiring configuration data corresponding to the pressure measurement type indicated by the pressure measurement instruction; the configuration data at least comprises: pressure measurement parameters and a pressure measurement process;
executing the pressure measurement process based on the pressure measurement parameters;
and recording pressure measurement feedback data generated in the pressure measurement process.
2. The method of claim 1, wherein the performing the pressure measurement procedure based on the pressure measurement parameter comprises:
generating at least one pressure measurement instance based on the pressure measurement parameters;
and executing the pressure measuring process according to the pressure measuring example.
3. The method of claim 2, wherein the recording pressure measurement feedback data generated during the pressure measurement process comprises:
acquiring pressure measurement feedback data corresponding to each pressure measurement instance in the pressure measurement process;
and sending the pressure measurement feedback data to a pressure measurement result database.
4. The method of claim 3, wherein sending the pressure measurement feedback data to a pressure measurement results database comprises:
writing the ID of the pressure measurement example and the pressure measurement feedback data into a kafka message;
sending the kafka message to a pressure measurement result database; and the kafka message is used for reading and recording pressure measurement feedback data by the pressure measurement result database.
5. The method of claim 4, further comprising:
acquiring a query instruction;
searching pressure measurement feedback data corresponding to the pressure measurement instance ID carried by the query instruction in a pressure measurement result database;
and outputting the pressure measurement feedback data.
6. The method of claim 1, wherein the performing the pressure measurement procedure based on the pressure measurement parameter comprises:
if the pressure measurement type is the jmeter pressure measurement, setting a pressure measurement process based on the pressure measurement parameters;
configuring information of a tested server; the tested server information at least comprises one of the following information: the IP address of the Internet protocol of the tested server, the port number of the tested server and the transmission protocol of the tested server;
configuring a tested server to assert a trigger condition;
generating a pressure measurement fruit tree based on pressure measurement feedback data generated by at least one pressure measurement example in the pressure measurement process; the pressure measurement result tree is used for recording the pressure measurement feedback data according to the execution sequence of the pressure measurement examples;
the recording of pressure measurement feedback data generated in the pressure measurement process includes:
and recording the pressure measurement result tree in a pressure measurement result database.
7. The method of claim 2, wherein the pressure measurement feedback data includes at least one of: the available memory capacity of the tested server, the response time length of the pressure measurement example and the error report rate corresponding to the pressure measurement example.
8. The method of claim 1, wherein the pressure measurement parameters include at least one of: the number of pressure measurement threads, the duration time of pressure measurement and the number of pressure measurement cycles.
9. A pressure measurement device, the device comprising:
the acquisition unit is used for acquiring a pressure measurement instruction;
the query unit is used for querying configuration data corresponding to the pressure measurement type indicated by the pressure measurement instruction; the configuration data at least comprises: pressure measurement parameters and a pressure measurement process;
the execution unit is used for executing the pressure measurement process based on the pressure measurement parameters;
and the recording unit is used for recording pressure measurement feedback data generated in the pressure measurement process.
10. The apparatus according to claim 9, wherein the execution unit is specifically configured to:
generating at least one pressure measurement instance based on the pressure measurement parameters;
and executing the pressure measuring process according to the pressure measuring example.
11. The apparatus according to claim 10, wherein the recording unit is specifically configured to:
acquiring pressure measurement feedback data corresponding to each pressure measurement instance in the pressure measurement process;
and sending the pressure measurement feedback data to a pressure measurement result database.
12. The apparatus according to claim 11, wherein the recording unit is specifically configured to:
writing the ID of the pressure measurement example and the pressure measurement feedback data into a kafka message;
sending the kafka message to a pressure measurement result database; and the kafka message is used for reading and recording pressure measurement feedback data by the pressure measurement result database.
13. The apparatus of claim 12, wherein the obtaining unit is further configured to: acquiring a query instruction;
the device further comprises:
the searching unit is used for searching the pressure measurement feedback data corresponding to the pressure measurement instance ID carried by the query instruction in a pressure measurement result database;
and the output unit is used for outputting the pressure measurement feedback data.
14. The apparatus according to claim 9, wherein the execution unit is specifically configured to:
if the pressure measurement type is the jmeter pressure measurement, setting a pressure measurement process based on the pressure measurement parameters;
configuring information of a tested server; the tested server information at least comprises one of the following information: the IP address of the Internet protocol of the tested server, the port number of the tested server and the transmission protocol of the tested server;
configuring a tested server to assert a trigger condition;
generating a pressure measurement fruit tree based on pressure measurement feedback data generated by at least one pressure measurement example in the pressure measurement process; the pressure measurement result tree is used for recording the pressure measurement feedback data according to the execution sequence of the pressure measurement examples;
the recording unit is specifically configured to:
and recording the pressure measurement result tree in a pressure measurement result database.
15. The apparatus of claim 10, wherein the pressure measurement feedback data comprises at least one of: the available memory capacity of the tested server, the response time length of the pressure measurement example and the error report rate corresponding to the pressure measurement example.
16. The apparatus of claim 9, wherein the pressure measurement parameter comprises at least one of: the number of pressure measurement threads, the duration time of pressure measurement and the number of pressure measurement cycles.
17. An electronic device, comprising:
a memory for storing processor-executable instructions;
a processor coupled to the memory;
wherein the processor is configured to perform the pressure measurement method as provided in any one of claims 1 to 8.
18. A non-transitory computer-readable storage medium having stored therein computer-executable instructions that, when executed by a processor, implement the pressure measurement method provided in any one of claims 1 to 8.
CN202111107842.3A 2021-09-22 2021-09-22 Pressure measurement method and device, electronic equipment and storage medium Pending CN114020590A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111107842.3A CN114020590A (en) 2021-09-22 2021-09-22 Pressure measurement method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111107842.3A CN114020590A (en) 2021-09-22 2021-09-22 Pressure measurement method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114020590A true CN114020590A (en) 2022-02-08

Family

ID=80054477

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111107842.3A Pending CN114020590A (en) 2021-09-22 2021-09-22 Pressure measurement method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114020590A (en)

Similar Documents

Publication Publication Date Title
CN107341098B (en) Software performance testing method, platform, equipment and storage medium
CN111400186B (en) Performance test method and system
CN111835584A (en) Inspection method and device for products of Internet of things, computer equipment and storage medium
CN110750458A (en) Big data platform testing method and device, readable storage medium and electronic equipment
CN110502366B (en) Case execution method, device, equipment and computer readable storage medium
CN112269697B (en) Equipment storage performance testing method, system and related device
CN111563014A (en) Interface service performance test method, device, equipment and storage medium
CN111949545A (en) Automatic testing method, system, server and storage medium
CN115826521B (en) Production process control method and device, electronic equipment and storage medium
CN113127356A (en) Pressure measurement method and device, electronic equipment and storage medium
CN111258973A (en) Storage and display method, device, equipment and medium of Redis slow log
CN109857643A (en) A kind of method and device of virtual platform performance automatic test
CN116302989A (en) Pressure testing method and system, storage medium and computer equipment
CN114817213A (en) Server database tuning test method, device, terminal and storage medium
CN106598793B (en) Test system and test method based on BIOS serial port log data
CN107273296A (en) The method of testing and test device of a kind of software
CN117411804A (en) Server network testing method and device, electronic equipment and storage medium
CN114020590A (en) Pressure measurement method and device, electronic equipment and storage medium
CN115248782B (en) Automatic testing method and device and computer equipment
CN113238901B (en) Multi-device automatic testing method and device, storage medium and computer device
CN113722240B (en) Stability testing method and system for linux operating system management platform
CN111666200A (en) Testing method and terminal for time consumption of cold start of PC software
CN115952098A (en) Performance test tuning scheme recommendation method and system
CN114268569B (en) Configurable network operation and maintenance acceptance test method and device
CN113918459A (en) Self-detection method for script performance test

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