CN112115029A - Performance test method and device, computer equipment and computer readable storage medium - Google Patents

Performance test method and device, computer equipment and computer readable storage medium Download PDF

Info

Publication number
CN112115029A
CN112115029A CN202011040376.7A CN202011040376A CN112115029A CN 112115029 A CN112115029 A CN 112115029A CN 202011040376 A CN202011040376 A CN 202011040376A CN 112115029 A CN112115029 A CN 112115029A
Authority
CN
China
Prior art keywords
test
distributed
performance
performance test
distributed system
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
CN202011040376.7A
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.)
Bank of China Ltd
Original Assignee
Bank of China 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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202011040376.7A priority Critical patent/CN112115029A/en
Publication of CN112115029A publication Critical patent/CN112115029A/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/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3006Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/865Monitoring of software

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a performance testing method and a device, computer equipment and a computer readable storage medium, wherein the method comprises the following steps: controlling a pressure testing tool to perform pressure testing on the distributed nodes to be tested according to a testing control script of a pre-configured distributed system, and controlling a node monitoring tool to monitor the distributed nodes to be tested; acquiring performance test data of the distributed system by using a pre-configured acquisition probe of the distributed system; matching the collected performance test indexes according to a pre-configured data exception rule base; and when the performance test indexes are matched with the data exception rules in the data exception rule base, outputting a performance test result according to the system log of the distributed node to be tested. The invention can realize the closed loop of the performance test of the distributed system through the pre-configured control script, thereby greatly improving the efficiency of the performance test of the distributed system.

Description

Performance test method and device, computer equipment and computer readable storage medium
Technical Field
The present invention relates to the field of system testing technologies, and in particular, to a performance testing method and apparatus, a computer device, and a computer-readable storage medium.
Background
This section is intended to provide a background or context to the embodiments of the invention that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
With the rise of distributed systems, enterprises are actively exploring to move down host systems. Compared with the traditional host centralized system, the distributed system has lower cost, but has larger scale and more system roles, and simultaneously, the calling relationship of the distributed system is more complicated. Therefore, it is very important to perform performance testing on the distributed system before production to obtain the capacity, expansion capability, and the like of the distributed system.
The characteristics of the distributed system determine that the performance test of the distributed system has the following problems: 1. the large scale of the distributed system leads to slow positioning of abnormal problems, and nodes presenting abnormal conditions cannot be found out quickly; 2. the number of introduction points of performance problems caused by more roles of the distributed system is increased; 3. the calling relationship of the distributed system is more complex, so that a certain performance problem of a certain layer of the distributed system can cause multi-layer chain reaction, the problem is difficult to locate, and a large amount of experienced manual work is required to participate in analysis. The performance test difficulty of the distributed system is greatly increased due to the problems, and the test efficiency is subject to the problems.
Therefore, the performance test of the existing distributed system has the problem of low test efficiency.
Disclosure of Invention
The embodiment of the invention provides a performance test method, which is used for improving the efficiency of performance test of a distributed system and comprises the following steps:
according to a test control script of a pre-configured distributed system, a control script of a pressure test tool is used for controlling the pressure test tool to perform pressure test on a distributed node to be tested, and a control script of a node monitoring tool is used for controlling a node monitoring tool to monitor the distributed node to be tested; the test control script comprises a control script of a distributed node to be tested, a pressure test tool and a node monitoring tool of the distributed system;
acquiring performance test data of the distributed system by using a pre-configured acquisition probe of the distributed system; the performance test data comprises a system log of the distributed node to be tested, a pressure test tool and a performance test index of the node monitoring tool;
matching the collected performance test indexes according to a pre-configured data exception rule base;
and when the performance test indexes are matched with the data exception rules in the data exception rule base, outputting a performance test result according to the system log of the distributed node to be tested.
The embodiment of the invention also provides a performance testing device, which is used for improving the efficiency of the performance test of the distributed system, and the performance testing device comprises:
the test control module is used for controlling the pressure test tool to perform pressure test on the distributed node to be tested by using the control script of the pressure test tool according to the test control script of the pre-configured distributed system, and controlling the node monitoring tool to monitor the distributed node to be tested by using the control script of the node monitoring tool; the test control script comprises a control script of a distributed node to be tested, a pressure test tool and a node monitoring tool of the distributed system;
the data acquisition module is used for acquiring performance test data of the distributed system by using a pre-configured acquisition probe of the distributed system; the performance test data comprises a system log of the distributed node to be tested, a pressure test tool and a performance test index of the node monitoring tool;
the abnormal rule matching module is used for matching the acquired performance test indexes according to a pre-configured data abnormal rule base;
and the result output module is used for outputting the performance test result according to the system log of the distributed node to be tested when the performance test index is matched with the data exception rule in the data exception rule base.
The embodiment of the invention also provides computer equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the performance test method is realized when the processor executes the computer program.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program for executing the performance testing method is stored in the computer-readable storage medium.
In the embodiment of the invention, the pressure testing tool is controlled to carry out pressure testing on the distributed nodes to be tested according to the configured control script, and meanwhile, the node monitoring tool is controlled to monitor the distributed nodes to be tested according to the configured control script; acquiring performance test data of the distributed system by using the configured acquisition probe; further matching the collected performance test indexes according to the configured data exception rule base; and finally, outputting a performance test result according to the system log of the distributed node to be tested during matching, so that closed loop of performance test of the distributed system can be realized through a pre-configured control script, and the efficiency of performance test of the distributed system is greatly improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts. In the drawings:
fig. 1 is a flowchart of an implementation of a performance testing method according to an embodiment of the present invention;
FIG. 2 is a flow chart of another implementation of a performance testing method according to an embodiment of the present invention;
FIG. 3 is a flowchart of another implementation of the performance testing method according to the embodiment of the present invention;
FIG. 4 is a functional block diagram of a performance testing apparatus according to an embodiment of the present invention;
FIG. 5 is a block diagram of another embodiment of a performance testing apparatus;
fig. 6 is a functional block diagram of a performance testing apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention.
Fig. 1 shows an implementation flow of a performance testing method provided by an embodiment of the present invention, and for convenience of description, only a part related to the embodiment of the present invention is shown, and the following details are described:
as shown in fig. 1, a performance testing method includes:
step 101, according to a test control script of a pre-configured distributed system, a control script of a pressure test tool is used for controlling the pressure test tool to perform pressure test on a distributed node to be tested, and a control script of a node monitoring tool is used for controlling a node monitoring tool to monitor the distributed node to be tested; the test control script comprises a control script of a distributed node to be tested, a pressure test tool and a node monitoring tool of the distributed system;
102, acquiring performance test data of the distributed system by using a pre-configured acquisition probe of the distributed system; the performance test data comprises a system log of the distributed node to be tested, a pressure test tool and a performance test index of the node monitoring tool;
103, matching the acquired performance test indexes according to a preset data exception rule base;
and 104, when the performance test indexes are matched with the data exception rules in the data exception rule base, outputting a performance test result according to the system log of the distributed node to be tested.
In the embodiment of the invention, the distributed system comprises a plurality of distributed nodes, and the distributed nodes to be tested can be flexibly selected when the performance pressure test of the distributed system is carried out. The number of distributed nodes to be tested can be one or more. Before the performance test of the distributed system, the test control script, the acquisition probe, the abnormal rule database and the like of the distributed system can be configured and maintained in advance, that is, the preparation work before the performance test of the distributed system is carried out, so as to deploy the environment for the performance test of the distributed system.
The test control script of the pre-configured distributed system is a control script when the distributed system is tested, and mainly comprises the following information: distributed nodes to be tested in the distributed system, a control script of a pressure testing tool and a control script of a node monitoring tool. When the performance of the distributed system is tested, the pressure testing tool is controlled to carry out pressure testing on the distributed nodes to be tested by utilizing the control script of the pressure testing tool in the test control script; meanwhile, the node monitoring tool is controlled to monitor the distributed nodes to be tested by using the control script of the node monitoring tool.
The pressure testing tool is a pressure testing tool commonly used in the testing field, and can be distinguished according to different specific programming languages. The pressure testing tool may be, for example, a popular mainstream pressure testing tool kylinTOP testing and monitoring platform, a pressure testing tool such as LoadRunner, Apache meter, or other pressure testing tools besides the foregoing, for example, a pressure testing tool such as Neoload, WebLOAD, or the like, which is not limited in particular by the embodiment of the present invention.
In addition, the node monitoring tool is a node monitoring tool commonly used in the test field, and can be distinguished according to different specific programming languages or have different functions due to application scenarios. For example, the node monitoring tool may be a Stagemonitor node monitoring tool, and may also be a Pinpoint node monitoring tool, and it is understood by those skilled in the art that the node monitoring tool may also be other node monitoring tools than the above, such as a mosjito node monitoring tool, a glowroowroot node monitoring tool, and a Kamon node monitoring tool, which is not limited in particular by the embodiment of the present invention.
After the pressure testing tool is used for carrying out pressure testing on the distributed node to be tested and the node monitoring tool is used for monitoring the distributed node to be tested, the pre-configured acquisition probes of the distributed system are used for acquiring performance testing data of the distributed system. In order to ensure the accuracy of the performance test, the performance test data of the distributed system collected by the collecting probe may include a system log of the distributed node to be tested, a performance test index of the pressure test tool, and a performance test index of the node monitoring tool. The performance test indexes may include, for example, response time of the distributed nodes, transaction success rate, CPU occupancy, and the like. It will be understood by those skilled in the art that the performance test indicator may be other performance test indicators besides the performance test indicator described above, such as concurrent transaction amount, etc., and the embodiment of the present invention is not limited thereto.
And after the performance test indexes are acquired by using the acquisition probe, matching the performance test indexes according to the configured data exception rule base. The data exception rule base comprises data exception rules which are common in distributed system testing. For example, the data exception rule base may include that the response time of the distributed node exceeds a preset response time threshold, or the transaction success rate is smaller than a preset success rate threshold, and the like.
The preset response time threshold is a preset response time threshold, and a person skilled in the art can preset the preset response time threshold according to actual conditions and specific requirements. For example, the preset response time threshold is preset to be 150ms, or the preset response time threshold is preset to be 100 ms, etc., and it can be understood by those skilled in the art that the preset response time threshold may also include other response time thresholds besides the above, which is not limited in particular by the embodiment of the present invention.
The preset success rate threshold is a preset success rate threshold, and a person skilled in the art can preset the preset success rate threshold according to actual conditions and specific requirements. For example, the preset success rate threshold is preset to be 98%, or the preset success rate threshold is preset to be 95% or 99%, etc., and those skilled in the art can understand that the preset success rate threshold may also include other success rate thresholds other than the above, which is not limited in this embodiment of the present invention.
If the performance test indexes are matched with the data abnormal rules in the data abnormal rule base, it is indicated that the distributed system is abnormal, and the performance test indexes may be response time delay, or the transaction success rate is low, or the transaction execution time is long, and the like. And analyzing the system log of the distributed node to be tested and outputting a performance test result. The performance test result can include the positioned abnormal problem, so that the closed loop of the performance test of the distributed system is realized, and the efficiency of the performance test of the distributed system is greatly improved.
In the embodiment of the invention, the pressure testing tool is controlled to carry out pressure testing on the distributed nodes to be tested according to the configured control script, and meanwhile, the node monitoring tool is controlled to monitor the distributed nodes to be tested according to the configured control script; acquiring performance test data of the distributed system by using the configured acquisition probe; further matching the collected performance test indexes according to the configured data exception rule base; and finally, outputting a performance test result according to the system log of the distributed node to be tested during matching, so that closed loop of performance test of the distributed system can be realized through a pre-configured control script, and the efficiency of performance test of the distributed system is greatly improved.
Fig. 2 shows another implementation flow of the performance testing method provided by the embodiment of the present invention, and for convenience of description, only the relevant parts related to the embodiment of the present invention are shown, and the detailed description is as follows:
in an embodiment of the present invention, in order to further improve the efficiency of the performance test of the distributed system, as shown in fig. 2, on the basis of the above method steps, the performance test method further includes:
step 201, determining a test tuning suggestion corresponding to a performance test result from a pre-configured tuning knowledge base;
step 202, a test control script of the distributed system is called, and tuning is performed by using the test tuning suggestion corresponding to the performance test result.
The tuning knowledge base is a pre-configured and maintained knowledge base, and the tuning knowledge base comprises test tuning suggestions corresponding to performance test results. For example, the transaction execution time in the performance test index is 150ms, the matched data exception rule is that the transaction execution time exceeds the execution time threshold by 80ms, and the exception question located by the analysis log is slow to query for a certain query statement. At this time, it is determined from the tuning knowledge base that the query statement in the performance test result slowly queries the corresponding test tuning suggestion, such as checking whether the index of the data table is established. If the test tuning suggestion can be completed through the test control script, the test control script of the distributed system can be called, and tuning is performed by using the test tuning suggestion corresponding to the performance test result, so that the performance test of the distributed system is further improved, and the performance of the distributed system meets the requirement.
In addition, if the test tuning suggestion cannot be completed through the test control script of the distributed system, manual intervention can be performed for tuning, and after the manual tuning is finished, the performance test is performed on the distributed system again to verify the tuning result.
In the embodiment of the invention, the test tuning suggestion corresponding to the performance test result is determined from the tuning knowledge base, the test control script is called, and the tuning is performed by using the test tuning suggestion corresponding to the performance test result, so that the tuning knowledge base can be adjusted and perfected, and the efficiency of the performance test of the distributed system is further improved.
Fig. 3 shows a further implementation flow of the performance testing method provided by the embodiment of the present invention, and for convenience of description, only the relevant parts related to the embodiment of the present invention are shown, and the following details are described below:
in an embodiment of the present invention, in order to improve flexibility of performance testing, as shown in fig. 3, on the basis of the above method steps, the performance testing method further includes:
step 301, configuring a test control script of the distributed system according to the received configuration instruction.
The test control script of the distributed system can be configured in a visual interface by receiving a configuration instruction and the like. And modifying and adjusting distributed nodes to be tested, a pressure testing tool and a control script thereof, a node monitoring tool and a control script thereof and the like in the configured test control script based on the modification instruction. Such as delete, add, or modify, etc.
In an embodiment of the present invention, in order to improve flexibility of performance testing, as shown in fig. 3, on the basis of the above method steps, the performance testing method further includes:
step 302, configuring acquisition probes of the distributed system according to the received configuration instructions.
The acquisition probes of the distributed system can be configured in a visual interface by receiving configuration instructions and the like. And modifying and adjusting distributed nodes to be tested, a pressure testing tool and a node monitoring tool in the configured acquisition probe based on the modification instruction. Such as delete, add, or modify, etc.
In an embodiment of the present invention, in order to improve flexibility of performance testing, as shown in fig. 3, on the basis of the above method steps, the performance testing method further includes:
step 303, configuring the data exception rule in the data exception rule base according to the received configuration instruction.
The data exception rule in the data exception rule base can be configured in a visual interface by receiving a configuration instruction and the like. And modifying and adjusting the data exception rule in the configured data exception rule base based on the modification instruction. Such as deleting, adding, or modifying data exception rules, etc.
In an embodiment of the present invention, in order to improve flexibility of performance testing, as shown in fig. 3, on the basis of the above method steps, the performance testing method further includes:
and step 304, configuring the test tuning suggestions in the tuning knowledge base according to the received configuration instructions.
The test tuning suggestions in the tuning knowledge base can be configured in a visual interface by receiving configuration instructions and the like. And modifying and adjusting the test tuning suggestions in the configured tuning knowledge base based on the modification instructions. For example, test tuning recommendations are deleted, added, or modified, etc.
In the embodiment of the invention, the test control script and the acquisition probe of the distributed system are configured according to the received configuration instruction, the data exception rule in the data exception rule base and the test tuning suggestion in the tuning knowledge base are configured according to the received configuration instruction, and the flexibility of the performance test of the distributed system can be improved.
Embodiments of the present invention further provide a performance testing apparatus, as described in the following embodiments. Because the principle of solving the problems of the devices is similar to that of the performance testing method, the implementation of the devices can be referred to the implementation of the method, and repeated details are not repeated.
Fig. 4 shows functional modules of a performance testing apparatus provided in an embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown, and detailed descriptions are as follows:
referring to fig. 4, each module included in the performance testing apparatus is used to execute each step in the embodiment corresponding to fig. 1, and specific reference is made to fig. 1 and the related description in the embodiment corresponding to fig. 1, which are not repeated herein. In the embodiment of the present invention, the performance testing apparatus includes a test control module 401, a data acquisition module 402, an abnormal rule matching module 403, and a result output module 404.
The test control module 401 is configured to control the pressure testing tool to perform a pressure test on the distributed node to be tested by using the control script of the pressure testing tool according to a pre-configured test control script of the distributed system, and control the node monitoring tool to monitor the distributed node to be tested by using the control script of the node monitoring tool; the test control script comprises a control script of a distributed node to be tested, a pressure test tool and a node monitoring tool of the distributed system.
A data acquisition module 402, configured to acquire performance test data of the distributed system by using a pre-configured acquisition probe of the distributed system; the performance test data comprises a system log of the distributed node to be tested, a pressure test tool and a performance test index of the node monitoring tool.
An abnormal rule matching module 403, configured to match the collected performance test indexes according to a preconfigured data abnormal rule base.
And the result output module 404 is configured to output a performance test result according to the system log of the distributed node to be tested when the performance test index is matched with the data exception rule in the data exception rule base.
In the embodiment of the present invention, the test control module 401 controls the pressure test tool to perform a pressure test on the distributed node to be tested according to the configured control script, and controls the node monitoring tool to monitor the distributed node to be tested according to the configured control script; the data acquisition module 402 acquires performance test data of the distributed system by using the configured acquisition probes; further, the abnormal rule matching module 403 matches the collected performance test indexes according to the configured data abnormal rule base; and finally, the result output module 404 outputs a performance test result according to the system log of the distributed node to be tested during matching, so that closed loop of the performance test of the distributed system can be realized through a pre-configured control script, and the efficiency of the performance test of the distributed system is greatly improved.
Fig. 5 shows another functional module of the performance testing apparatus provided in the embodiment of the present invention, and for convenience of description, only the relevant parts of the embodiment of the present invention are shown, and the detailed description is as follows:
in an embodiment of the present invention, in order to further improve the efficiency of the performance test of the distributed system, referring to fig. 5, each module included in the performance test apparatus is configured to execute each step in the embodiment corresponding to fig. 2, and specifically, please refer to fig. 2 and the related description in the embodiment corresponding to fig. 2, which is not described herein again. In the embodiment of the present invention, on the basis of the above module structure, the performance testing apparatus further includes a tuning suggestion determining module 501 and a tuning executing module 502.
And the tuning suggestion determining module 501 is configured to determine a test tuning suggestion corresponding to the performance test result from a pre-configured tuning knowledge base.
And the tuning execution module 502 is configured to invoke a test control script of the distributed system, and tune the test tuning recommendation according to the test tuning recommendation corresponding to the performance test result.
In the embodiment of the present invention, the tuning suggestion determining module 501 determines the test tuning suggestion corresponding to the performance test result from the tuning knowledge base, the tuning executing module 502 invokes the test control script, and performs tuning by using the test tuning suggestion corresponding to the performance test result, so as to adjust and perfect the tuning knowledge base, thereby further improving the efficiency of the performance test of the distributed system.
Fig. 6 shows another functional module of the performance testing apparatus provided in the embodiment of the present invention, and for convenience of description, only the relevant parts of the embodiment of the present invention are shown, and the detailed description is as follows:
in an embodiment of the present invention, in order to improve flexibility of the performance test, referring to fig. 6, each module included in the performance test apparatus is used to execute each step in the embodiment corresponding to fig. 3, and specifically, please refer to fig. 3 and the related description in the embodiment corresponding to fig. 3, which is not described herein again. In the embodiment of the present invention, on the basis of the above module structure, the performance testing apparatus further includes a control script configuration module 601.
And the control script configuration module 601 is configured to configure a test control script of the distributed system according to the received configuration instruction.
In an embodiment of the present invention, in order to improve flexibility of performance testing, referring to fig. 6, on the basis of the above-mentioned module structure, the performance testing apparatus further includes an acquisition probe configuration module 602.
An acquisition probe configuration module 602, configured to configure acquisition probes of the distributed system according to the received configuration instructions.
In an embodiment of the present invention, in order to improve flexibility of performance testing, referring to fig. 6, on the basis of the above-mentioned module structure, the performance testing apparatus further includes an exception rule configuration module 603.
An exception rule configuring module 603, configured to configure a data exception rule in the data exception rule base according to the received configuration instruction.
In an embodiment of the present invention, in order to improve flexibility of performance testing, referring to fig. 6, on the basis of the above-mentioned module structure, the performance testing apparatus further includes a tuning suggestion configuration module 604.
And a tuning suggestion configuration module 604, configured to configure the test tuning suggestions in the tuning knowledge base according to the received configuration instructions.
In the embodiment of the present invention, the control script configuration module 601 configures a test control script of the distributed system according to the received configuration instruction; the acquisition probe configuration module 602 configures an acquisition probe according to the received configuration instruction; the abnormal rule configuration module 603 configures the data abnormal rule in the data abnormal rule base according to the received configuration instruction; the tuning suggestion configuration module 604 configures the testing tuning suggestions in the tuning knowledge base according to the received configuration instructions, so that the flexibility of the performance test of the distributed system can be improved.
In an embodiment of the present invention, the test control module 401 includes a controller, the data acquisition module 402 includes a collector, the abnormal rule matching module 403 and the result output module 404 include an analyzer, and the tuning suggestion determination module 501 and the tuning execution module 502 include a feedback device.
The principle and flow of the distributed system performance test of the present invention are briefly described below with reference to a specific application example:
suppose we want to perform a performance test on the distributed bank account query system X to determine its performance capacity or performance bottleneck. The functions provided by the distributed bank account inquiry system X are as follows: and inquiring the account name and the balance according to the account number provided by the customer. By performance testing, we want to determine two things: 1. business personnel estimate that the distributed bank account inquiry system X needs to meet the performance index of 500 concurrent inquiries per second; 2. if the performance index can be reached, the distributed bank account inquiry system X can bear a certain amount of pressure, and if the performance index cannot be reached, the performance index needs to be adjusted and optimized to meet the performance index.
Each role of a distributed bank account inquiry system X is simplified into two types, namely a transaction server A (distributed node) and a data access server B (distributed node), wherein the server B provides two sub-functions of inquiring a user name according to an account number and inquiring balance according to the account number; the class A server collects the contents queried by the class B server twice and provides the collected contents to the client, and both the class A server and the class B server can output transaction running logs. A pressure testing tool A is used for initiating a simulation query transaction to a distributed bank account query system X, and the pressure testing tool A can simultaneously output the average response time and the success rate of the query transaction of the distributed bank account query system X. The node monitoring tool B can monitor the real-time resource condition of the server of the type A and the server of the type B.
The specific process of the performance test of the distributed bank account inquiry system X is as follows:
1. the following test control scripts are maintained in the controller: starting and stopping scripts of the server of the first type and the server of the second type; starting and stopping scripts of the pressure testing tool A, wherein specific simulation pressure values can be maintained in the scripts; the node monitors the start and stop scripts of tool B.
2. The following collection probes were maintained in the collector: the system is used for collecting the transaction average response time output by the pressure testing tool A; collecting the transaction success rate output by the pressure testing tool A; collecting operation logs of the server A and the server B; and collecting performance test data such as resource conditions of the node monitoring tool B.
3. Defining the following rules as exception points in an exception data rule base: the transaction average response time of the distributed bank account inquiry system X exceeds 500 ms; the CPU occupancy rate of the server node in the distributed bank account inquiry system X exceeds 50 percent; the execution time of the class A server single transaction exceeds 30 ms; the class B server single transaction execution time exceeds 80 ms.
4. The following is maintained in the tuning knowledge base: the database query is slow and the database index should be checked for build.
5. The controller sets the pressure testing tool A to initially perform 100 concurrent transactions per second, and starts to test scenes and monitor the node monitoring tool.
6. The collector collects performance test data including performance test indexes according to the set probe.
7. The analyzer matches the collected performance test indexes according to the data exception rules in the data exception rule base, and checks whether one or more rules can be matched. If the execution time of the single transaction of the class B server reaches 150ms at a certain moment, the threshold value is exceeded by 80 ms. The analyzer further analyzes the running log of the time point B server, finds that the query of a certain query statement in the database is slow, preliminarily positions the reason that the query statement is slow in running of the B server, and outputs the slow query statement and the name of the data table.
8. And the feedback device checks the tuning knowledge base and feeds back to the user to execute a slow database query statement and feeds back a test tuning suggestion according to the performance test result of the analyzer, namely, the user is prompted to check whether the index of the data table is established.
9. If the control script of the database in the controller is maintained, the feedback device can directly establish the index through the controller, otherwise, the controller is restarted to verify the tuning result after the index is manually established by a user.
The embodiment of the invention also provides computer equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the performance test method is realized when the processor executes the computer program.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program for executing the performance testing method is stored in the computer-readable storage medium.
In summary, in the embodiment of the present invention, the pressure testing tool is controlled to perform the pressure testing on the distributed node to be tested according to the configured control script, and the configured control script controls the node monitoring tool to monitor the distributed node to be tested; acquiring performance test data of the distributed system by using the configured acquisition probe; further matching the collected performance test indexes according to the configured data exception rule base; and finally, outputting a performance test result according to the system log of the distributed node to be tested during matching, so that closed loop of performance test of the distributed system can be realized through a pre-configured control script, and the efficiency of performance test of the distributed system is greatly improved.
The performance test of the distributed system provided by the embodiment of the invention has the following beneficial effects:
1. controlling a tested distributed system and distributed nodes as required, and a pressure testing tool and a node monitoring tool: the invention can automatically control the starting and stopping of each server of the tested system according to the requirements of users so as to meet the requirements of different test scenes on the scale of the server cluster; and the start and stop of the pressure testing tool and the node monitoring tool can be controlled, so that the control automation of all roles in the performance testing process is realized.
2. Collecting user-defined test information: the invention can comprehensively collect the running condition and the log information of each role of the tested system according to the user-defined requirement in the testing process, and can also collect the execution condition and the output information of the testing tool, and centralize the information, thereby being convenient for checking and analyzing.
3. Automatic determination and decision of anomalies: the method judges the system to be abnormal according to the data abnormal rule configured by the user, quickly positions the time and the position of the abnormal occurrence, integrates all information collected at the time point of the problem occurrence, and analyzes the reason of the problem possibly occurring through decision.
4. Optimizing feedback based on artificial experience: the invention provides a corresponding optimization method by comparing the reasons of system abnormity and positioning problem according to the existing tuning knowledge base or the tuning knowledge base newly maintained by the user.
The new invention solves the problems of slow abnormal discovery, slow problem positioning and difficult system control in the performance test process of the distributed system by controlling the tested distributed system, the pressure test tool and the node monitoring tool as required, comprehensively collecting various information in the test scene, automatically correlating, analyzing and matching the tuning scheme, automatically participates in the whole process of pressure initiation, node monitoring, index analysis and system tuning, improves the efficiency of the performance test of the distributed system and improves the automation level of the performance test of the distributed system.
5. The control scripts and the acquisition probes are independent of each other, the number of the acquisition probes is not limited, the requirements of controlling and monitoring a large-scale distributed system are met, and the pressure test tool, the node monitoring tool and various applications are compatible. The abnormal rule database and the tuning database have the universal characteristic, and can be generally popularized in the performance test of each system through continuous accumulation, maintenance and optimization.
6. The whole system forms a closed loop for automatic performance testing of a large-scale distributed system, greatly improves the performance testing efficiency of the distributed system, and simultaneously generates beneficial influence on the accumulation and popularization of the performance testing experience of the distributed system through the abnormal data rule base and the tuning knowledge base.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method of performance testing, comprising:
according to a test control script of a pre-configured distributed system, a control script of a pressure test tool is used for controlling the pressure test tool to perform pressure test on a distributed node to be tested, and a control script of a node monitoring tool is used for controlling a node monitoring tool to monitor the distributed node to be tested; the test control script comprises a control script of a distributed node to be tested, a pressure test tool and a node monitoring tool of the distributed system;
acquiring performance test data of the distributed system by using a pre-configured acquisition probe of the distributed system; the performance test data comprises a system log of the distributed node to be tested, a pressure test tool and a performance test index of the node monitoring tool;
matching the collected performance test indexes according to a pre-configured data exception rule base;
and when the performance test indexes are matched with the data exception rules in the data exception rule base, outputting a performance test result according to the system log of the distributed node to be tested.
2. The performance testing method of claim 1, further comprising:
determining a test tuning suggestion corresponding to a performance test result from a pre-configured tuning knowledge base;
and calling a test control script of the distributed system, and tuning by using the test tuning suggestion corresponding to the performance test result.
3. The performance testing method of claim 1, further comprising:
and configuring the test control script of the distributed system according to the received configuration instruction.
4. The performance testing method of claim 1, further comprising:
and configuring the acquisition probes of the distributed system according to the received configuration instructions.
5. The performance testing method of claim 1, further comprising:
and configuring the data exception rule in the data exception rule base according to the received configuration instruction.
6. The performance testing method of claim 1, further comprising:
and configuring the test tuning suggestions in the tuning knowledge base according to the received configuration instructions.
7. A performance testing device, comprising:
the test control module is used for controlling the pressure test tool to perform pressure test on the distributed node to be tested by using the control script of the pressure test tool according to the test control script of the pre-configured distributed system, and controlling the node monitoring tool to monitor the distributed node to be tested by using the control script of the node monitoring tool; the test control script comprises a control script of a distributed node to be tested, a pressure test tool and a node monitoring tool of the distributed system;
the data acquisition module is used for acquiring performance test data of the distributed system by using a pre-configured acquisition probe of the distributed system; the performance test data comprises a system log of the distributed node to be tested, a pressure test tool and a performance test index of the node monitoring tool;
the abnormal rule matching module is used for matching the acquired performance test indexes according to a pre-configured data abnormal rule base;
and the result output module is used for outputting the performance test result according to the system log of the distributed node to be tested when the performance test index is matched with the data exception rule in the data exception rule base.
8. The performance testing apparatus of claim 7, further comprising:
the tuning suggestion determining module is used for determining a test tuning suggestion corresponding to a performance test result from a pre-configured tuning knowledge base;
and the tuning execution module is used for calling the test control script of the distributed system and tuning by using the test tuning suggestion corresponding to the performance test result.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the performance testing method of any of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium storing a computer program for executing the performance testing method according to any one of claims 1 to 6.
CN202011040376.7A 2020-09-28 2020-09-28 Performance test method and device, computer equipment and computer readable storage medium Pending CN112115029A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011040376.7A CN112115029A (en) 2020-09-28 2020-09-28 Performance test method and device, computer equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011040376.7A CN112115029A (en) 2020-09-28 2020-09-28 Performance test method and device, computer equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN112115029A true CN112115029A (en) 2020-12-22

Family

ID=73798687

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011040376.7A Pending CN112115029A (en) 2020-09-28 2020-09-28 Performance test method and device, computer equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112115029A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112905484A (en) * 2021-03-25 2021-06-04 兴业数字金融服务(上海)股份有限公司 Self-adaptive closed loop performance test method, system and medium
CN113553267A (en) * 2021-07-22 2021-10-26 招商银行股份有限公司 Application performance testing method, device, medium, and computer program product
CN114785709A (en) * 2022-03-24 2022-07-22 中国农业银行股份有限公司 Monitoring method and device for full-link production pressure test

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180060223A1 (en) * 2016-08-26 2018-03-01 International Business Machines Corporation Application monitoring with a decoupled monitoring tool
CN109522181A (en) * 2018-10-22 2019-03-26 郑州云海信息技术有限公司 A kind of performance test methods of distributed memory system, device and equipment
CN110543418A (en) * 2019-08-23 2019-12-06 苏州浪潮智能科技有限公司 database performance test method, system and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180060223A1 (en) * 2016-08-26 2018-03-01 International Business Machines Corporation Application monitoring with a decoupled monitoring tool
CN109522181A (en) * 2018-10-22 2019-03-26 郑州云海信息技术有限公司 A kind of performance test methods of distributed memory system, device and equipment
CN110543418A (en) * 2019-08-23 2019-12-06 苏州浪潮智能科技有限公司 database performance test method, system and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112905484A (en) * 2021-03-25 2021-06-04 兴业数字金融服务(上海)股份有限公司 Self-adaptive closed loop performance test method, system and medium
CN112905484B (en) * 2021-03-25 2023-12-19 兴业数字金融服务(上海)股份有限公司 Self-adaptive closed-loop performance test method, system and medium
CN113553267A (en) * 2021-07-22 2021-10-26 招商银行股份有限公司 Application performance testing method, device, medium, and computer program product
CN114785709A (en) * 2022-03-24 2022-07-22 中国农业银行股份有限公司 Monitoring method and device for full-link production pressure test

Similar Documents

Publication Publication Date Title
CN112115029A (en) Performance test method and device, computer equipment and computer readable storage medium
US11163731B1 (en) Autobuild log anomaly detection methods and systems
US9183123B2 (en) Performance tests in a continuous deployment pipeline
CN110750458A (en) Big data platform testing method and device, readable storage medium and electronic equipment
US10452048B2 (en) Control system and control device
CN109344053B (en) Interface coverage test method, system, computer device and storage medium
CN108459951B (en) Test method and device
CN110740079B (en) Full link benchmark test system for distributed scheduling system
CN111459698A (en) Database cluster fault self-healing method and device
CN111666217B (en) Method and apparatus for testing code
WO2021047184A1 (en) System failure analysis and processing method and apparatus, storage medium, and electronic device
CN114757142A (en) Self-error-correction chip verification method, device, equipment and computer readable medium
CN106855844B (en) Performance test method and system
CN114116422A (en) Hard disk log analysis method, hard disk log analysis device and storage medium
CN113360353A (en) Test server and cloud platform
CN112148616A (en) Performance test management platform
CN115952098A (en) Performance test tuning scheme recommendation method and system
CN115934502A (en) Workload Generation for Optimal Stress Testing of Big Data Management Systems
CN115248782A (en) Automatic testing method and device and computer equipment
CN113656318A (en) Software version testing method and device and computer equipment
CN113282482A (en) Compatibility test method and system for software package
CN111694752A (en) Application testing method, electronic device and storage medium
CN113535528B (en) Log management system, method and medium for distributed graph iterative computation job
CN113570333B (en) Process design method suitable for integration
CN109361531A (en) A kind of communication equipment is not easy to reappear the reproducing method of problem, system and equipment

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