Performance problem diagnosis method and device, equipment and storage medium
By obtaining test data in performance problem diagnosis and matching diagnostic rule items in preset rule bases, the time-consuming and inaccurate diagnosis of performance problem diagnosis in complex systems is solved, and automated diagnosis is realized, improving testing efficiency and accuracy. Meet diverse needs.
Patent Information
- Application Number
- CN202411293028.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2025-01-14
AI Technical Summary
In the prior art, performance problem diagnosis is time-consuming in complex systems and relies on manual analysis, resulting in low testing efficiency and inaccurate results, making it difficult to meet diverse diagnostic needs.
By obtaining test data and matching the corresponding diagnostic rule items in the preset rule library, using the rule processing function to determine whether the data complies with the diagnostic rules, determine performance problems, and generate diagnostic reports and optimization plans based on the preset defect library to achieve automated diagnosis.
It realizes automated diagnosis of performance problems, reduces the workload and time of testers, improves test efficiency and accuracy of results, and can meet diverse diagnostic needs.
Smart Images

Figure CN119311564A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of performance testing technology, and in particular to a performance problem diagnosis method, device, equipment and storage medium. Background Art
[0002] With the evolution of application software system architecture and the rapid development of business, the performance of application software has received more and more attention. At the same time, due to the increasing complexity of system architecture, system tuning and problem location have become more and more complicated, becoming the most time-consuming and important factors that determine the quality of testing in the test environment.
[0003] In conventional problem diagnosis methods, testers need to collect a large amount of different types of test data, and also need to analyze and locate performance problems in combination with operating system, component and other indicators. This is not only time-consuming, but also requires high capabilities of testers. The uneven capabilities of testers will bring hidden dangers to test quality, affect test efficiency and the accuracy of test results. Therefore, how to achieve automatic analysis of test data and problem diagnosis has become an urgent problem to be solved. Summary of the invention
[0004] The main purpose of this application is to provide a performance problem diagnosis method, device, equipment and storage medium, aiming to solve the technical problems corresponding to the background technology.
[0005] To achieve the above objectives, the present application proposes a performance problem diagnosis method, which includes:
[0006] Acquire test data of the current application, and match rule items corresponding to the test data in a preset rule library, wherein the rule items include corresponding diagnostic rules, and the diagnostic rules are pre-edited based on diagnostic requirements;
[0007] Determine whether the test data conforms to the diagnosis rule and obtain a determination result;
[0008] The performance problem of the current application is determined according to the determination result.
[0009] In one embodiment, the step of determining whether the test data conforms to the diagnostic rule and obtaining the determination result comprises:
[0010] Obtaining a rule processing function corresponding to the diagnostic rule, wherein the rule processing function is composed of input parameters to be assigned, function logic, and output parameters;
[0011] Taking the test data as the input parameter, and obtaining the output parameter corresponding to the test data through the function logic;
[0012] Whether the test data conforms to the diagnosis rule is determined according to the output parameter, and a determination result is obtained.
[0013] In one embodiment, the output parameter is a Boolean value, and the step of determining whether the test data conforms to the diagnostic rule according to the output parameter and obtaining the determination result comprises:
[0014] When the output parameter is true, the current application has a performance defect corresponding to the diagnostic rule;
[0015] When the output parameter is negative, the current application does not have a performance defect corresponding to the diagnostic rule.
[0016] In one embodiment, the step of determining the performance problem of the current application according to the judgment result includes:
[0017] Determine a number of performance defects corresponding to the current application according to the judgment result;
[0018] Reference case information corresponding to each of the performance defects is matched in a preset defect library, and the performance problem of the current application is determined based on each of the reference case information.
[0019] In one embodiment, the preset defect library also includes a number of concern defect root causes, each of which corresponds to a deduction score; after the step of determining a number of performance defects corresponding to the current application according to the judgment result, the step further includes:
[0020] Querying the preset defect database for the root cause of the defect of concern corresponding to each of the performance defects;
[0021] The system score of the current application is determined according to the query result, and the system score is calculated by summing up the deduction scores corresponding to the root causes of the defects.
[0022] In one embodiment, after the step of matching the reference case information corresponding to each of the performance defects in the preset defect library and determining the performance problem of the current application based on each of the reference case information, the step further includes:
[0023] Generate an optimization solution corresponding to the performance problem according to each of the reference case information;
[0024] Generate and display a diagnostic report of the current application based on the performance problem, the optimization solution, and the system score;
[0025] When receiving a user's feedback instruction on the diagnostic report, updating the optimization plan according to the feedback instruction to obtain a target optimization plan;
[0026] The preset defect library is updated based on the performance problem and the target optimization solution.
[0027] In one embodiment, before the step of obtaining the test data of the current application and matching the rule items corresponding to the test data in the preset rule base, the following steps are included:
[0028] Collect stress testing data and monitoring data of the current application;
[0029] Standardizing the stress test data and the monitoring data, and storing the standardized stress test data and the monitoring data in a preset storage repository by category;
[0030] Accordingly, the step of obtaining the test data of the current application and matching the rule items corresponding to the test data in the preset rule base includes:
[0031] The test data of the current application is obtained from the preset storage repository, and the rule items corresponding to the test data are matched in the preset rule library.
[0032] In addition, to achieve the above objectives, the present application also proposes a performance problem diagnosis device, the device comprising:
[0033] A data acquisition module is used to obtain the test data of the current application and match the rule items corresponding to the test data in a preset rule library, wherein the rule items contain corresponding diagnostic rules, and the diagnostic rules are pre-edited based on diagnostic requirements;
[0034] A rule matching module, used to determine whether the test data conforms to the diagnosis rule and obtain a determination result;
[0035] A problem diagnosis module is used to determine the performance problem of the current application according to the judgment result.
[0036] In addition, to achieve the above-mentioned purpose, the present application also proposes a performance problem diagnosis device, which includes: a memory, a processor, and a performance problem diagnosis program stored in the memory and executable on the processor, wherein the performance problem diagnosis program is configured to implement the steps of the performance problem diagnosis method described above.
[0037] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, on which a performance problem diagnosis program is stored, and when the performance problem diagnosis program is executed by a processor, the steps of the performance problem diagnosis method described above are implemented.
[0038] The present application discloses a method for diagnosing performance problems, which obtains test data of the current application, matches rule items corresponding to the test data in a preset rule base, wherein the rule items contain corresponding diagnostic rules, and the diagnostic rules are pre-edited based on diagnostic requirements; determines whether the test data conforms to the diagnostic rules, and obtains a judgment result; and determines the performance problem of the current application according to the judgment result. Since the present application can adaptively match rule items in the preset rule base with the input test data, diagnosis can be performed based on the diagnostic rules contained in each rule item, thereby automating the performance problem diagnosis process of the test data, and wherein the diagnostic rules can be obtained by pre-editing, which is conducive to meeting the diverse performance problem diagnosis requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0041] Figure 1 This is a flow chart of the first embodiment of the performance problem diagnosis method of the present application;
[0042] Figure 2 This is a flow chart of the second embodiment of the performance problem diagnosis method of the present application;
[0043] Figure 3 This is a flow chart of the third embodiment of the performance problem diagnosis method of the present application;
[0044] Figure 4 This is a schematic diagram of the overall process of the performance problem diagnosis method of this application;
[0045] Figure 5 This is a specific workflow diagram of the performance problem diagnosis method for this application;
[0046] Figure 6 This is a structural block diagram of the first embodiment of the performance problem diagnosis device of the present application;
[0047] Figure 7 This is a schematic diagram of the structure of the performance problem diagnosis equipment of this application.
[0048] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0049] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0050] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0051] This application embodiment provides a performance problem diagnosis method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the performance problem diagnosis method of the present application. In this embodiment, the method includes: Steps S10 to S30:
[0052] Step S10: Acquire test data of the current application, and match rule items corresponding to the test data in a preset rule library.
[0053] It should be noted that the method of this embodiment can be applied to the tuning stage in the entire performance test life cycle, and can also be independently applied in the scenario of analyzing performance problems of existing test data. The execution subject of this embodiment can be a computer storage device with functions such as data acquisition, program running, and network communication, such as a performance test terminal device or a test server. Here, the various embodiments of this application can be explained by taking a performance problem diagnostic device (hereinafter referred to as "diagnostic device") as an example.
[0054] It is understandable that the current application may be a test object in a performance test, which may be a single application program, a system component, an entire operating system, or a hardware resource, etc.
[0055] It should be understood that the test data may be the full amount of monitoring data and stress testing data (operating system level, component level) collected during the test process.
[0056] Furthermore, considering that during the performance testing process, due to the widespread use of microservices and cloud computing, the transaction chain has become complicated, and therefore it is necessary to collect and classify the large amount of test data generated accordingly for subsequent accurate problem diagnosis. Therefore, before step S10, it also includes: steps S01 to S02:
[0057] Step S01: Collect stress testing data and monitoring data of the current application.
[0058] Step S02: performing standardization processing on the stress testing data and the monitoring data, and storing the standardized stress testing data and the monitoring data in a preset storage repository by category.
[0059] It should be understood that the monitoring data may include: for example, operating system indicators such as CPU, memory, IO, network, database indicators such as slow SQL, etc.; stress testing data may include: for example, TPS, response time, error rate, etc.
[0060] It should be noted that the preset repository can be a data collection device integrated in the diagnostic device, and the above-mentioned monitoring data and stress test data can be classified and stored in the preset repository. Specifically, the collected stress test data and monitoring data can be standardized first, and then the processed stress test data and monitoring data can be classified and stored based on different data types. In addition, the stress test data and monitoring data can also be stored based on different test objects and different test rounds.
[0061] Accordingly, step S10 includes:
[0062] Step S100: Acquire test data of the current application from the preset storage library, and match rule items corresponding to the test data in the preset rule library.
[0063] It is understandable that, since the above test data (stress test data and monitoring data) are classified and stored in the preset repository, the diagnostic device can directly call from the preset repository without the need for testers to collect it independently. And when retesting and reproducing are required after the problem is diagnosed, compared with the existing method that requires testers to recollect another round of test data for subsequent analysis, this embodiment can reduce work time and improve test efficiency based on the preset repository.
[0064] It should be noted that the preset rule base can be an expert base rule device integrated in the diagnostic device. The expert base rule device is based on the rule engine and exists independently from the business code. It can be quickly updated and put online to meet the effectiveness of diagnostic needs. The expert base rule device can be improved and supplemented, and can support custom editing to meet the personalized diagnostic needs of testers.
[0065] Specifically, performance testing experts can edit common performance defects into a tree-like flowchart in the form of diagnostic rules, and enter them into a rule engine in the form of a rule set. The rule engine provides a visual page for testers to view the diagnostic route of each diagnostic rule.
[0066] It should be understood that commonly used rule engines may include Drools, Jess, and InRule; among them, Drools, as a rule engine, can execute decisions based on a set of rules, which are usually based on facts and conditions and can be used to process complex business logic. Its characteristics are: ease of use: Drools' rule language is easy to learn and use, and developers can implement complex business logic through simple rule definitions; flexibility: Drools supports complex rule definition and execution, including conditions, priorities, loops, etc.; performance: Drools has good performance, especially when processing a large number of rules and a large amount of data; community support: Drools has an active community that provides rich documentation and tutorials, as well as a large number of third-party libraries and plug-ins. Therefore, Drools can be selected as the rule engine in this embodiment.
[0067] It should be understood that the rule items may be, for example, memory rules, CPU rules, thread rules, DB rules, etc. Each rule item contains a corresponding diagnostic rule, and the diagnostic rule may be composed of several serial and parallel judgment conditions according to a certain combination logic.
[0068] In the specific implementation, the diagnostic device can input the collected monitoring data and stress test data into the rule engine, and then adaptively match the rule items in the rule engine according to the monitoring data and stress test data, so as to make further judgments based on the diagnostic rules corresponding to the rule items. And because the data path after the monitoring data and stress test data are input into the rule engine is not fixed, the lack and omission of problem diagnosis can be avoided to the greatest extent.
[0069] Step S20: determine whether the test data conforms to the diagnosis rule, and obtain a determination result.
[0070] It should be understood that after the monitoring data and stress testing data trigger the rule items in the rule engine, they pass through several serial and parallel judgment conditions in turn, and are judged by the reasoning mechanism of the rule engine to finally obtain the judgment results under different rule items.
[0071] Step S30: Determine the performance problem of the current application according to the judgment result.
[0072] It should be noted that based on the above judgment results, one or more specific performance defects can be obtained, and then a comprehensive analysis of multiple performance defects can be performed to identify the root cause, thereby determining the performance problem of the current application.
[0073] In this embodiment, the test data of the current application is obtained, and the rule items corresponding to the test data are matched in the preset rule library, the rule items contain corresponding diagnostic rules, and the diagnostic rules are pre-edited based on the diagnostic requirements; it is judged whether the test data conforms to the diagnostic rules, and a judgment result is obtained; the performance problem of the current application is determined according to the judgment result. Since the input test data can be adaptively matched to the rule items in the preset rule library in this embodiment, diagnosis can be performed based on the diagnostic rules contained in each rule item, realizing the automation of the performance problem diagnosis process of the test data, and the diagnostic rules can be obtained by pre-editing, which is conducive to meeting the diverse performance problem diagnosis needs.
[0074] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 2 , Figure 2 This is a flow chart of the second embodiment of the performance problem diagnosis method of the present application.
[0075] In this embodiment, in order to specifically explain how to perform the judgment process based on the diagnosis rule, step S20 includes: steps S201 to S203:
[0076] Step S201: Obtain a rule processing function corresponding to the diagnosis rule, wherein the rule processing function is composed of input parameters to be assigned, function logic, and output parameters.
[0077] It is understandable that in the rule engine, each diagnostic rule may correspond to one or more rule processing functions, which define how to process and analyze the input data. The rule processing function includes three main parts:
[0078] Input parameters: data required for the function to execute, usually from test data.
[0079] Function Logic: The core of a function, which contains the algorithm or logic for processing input parameters and generating output parameters.
[0080] Output parameter: The result after the function logic is executed, usually used to indicate whether the test data meets specific diagnostic rules.
[0081] It should be understood that each rule processing function can be stored in a preset function library, and each rule processing function is invisible to the tester. Specifically, the function library can have built-in function logic and provide services in the form of an interface to the outside, so as to call the required function logic in the judgment based on the diagnosis rule.
[0082] Step S202: taking the test data as the input parameter, and obtaining the output parameter corresponding to the test data through the function logic.
[0083] It should be understood that the test data is used as the call input of the rule processing function, and the corresponding function logic is executed in the function library, and then the corresponding output parameters are called. For example, if the diagnosis rule is to check whether the CPU usage exceeds the threshold, the function logic can be to compare the input CPU usage data with the preset threshold to obtain the comparison result.
[0084] It is understandable that the function logic may be a series of arithmetic operations or operation expressions such as string concatenation, and the output parameter may be a Boolean value (true or false).
[0085] Step S203: judging whether the test data conforms to the diagnosis rule according to the output parameter, and obtaining a judgment result.
[0086] It should be noted that the output parameter of a rule processing function under the diagnostic rule can be directly used as the output of the rule processing function, and can also be used as the input of another rule processing function to obtain the final output parameter to determine whether the test data complies with the diagnostic rule, wherein the specific combination logic between the rule processing functions can be set based on different diagnostic requirements.
[0087] It should be understood that when the output parameter is true, the current application complies with the diagnostic rule, that is, there is a performance defect corresponding to the diagnostic rule; when the output parameter is false, the current application does not comply with the diagnostic rule, that is, there is no performance defect corresponding to the diagnostic rule.
[0088] Further, in the rule engine, the above judgment process is executed based on the diagnostic rules of each matched rule item, so that several performance defects existing in the current application can be determined, and then a comprehensive analysis of multiple performance defects can be performed to identify the root cause. Therefore, step S30 specifically includes: steps S301 to S302:
[0089] Step S301: determining a number of performance defects corresponding to the current application according to the judgment result.
[0090] Step S302: matching reference case information corresponding to each performance defect in a preset defect library, and determining the performance problem of the current application based on each reference case information.
[0091] It should be noted that the different performance defects may be, for example, memory leaks, CPU overloads, database bottlenecks, and network delays.
[0092] It should be understood that the preset defect library may include performance problem analysis ideas and analysis cases based on different performance defects, and the reference case information in the preset defect library and the performance defects determined by each diagnostic rule in the above-mentioned preset rule library may have a one-to-one correspondence.
[0093] It is understandable that by matching the reference case information corresponding to the above-mentioned various performance defects in the preset defect library, the root cause of the above-mentioned different performance defects, that is, the performance problem existing in the current application, can be more accurately determined in combination with the reference case information.
[0094] In this embodiment, by introducing a preset function library and a preset defect library, the preset function library provides function logic services in the form of an externally callable interface based on the built-in function logic, so that the test data is used as an input parameter, the corresponding function logic is executed in the function library, and then the corresponding output parameters are output, so as to determine whether the output parameters meet the diagnostic rules, and determine the performance defects of the current application; and further combine the preset defect library that stores case reference information corresponding to each performance defect to finally determine the performance problem of the current application. Since the preset rule library, preset function library, and preset defect library can all be pre-configured, the tester does not need to have a high level of system architecture knowledge, and can also perform the required performance problem diagnosis tasks based on the preset function library and preset defect library.
[0095] Based on the first and second embodiments of the present application, in the third embodiment of the present application, the same or similar contents as those of the first and second embodiments can be referred to the above description, and will not be described in detail later. Figure 3 , Figure 3 This is a flow chart of the third embodiment of the performance problem diagnosis method of the present application.
[0096] In this embodiment, the diagnosis result of the current application can be quantitatively evaluated in the form of a system score. Therefore, after step S301, the following steps are further included: steps S3011 to S3012:
[0097] Step S3011: Query the preset defect database for the root cause of the concern defect corresponding to each of the performance defects.
[0098] It should be understood that the preset defect library also includes a number of concern defect root causes, each of which has a corresponding deduction score.
[0099] Specifically, the preset defect library may include common root causes of defects in the performance test process and the degree of impact on the system. For example, according to the application defect type, the secondary root causes can be divided into thread locks, concurrency errors, memory leaks, memory overflows, thread safety and other root causes; according to the relational database, the secondary root causes can be divided into unreasonable database design, unreasonable database parameters, unreasonable index design and other root causes. The root cause of the defect to be concerned can be the above-mentioned secondary root cause, and each secondary root cause can be set with a corresponding score according to the degree of impact on the system.
[0100] In a specific implementation, it is possible to determine which of the performance defects existing in the current application are defect root causes of concern so as to obtain the deduction score corresponding to each defect root cause of concern.
[0101] Step S3012: Determine the system score of the current application according to the query result, where the system score is calculated by summing up the deduction scores corresponding to the root causes of the defects.
[0102] In a specific implementation, the total system deduction score can first be calculated based on the deduction scores corresponding to each of the defect root causes, and then the system score of the current application can be determined based on the standard threshold, that is, the difference between the standard threshold score and the total system deduction score.
[0103] Furthermore, in order to issue a corresponding warning based on the aforementioned diagnosed performance problem so as to optimize and improve the current application, after step S302, the following steps are further included: steps S3021 to S3022:
[0104] Step S3021: Generate an optimization solution corresponding to the performance problem based on the reference case information.
[0105] It should be understood that the reference case information in the above-mentioned preset defect library may include the symptoms, impacts, possible root causes, and recommended solutions or mitigation measures of the problem. Specifically, the diagnostic device can generate an optimization solution for the performance problem of the current application by obtaining the solutions and mitigation measures in the reference case information corresponding to each of the performance defects in the above-mentioned preset defect library.
[0106] Step S3022: Generate and display a diagnostic report of the current application based on the performance problem, the optimization solution, and the system score.
[0107] It should be understood that in order to facilitate the testers' review, the performance issues determined above, the optimization solutions generated based on the preset defect library, and the system scores obtained based on focusing on the root causes of the defects can be integrated, and a detailed diagnostic report can be generated based on the integration results for the testers to review.
[0108] Furthermore, in order to realize the continuous updating of the reference case information in the preset defect library, after step S3022, the following steps are further included: steps S3023 to S3024:
[0109] Step S3023: upon receiving a user's feedback instruction on the diagnosis report, updating the optimization plan according to the feedback instruction to obtain a target optimization plan.
[0110] It should be understood that the tester can review the diagnostic report to determine whether it is necessary to execute the optimization solution corresponding to each diagnostic problem, or modify and update the displayed optimization solution to obtain the target optimization solution for the corresponding diagnostic problem.
[0111] Step S3024: updating the preset defect library based on the performance problem and the target optimization solution.
[0112] It should be understood that in order to enrich the reference case information corresponding to each performance defect in the preset defect library, the target optimization solution updated by the tester and its corresponding performance problem can be packaged as a new reference case, thereby realizing the update of the preset defect library.
[0113] This embodiment searches for the root cause of the concern defect corresponding to each of the performance defects in the preset defect library; determines the system score of the current application based on the query result, and the system score is calculated by the sum of the deduction scores corresponding to the root causes of the concern defects. The diagnostic results of the current application can be quantitatively evaluated in the form of a system score, and an optimization plan corresponding to the performance problem can be generated based on the reference case information; a diagnostic report of the current application is generated and displayed based on the performance problem, the optimization plan and the system score, so that the tester can intuitively obtain specific diagnostic data for the current application. In addition, when receiving a user's feedback instruction on the diagnostic report, the optimization plan can be updated according to the feedback instruction to obtain a target optimization plan; updating the preset defect library based on the performance problem and the target optimization plan is conducive to enriching the content in the preset defect library to facilitate continuous improvement of the diagnostic process.
[0114] Further, please refer to Figure 4 The overall process of the performance problem diagnosis method of this application is described. Figure 4 The figure is a schematic diagram of the overall process of the performance problem diagnosis method of this application.
[0115] exist Figure 4In the process, the monitoring data and stress test data stored in the preset repository can be used as the data source for inputting into the rule engine; the rule engine includes several rule items, such as memory rules, CPU rules, thread rules, DB rules, etc., and the tester can perform personalized rule editing based on the visual page provided by the rule engine. Each rule item contains a corresponding diagnostic rule, and the diagnostic rule can correspond to one or more rule processing functions. Each rule processing function can be stored in the preset function library for the call of the rule engine; after the rule engine outputs the judgment results based on each diagnostic rule, several performance defects and the most fundamental performance problems corresponding to the current application are determined, and similar defect cases and corresponding optimization solutions can be recommended; finally, a detailed diagnostic report including problem records and related data information is generated according to the diagnostic results for the tester to review, and the preset defect library can be connected to realize the continuous updating of reference case information in the defect library.
[0116] Further, you can also refer to Figure 5 , in order to specifically explain the rule judgment process of the rule engine in the performance problem diagnosis method of this application in combination with the preset function library, the preset rule library, and the preset defect library, Figure 5 This is a specific workflow diagram of the performance problem diagnosis method for this application.
[0117] exist Figure 5 In the example, the preset function library, the preset rule library, and the preset defect library are pre-configured.
[0118] When the tester (real-time or scheduled) starts to execute the scheme of this application, the monitoring data and stress test data in the preset storage library are input into the rule engine; in the rule engine, it is determined whether each rule item is triggered, and then the specific input parameters are determined according to the diagnostic rules included in each rule item, and then the output parameters are obtained by calling the corresponding function logic in the preset function library; the judgment results based on each diagnostic rule are output, and the performance defects and the most fundamental performance problems (diagnostic results) corresponding to the current application are determined, and the corresponding reference optimization scheme is given, and then a detailed diagnostic report including problem records and related data information is generated according to the diagnostic results for the tester to review. In addition, the system score of the current application can be obtained in the evaluation system according to the performance defects existing in the current application combined with the deduction points of each root cause of the defect in the preset defect library, so as to quantitatively evaluate the diagnostic results of the current application.
[0119] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the performance problem diagnosis method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0120] In addition, the present application also provides a performance problem diagnosis device, referring to Figure 6 , Figure 6 This is a structural block diagram of the first embodiment of the performance problem diagnosis device of the present application; Figure 6 As shown, the device comprises:
[0121] The data acquisition module 601 is used to obtain the test data of the current application and match the rule items corresponding to the test data in the preset rule library, wherein the rule items include corresponding diagnosis rules, and the diagnosis rules are pre-edited based on the diagnosis requirements;
[0122] The rule matching module 602 is used to determine whether the test data conforms to the diagnosis rule and obtain a determination result;
[0123] The problem diagnosis module 603 is used to determine the performance problem of the current application according to the judgment result.
[0124] Furthermore, the rule matching module 602 is also used to obtain a rule processing function corresponding to the diagnostic rule, wherein the rule processing function is composed of input parameters to be assigned, function logic and output parameters; taking the test data as the input parameter, and obtaining the output parameter corresponding to the test data through the function logic; judging whether the test data complies with the diagnostic rule according to the output parameter, and obtaining a judgment result.
[0125] Wherein, the output parameter is a Boolean value.
[0126] Furthermore, the rule matching module 602 is also used to, when the output parameter is true, the current application has a performance defect corresponding to the diagnostic rule; when the output parameter is false, the current application does not have a performance defect corresponding to the diagnostic rule.
[0127] Furthermore, the problem diagnosis module 603 is also used to determine a number of performance defects corresponding to the current application based on the judgment result; match the reference case information corresponding to each performance defect in the preset defect library, and determine the performance problem of the current application based on each reference case information.
[0128] The preset defect database also includes a number of defect root causes, each of which has a corresponding deduction score.
[0129] Furthermore, the problem diagnosis module 603 is also used to query the preset defect library for the root cause of concern corresponding to each of the performance defects; determine the system score of the current application based on the query result, and the system score is calculated by the sum of the deduction points corresponding to the root causes of concern.
[0130] Furthermore, the problem diagnosis module 603 is also used to generate an optimization plan corresponding to the performance problem based on each of the reference case information; generate and display a diagnostic report of the current application based on the performance problem, the optimization plan and the system score; when receiving a user's feedback instruction on the diagnostic report, update the optimization plan according to the feedback instruction to obtain a target optimization plan; and update the preset defect library based on the performance problem and the target optimization plan.
[0131] Furthermore, the data acquisition module 601 is also used to collect the stress test data and monitoring data of the current application; standardize the stress test data and the monitoring data, and classify and store the standardized stress test data and the monitoring data in a preset repository. The test data of the current application is obtained from the preset repository, and the rule items corresponding to the test data are matched in the preset rule library.
[0132] Since the present embodiment can adaptively match rule items in the preset rule library with the input test data, diagnosis can be performed based on the diagnostic rules contained in each rule item, thereby automating the performance problem diagnosis process of the test data, and the diagnostic rules can be obtained through pre-editing, which is conducive to meeting diverse performance problem diagnosis needs.
[0133] Other embodiments or specific implementations of the performance problem diagnosis device described in the present application can refer to the above-mentioned method embodiments and will not be described in detail here.
[0134] The present application also provides a performance problem diagnosis device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the performance problem diagnosis method in the above-mentioned embodiment one.
[0135] Reference below Figure 7 , Figure 7 The schematic diagram of the structure of the performance problem diagnosis device of the present application. The performance problem diagnosis device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7The performance problem diagnosis device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0136] like Figure 7 As shown, the performance problem diagnosis device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the performance problem diagnosis device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the performance problem diagnosis device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a performance problem diagnosis device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0137] The present application also provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, wherein the computer-readable program instructions are used to execute the performance problem diagnosis method in the above-mentioned embodiment.
[0138] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0139] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A performance problem diagnosis method, characterized in that: The method comprises: Acquire test data of the current application, and match rule items corresponding to the test data in a preset rule library, wherein the rule items include corresponding diagnostic rules, and the diagnostic rules are pre-edited based on diagnostic requirements; Determine whether the test data conforms to the diagnosis rule and obtain a determination result; The performance problem of the current application is determined according to the determination result.
2. The method according to claim 1, characterized in that The step of judging whether the test data conforms to the diagnosis rule and obtaining the judgment result comprises: Obtaining a rule processing function corresponding to the diagnostic rule, wherein the rule processing function is composed of input parameters to be assigned, function logic, and output parameters; Taking the test data as the input parameter, and obtaining the output parameter corresponding to the test data through the function logic; Whether the test data conforms to the diagnosis rule is determined according to the output parameter, and a determination result is obtained.
3. The method according to claim 2, characterized in that The output parameter is a Boolean value, and the step of judging whether the test data conforms to the diagnosis rule according to the output parameter and obtaining the judgment result includes: When the output parameter is true, the current application has a performance defect corresponding to the diagnostic rule; When the output parameter is negative, the current application does not have a performance defect corresponding to the diagnostic rule.
4. The method according to claim 3, characterized in that The step of determining the performance problem of the current application according to the judgment result includes: Determine a number of performance defects corresponding to the current application according to the judgment result; Reference case information corresponding to each of the performance defects is matched in a preset defect library, and the performance problem of the current application is determined based on each of the reference case information.
5. The method according to claim 4, characterized in that The preset defect library also includes a number of concern defect root causes, each of which corresponds to a deduction score; after the step of determining a number of performance defects corresponding to the current application according to the judgment result, the step further includes: Querying the preset defect database for the root cause of the defect of concern corresponding to each of the performance defects; The system score of the current application is determined according to the query result, and the system score is calculated by summing up the deduction scores corresponding to the root causes of the defects.
6. The method according to claim 5, characterized in that After the step of matching the reference case information corresponding to each performance defect in the preset defect library and determining the performance problem of the current application based on each reference case information, the method further includes: Generate an optimization solution corresponding to the performance problem according to each of the reference case information; Generate and display a diagnostic report of the current application based on the performance problem, the optimization solution, and the system score; When receiving a user's feedback instruction on the diagnostic report, updating the optimization plan according to the feedback instruction to obtain a target optimization plan; The preset defect library is updated based on the performance problem and the target optimization solution.
7. The method according to claim 1, characterized in that Before the step of obtaining the test data of the current application and matching the rule items corresponding to the test data in the preset rule base, the following steps are included: Collect stress testing data and monitoring data of the current application; Standardizing the stress test data and the monitoring data, and storing the standardized stress test data and the monitoring data in a preset storage repository by category; Accordingly, the step of obtaining the test data of the current application and matching the rule items corresponding to the test data in the preset rule base includes: The test data of the current application is obtained from the preset storage repository, and the rule items corresponding to the test data are matched in the preset rule library.
8. A performance problem diagnosis device, characterized in that: The device comprises: A data acquisition module is used to obtain the test data of the current application and match the rule items corresponding to the test data in a preset rule library, wherein the rule items contain corresponding diagnostic rules, and the diagnostic rules are pre-edited based on diagnostic requirements; A rule matching module, used to determine whether the test data conforms to the diagnosis rule and obtain a determination result; A problem diagnosis module is used to determine the performance problem of the current application according to the judgment result.
9. A performance problem diagnosis device, characterized in that: The performance problem diagnosis device comprises: a memory, a processor, and a performance problem diagnosis program stored in the memory and executable on the processor. When the performance problem diagnosis program is executed by the processor, the steps of the performance problem diagnosis method as described in any one of claims 1 to 7 are implemented.
10. A storage medium, characterized in that: The storage medium stores a performance problem diagnosis program, which, when executed by a processor, implements the steps of the performance problem diagnosis method according to any one of claims 1 to 7.