A performance test tuning scheme recommendation method and system
Patent Information
- Application Number
- CN202310011854.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-05
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2043-01-05
AI Technical Summary
[0004]针对上述相关技术,发明人认为由于需要调整的参数数量较多,部分测试人员对测试方法、调优手段不清楚,一般会选择查询资料或询问经验丰富的人,这会导致应用程序的性能测试及调优方案的获取效率降低
1.服务器收集通过该测试平台进行测试及调优的全部应用程序的历史性能测试方案及对应调优方案,形成一个调优方案数据库,在后续的应用程序遇到测试方面的问题或者调优方面的问题时,通过该调优方案数据库,能自动推荐性能测试方案或调优方案,测试人员无需去翻阅资料或者询问有经验的人,能大大节省时间,从而提高应用程序的性能测试及调优方案的获取效率;
Smart Images

Figure CN115952098B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information push technology, and in particular to a method and system for recommending performance testing and optimization schemes. Background Technology
[0002] Performance testing is defined as testing a system's various performance metrics by simulating various normal, peak, and abnormal load conditions using automated testing tools. Load testing and stress testing are both types of performance testing and can be combined. Load testing determines the system's performance under various workloads, aiming to understand how various performance metrics change as the load gradually increases. Stress testing identifies a system's bottlenecks or unacceptable performance points to determine the maximum service level the system can provide.
[0003] Currently, it generally relies on database administrators or system maintenance personnel to monitor application runtime data, conduct performance tests on the application, and optimize application parameters based on the test results to ensure that the system environment is compatible with the application's runtime characteristics in order to achieve better performance. Due to the low-level and special nature of system software, the number of parameters that need to be adjusted is usually quite large.
[0004] Regarding the aforementioned technologies, the inventors believe that because there are many parameters that need to be adjusted, some testers are not clear about the testing methods and optimization techniques. They usually choose to consult materials or ask experienced people, which leads to a decrease in the efficiency of obtaining performance testing and optimization solutions for applications. Summary of the Invention
[0005] To improve the efficiency of obtaining performance testing and optimization solutions for applications when testers are unclear about testing methods or optimization techniques, this application provides a method and system for recommending performance testing and optimization solutions.
[0006] Firstly, this application provides a recommended method for performance testing and optimization, which adopts the following technical solution: A recommended method for performance testing and tuning, applied to servers, includes: Obtain historical performance test plans and corresponding optimization plans for all applications in the test platform; Based on the historical performance test schemes and corresponding optimization schemes of all applications, an optimization scheme database is constructed, which includes a test scheme recommendation module and an optimization scheme recommendation module. Get the test plan recommendation request for the current application sent by the test client; Based on the test plan recommendation request, the test plan recommendation module is controlled to generate a recommended test plan for the current application, and then sent to the test terminal; Alternatively, obtain the optimization suggestion request for the current application sent by the test end; Based on the optimization scheme recommendation request, the optimization scheme recommendation module is controlled to generate a recommended optimization scheme for the current application, and then sent to the test terminal.
[0007] By adopting the above technical solution, the server collects all historical performance test plans and corresponding optimization plans of all applications tested and optimized through the testing platform, forming an optimization plan database. When subsequent applications encounter testing or optimization problems, this optimization plan database can automatically recommend test or optimization plans, allowing testers to directly refer to them without having to consult materials or ask experienced people, which can greatly save time and improve the efficiency of obtaining application performance testing and optimization plans.
[0008] Optionally, the step of constructing an optimization scheme database based on the historical performance test schemes and corresponding optimization schemes of all applications includes: Based on the historical performance test schemes and corresponding optimization schemes of all applications, the historical performance test schemes and corresponding optimization schemes are screened and classified, and then an optimization scheme database is constructed. Following the step of sending the recommended test plan or recommended optimization plan to the test terminal, the following is included: Obtain test result cases or optimization result cases of the current application from the test terminal, and rebuild the optimization scheme database.
[0009] By adopting the above technical solution, when obtaining historical performance test plans and corresponding optimization plans, plans with low relevance are screened out, and then classified according to different types of applications. When it is necessary to recommend test plans or optimization plans for the current application, it is easy to quickly match relevant cases of the corresponding type, thereby improving the efficiency of the server in recommending test plans or optimization plans for the current application.
[0010] Optionally, after the step of controlling the optimization scheme recommendation module to generate a recommended optimization scheme for the current application, the method further includes: Analyze the matching degree between the recommended tuning scheme and the current application; If the matching degree is lower than the preset matching degree threshold, then obtain the historical performance tuning schemes of applications on other backup platforms; By combining the historical performance tuning schemes of the applications on other backup platforms, the tuning scheme database is rebuilt; The optimization scheme recommendation module is taken back into control to generate a recommended optimization scheme for the current application.
[0011] By adopting the above technical solution, under normal circumstances, the server will recommend optimization solutions based on existing cases in the optimization solution database. However, the closest historical case may not necessarily match the current application. Therefore, more relevant historical performance optimization solutions need to be obtained from the backup platform, and the optimization solution database is rebuilt so that the optimization solution database is constantly undergoing deep learning, thereby matching and recommending performance optimization solutions that are more suitable for the current application.
[0012] Optionally, the step of analyzing the matching degree between the recommended optimization scheme and the current application includes: Analyze the reference data of the recommended tuning scheme and the reference data of the current application. The reference data includes workload traffic, number of load generators, type of scripts written, and user thinking time. Based on the reference data of the recommended optimization scheme and the reference data of the current application, the matching degree between the recommended optimization scheme and the current application is obtained.
[0013] By adopting the above technical solution, and by matching dimensions such as workload traffic, number of load generators, type of scripts written, and user thinking time, the accuracy of the matching can be improved.
[0014] Optionally, the step of analyzing the reference data for the recommended optimization scheme and the reference data for the current application includes: Based on the number of load generators in the recommended tuning scheme and the number of load generators in the current application, the number of virtual users for both is analyzed. Obtain the difference in the number of virtual users between the two. If the difference reaches a preset difference threshold, determine whether the number of virtual users in the recommended optimization scheme is greater than the number of virtual users in the current application. If the number of virtual users in the recommended optimization scheme is greater than the number of virtual users in the current application; Send a request to the test server asking whether real users who have linked to the difference need to participate in performance testing and tuning; The test client sends a request to real users who need to link to the difference to participate in performance testing and optimization. Real users who contributed to the linking of the differences participated in performance testing and optimization.
[0015] By adopting the above technical solution, when obtaining reference data for the recommended tuning scheme and the current application, in addition to analyzing the script type, the number of load generators in both is also analyzed. The number of load generators reflects the number of virtual users participating in the performance test. Each virtual user corresponds to one set of test data. If the number of virtual users participating in the performance test in the recommended tuning scheme is significantly greater than the number of virtual users in the current application, it is necessary to consider whether the current application needs to supplement the number of virtual users to improve the accuracy of the performance test. At the same time, because over-utilizing virtual users always carries the risk of unreliable test results, real users will be selected to participate in the performance test during the adjustment process. This improves the accuracy of the test results and also helps the server to more accurately recommend tuning schemes in the later stages.
[0016] Optionally, after the step of determining whether the number of virtual users in the recommended optimization scheme is greater than the number of virtual users in the current application, the method further includes: If the number of virtual users in the recommended optimization scheme is not greater than the number of virtual users in the current application; Reduce the number of load generators in the current application.
[0017] By adopting the above technical solution, if the number of virtual users in the current application is too large, in order to improve the adaptability with the recommended optimization scheme, the number of load generators in the current application is reduced, thereby improving the adaptability between the two.
[0018] Optionally, after analyzing the user thought time of the recommended tuning scheme and the user thought time of the current application, the following steps are included: Obtain the difference in user thinking time between the two; Determine whether the difference between the user's thinking time and the difference between the two is within a preset range. If it is not within the preset difference range, obtain the average user thinking time of real users using the current application; The recommended optimization scheme is adjusted based on the average user thinking time of real users using the current application, and then recommended to the test server.
[0019] If the difference between the user thinking time of the two users is too large when the above technical solution is adopted, it is necessary to reflect on whether there is a situation where the user thinking time of the virtual user is incorrectly set. Therefore, it is necessary to combine the user thinking time of the real user to verify and optimize the recommendation optimization solution, so as to make the recommendation optimization solution more reliable.
[0020] Secondly, the performance testing and optimization scheme recommendation system provided in this application adopts the following technical solution: A performance testing and tuning scheme recommendation system, wherein the system is a server, comprising: The acquisition module is used to acquire the historical performance test plans and corresponding optimization plans of all applications in the test platform; The processing module is used to construct an optimization scheme database based on the historical performance test schemes and corresponding optimization schemes of all applications. The optimization scheme database includes a test scheme recommendation module and an optimization scheme recommendation module. The acquisition module is also used to acquire the test plan recommendation request for the current application sent by the test terminal; The processing module is also used to control the test plan recommendation module to generate a recommended test plan for the current application based on the test plan recommendation request; The sending module is used to send the recommended test plan of the current application to the test terminal; The acquisition module is also used to acquire the optimization scheme recommendation request for the current application sent by the test terminal; The processing module also controls the optimization scheme recommendation module to generate a recommended optimization scheme for the current application based on the optimization scheme recommendation request. The sending module is used to send the recommended optimization scheme of the current application to the test terminal.
[0021] By adopting the above technical solution, the server collects all historical performance test plans and corresponding optimization plans of all applications tested and optimized through the testing platform, forming an optimization plan database. When subsequent applications encounter testing or optimization problems, this optimization plan database can automatically recommend test or optimization plans, allowing testers to directly refer to them without having to consult materials or ask experienced people, which can greatly save time and improve the efficiency of obtaining application performance testing and optimization plans.
[0022] Thirdly, the computer device provided in this application adopts the following technical solution: A computer device includes a processor, a memory, a user interface, and a network interface. The memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory to cause the computer device to perform the method described above.
[0023] Fourthly, the computer-readable storage medium provided in this application adopts the following technical solution: A computer-readable storage medium storing instructions that, when executed, perform the steps of the method described above.
[0024] In summary, this application includes the following beneficial technical effects: 1. The server collects all historical performance test plans and corresponding optimization plans of all applications tested and optimized through this testing platform, forming an optimization plan database. When the application encounters testing or optimization problems in the future, the optimization plan database can automatically recommend performance test plans or optimization plans. Testers do not need to look up information or ask experienced people, which can save a lot of time and improve the efficiency of obtaining performance test and optimization plans for applications. 2. Analyze the recommended tuning scheme and the number of load generators in the current application. The number of load generators reflects the number of virtual users participating in performance testing. If the number of virtual users participating in performance testing in the recommended tuning scheme is significantly higher than the number of virtual users in the current application, it is necessary to consider whether the current application needs to add more virtual users to improve the accuracy of the performance test. Simultaneously, during the performance testing adjustment process, real users will be selected to participate in the testing, thereby improving the accuracy of the test results and facilitating more precise tuning in the later stages. Attached Figure Description
[0025] Figure 1 This is an overall flowchart of a performance testing and optimization scheme recommendation method according to an embodiment of this application; Figure 2 yes Figure 1 The flowchart of step S400 in the middle section; Figure 3 yes Figure 2 The flowchart of step S410; Figure 4 yes Figure 3 The flowchart of step S411 in the middle section; Figure 5 yes Figure 4 The flowchart after step S411d; Figure 6 This is a schematic diagram of the structure of a customized enterprise information batch push system according to an embodiment of this application; Figure 7 This is a schematic diagram of the structure of a computer device according to an embodiment of this application.
[0026] Explanation of reference numerals in the attached figures: 1. Acquisition module; 2. Processing module; 3. Transmission module; 400. Computer equipment; 401. Processor; 402. Communication bus; 403. User interface; 404. Network interface; 405. Memory. Detailed Implementation
[0027] The following is in conjunction with the appendix Figure 1-7 This application will be described in further detail.
[0028] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0029] In the description of the embodiments of this application, words such as "illustrative," "for example," or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "illustrative," "for example," or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Rather, the use of words such as "illustrative," "for example," or "for example" is intended to present the relevant concepts in a specific manner.
[0030] Furthermore, the terms "first," "second," etc., used in this application specification are used to distinguish different objects, rather than to describe a specific order, and may explicitly or implicitly include one or more of the features.
[0031] This application discloses a customized method for batch pushing enterprise information, applied in a server, as shown in the following embodiments. Figure 1 This includes steps S100 to S500: Step S100: Obtain the historical performance test plans and corresponding optimization plans for all applications in the test platform.
[0032] Specifically, the testing platform can be x86, ARM, etc., and the testing tools can be kylinTOP testing and monitoring platform, kylinPET, LoadRunner, Apache Jmeter, OpenSTA, Load Impact, Locust, etc. For example, if historical data shows that 50 applications were tested using LoadRunner on an x86 testing platform with corresponding optimization schemes, then the historical performance test schemes and corresponding optimization schemes for these 50 applications can be obtained.
[0033] Step S200: Based on the historical performance test plans and corresponding optimization plans of all applications, construct an optimization plan database, which includes a test plan recommendation module and an optimization plan recommendation module.
[0034] Before building the optimization solution database, it is necessary to filter and categorize historical performance test solutions and corresponding optimization solutions for all applications. Solutions with low relevance are screened out, and then categorized according to different types of applications. When it is necessary to recommend test solutions or optimization solutions for the current application, it is easy to quickly match relevant cases of the corresponding type, such as relevant cases for lifestyle, social, office, photography, audio, news, and shopping applications.
[0035] Step S300: Obtain the test plan recommendation request for the current application sent by the test terminal.
[0036] Alternatively, retrieve the optimization recommendation request for the current application sent by the test server.
[0037] Step S400: Based on the test plan recommendation request, control the test plan recommendation module to generate a recommended test plan for the current application.
[0038] Alternatively, based on the optimization scheme recommendation request, the optimization scheme recommendation module can be controlled to generate a recommended optimization scheme for the current application.
[0039] Specifically, when testers are unfamiliar with performance testing methodologies, unclear about the architecture and optimization techniques of the testing platform, and the test results fail to meet requirements, or when they have doubts about the testing methods or optimization solutions, the test solution recommendation module and the optimization solution recommendation module will select from previous test solutions or optimization solutions for similar applications, and then recommend the most suitable test solution or optimization solution for the current application. It should be noted that the test solution recommendation module and the optimization solution recommendation module use existing algorithm programs and have the function of matching data.
[0040] Step S500: Send the recommended test plan or recommended optimization plan to the test terminal.
[0041] By obtaining the test plan or optimization plan, and by referring to the relevant execution scripts and performance parameters of the test plan or optimization plan, testers on the testing side can better understand the next performance testing steps or better understand how to optimize performance parameters.
[0042] After sending the recommended test plan or recommended tuning plan to the test server, the following steps are included: Obtain test result cases or optimization result cases of the current application from the test terminal, and rebuild the optimization scheme database.
[0043] Specifically, since the optimization scheme database is in a continuous optimization process, after the current application test is completed or optimization is performed, the test result cases or optimization result cases are fed back to the optimization scheme database to enrich the data in the optimization scheme database, thereby improving the accuracy of subsequent recommended performance test schemes or optimization schemes.
[0044] In another embodiment, reference is made to Figure 2 Step S400 involves constructing an optimization scheme database based on historical performance test schemes and corresponding optimization schemes for all applications, including steps S410-S450: Step S410: Analyze the matching degree between the recommended tuning scheme and the current application.
[0045] Step S420: Determine whether the matching degree is lower than the preset matching degree threshold.
[0046] Step S430: If the matching degree is lower than the preset matching degree threshold, obtain the historical performance tuning scheme of other backup platform applications; if the matching degree is not lower than the preset matching degree threshold, send the recommended tuning scheme to the test end.
[0047] Step S440: After obtaining the historical performance tuning schemes of applications on other backup platforms, rebuild the tuning scheme database by combining the historical performance tuning schemes of applications on other backup platforms.
[0048] Step S450: Re-control the optimization scheme recommendation module to generate the recommended optimization scheme for the current application.
[0049] In another embodiment, reference is made to Figure 3 The analysis of the matching degree between the recommended tuning scheme and the current application in step S410 includes steps S411 to S412.
[0050] Step S411: Analyze the reference data for the recommended optimization scheme and the reference data for the current application. The reference data includes workload traffic, number of load generators, script type, and user thinking time.
[0051] Step S412: Based on the reference data of the recommended optimization scheme and the reference data of the current application, obtain the matching degree between the recommended optimization scheme and the current application.
[0052] Specifically, when analyzing the matching degree between the recommended optimization plan and the current application, we match some typical reference data, such as workload traffic, number of load generators, script types, and user thinking time, and match them one by one from these dimensions. When the overall matching degree reaches the matching degree threshold, it means that the recommended optimization plan can be used as a reference by testers on the test side. For example, the matching degree of workload traffic, number of load generators, script type, and user thinking time is calculated as 100%. The matching degree of these four dimensions is measured separately, and then the average of the four matching degrees is the matching degree between the recommended tuning solution in this solution and the current application. If the matching degree after averaging is 75%, it reaches the matching degree threshold (70%), which means that the recommended tuning solution can be used as a reference by testers on the test side. At the same time, if the matching degree threshold (70%) is not reached, it is necessary to refer to some tuning cases on other test platforms (such as x86 and ARM platforms), and then integrate these cases into the tuning solution database. Then, the server controls the recommended tuning solution module to recommend more accurate tuning solutions to the test side, so that the tuning solution database is constantly supplemented with new cases and is in deep learning.
[0053] In another embodiment, reference is made to Figure 4 Step S411 includes steps S411a to S411g after analyzing the reference data for the recommended tuning scheme and the reference data for the current application.
[0054] Step S411a: Based on the number of load generators in the recommended tuning scheme and the number of load generators in the current application, analyze the number of virtual users for both.
[0055] Step S411b: Obtain the difference in the number of virtual users between the two.
[0056] Step S411c: Determine whether the difference in the number of virtual users between the two reaches a preset difference threshold.
[0057] Step S411d: If the difference reaches the preset difference threshold, determine whether the number of virtual users of the recommended optimization scheme is greater than the number of virtual users of the current application; if the difference does not reach the preset difference threshold, analyze the user thinking time of the two.
[0058] Step S411e: If the number of virtual users in the recommended tuning scheme is greater than the number of virtual users in the current application, send a request to the test server asking whether real users who need to connect the difference should participate in performance testing and tuning; if the number of virtual users in the recommended tuning scheme is not greater than the number of virtual users in the current application, reduce the number of load generators in the current application.
[0059] Step S411f: Obtain the real users who need to participate in performance testing and optimization, sent by the test end, to determine the connection difference.
[0060] Step S411g: Real users participate in performance testing and optimization of the link difference.
[0061] Specifically, in this solution, a preferred matching analysis method is to sequentially obtain the matching degree of script type, number of load generators, user think time, and workload traffic. Script type plays a crucial role, as it can initially determine whether the two types are suitable; therefore, the matching degree of script type is obtained first by default. If the matching degree of script type meets the requirements, the matching degree of load generator is then obtained; if the matching degree of load generator meets the requirements, the matching degree of user think time is then obtained; and so on, until finally obtaining the matching degree of workload traffic.
[0062] At the same time, ensure the load generators are ready to handle the workload. Load generators are the computers that run virtual user tests. Virtual users can use scripts or applications, behaving similarly to real users simultaneously making requests to the application and system under test. Here are some things to consider: during performance testing, suspend any unnecessary software from the computer, ensure a network connection with sufficient bandwidth, etc.; if running many virtual users, many load generators are needed; understanding all of these is important because overusing the load generator itself always carries the risk of unreliable test results. When determining the suitability of load generators, many load generators are needed if running many virtual users.
[0063] The number of load generators reflects the number of virtual users participating in performance testing. Each virtual user corresponds to a set of test data. If the number of virtual users participating in performance testing in the recommended tuning scheme is much greater than the number of virtual users in the current application, it is necessary to consider whether the current application needs to add more virtual users to improve the accuracy of the current application's performance testing.
[0064] Based on the above considerations, when the difference in the number of virtual users (e.g., 100) reaches a preset difference threshold (e.g., 50), it is necessary to inquire with the testing team whether real users should participate in performance testing or performance tuning. This is because the participation of real users improves the accuracy of test results. Specifically, if the testers on the testing team have questions or are unclear about the tuning plan at this point, and the difference in the number of virtual users is relatively large, it is necessary to return to the previous performance testing process. Therefore, real users should be reconnected or a new load generator should be added to supplement the test data, reducing the randomness of the performance test results. If the current application has too many virtual users, to adapt to the recommended tuning plan, the number of load generators in the current application should be reduced to keep the number of virtual users consistent with the current application, thereby improving their compatibility and facilitating later tuning. Therefore, this solution can not only recommend a tuning plan but also correct inappropriate parameter configurations during performance testing or tuning.
[0065] In another embodiment, reference is made to Figure 5 Step S411d includes steps S411A to S411D after analyzing the user thinking time of both.
[0066] Step S411A: Obtain the difference between the user thinking time of the two.
[0067] Step S411B: Determine whether the difference between the user thinking time of the two is within the preset difference range.
[0068] Step S411C: If it is not within the preset difference range, obtain the average user thinking time of real users using the current application; if it is within the preset difference range, analyze the workload traffic of the recommended tuning scheme and the workload traffic of the current application.
[0069] Specifically, based on the above explanation, if the difference in user thinking time between the two (e.g., 5 seconds) is within the preset difference range (2~4 seconds), it indicates that the matching degree of user thinking time between the two meets the requirements, and then the analysis of the matching degree of workload traffic continues; if the difference is not within the preset difference range, it indicates that there may be a problem, and it is necessary to verify the average thinking time of real users using the current application.
[0070] Step S411D: After obtaining the average user thinking time of real users using the current application, adjust the recommended optimization scheme based on the average user thinking time of real users using the current application, and recommend it to the test end.
[0071] User think time is a crucial component of script logic, and all tools should have the ability to increase think time by specifying how many seconds the virtual user is expected to wait. User think time is useful for mimicking the correct workload based on the actual behavior of virtual users; improper use of think time is another common performance testing error. If the difference between the actual and real user think times is too large, it's necessary to reconsider whether the virtual user think time has been incorrectly set. Therefore, it's necessary to combine the real user think times to verify and optimize the recommended tuning scheme, making it more reliable.
[0072] Reference Figure 6 This application discloses a customized enterprise information batch push system, which is a server and includes an acquisition module, a processing module and a sending module.
[0073] The acquisition module is used to acquire historical performance test plans and corresponding optimization plans for all applications in the test platform. The processing module is used to build an optimization scheme database based on the historical performance test schemes and corresponding optimization schemes of all applications. The optimization scheme database includes a test scheme recommendation module and an optimization scheme recommendation module. The acquisition module is also used to acquire the test plan recommendation request for the current application sent by the test terminal; The processing module is also used to control the test plan recommendation module to generate recommended test plans for the current application based on the test plan recommendation request; The sending module is used to send the recommended test plan for the current application to the test server; The acquisition module is also used to acquire the optimization scheme recommendation request for the current application sent by the test terminal; The processing module also uses the optimization scheme recommendation request to control the optimization scheme recommendation module to generate the recommended optimization scheme for the current application; The sending module is used to send the recommended optimization scheme for the current application to the test server.
[0074] In another embodiment, the processing module is also used to analyze reference data for recommended tuning schemes and reference data for the current application. The reference data includes workload traffic, number of load generators, script type, and user thinking time.
[0075] The processing module is also used to obtain the matching degree between the recommended optimization scheme and the current application based on the reference data of the recommended optimization scheme and the reference data of the current application.
[0076] In another embodiment, the processing module is further configured to analyze and obtain the number of virtual users based on the number of load generators in the recommended tuning scheme and the number of load generators in the current application.
[0077] The acquisition module is also used to obtain the difference in the number of virtual users between the two.
[0078] The processing module is also used to determine whether the difference in the number of virtual users between the two reaches a preset difference threshold.
[0079] The processing module is also used to determine whether the number of virtual users of the recommended optimization scheme is greater than the number of virtual users of the current application when the difference reaches a preset difference threshold; and to analyze the user thinking time of the two when the difference does not reach the preset difference threshold.
[0080] If the number of virtual users in the recommended tuning scheme is greater than the number of virtual users in the current application, the sending module is also used to send a request to the test end to determine whether real users with the connection difference need to participate in performance testing and tuning; if the number of virtual users in the recommended tuning scheme is not greater than the number of virtual users in the current application, the processing module is also used to reduce the number of load generators in the current application.
[0081] The acquisition module is also used to acquire real users who need to participate in performance testing and optimization by sending connection differences from the test end.
[0082] The processing module is also used to link real users who contribute to performance testing and optimization.
[0083] In another embodiment, the acquisition module is also used to acquire the difference between the user's thinking time and that of the two users.
[0084] The processing module is also used to determine whether the difference between the user thinking time of the two is within a preset difference range; if it is not within the preset difference range, the acquisition module is also used to acquire the average user thinking time of real users using the current application; if it is within the preset difference range, the workload traffic of the recommended optimization scheme and the workload traffic of the current application are analyzed.
[0085] The acquisition module is also used to obtain the average user thinking time of real users using the current application, and then adjust the recommended optimization scheme based on the average user thinking time of real users using the current application, and recommend it to the test end.
[0086] It should be noted that the system provided in the above embodiments is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.
[0087] Please see Figure 7 , Figure 7 This application provides a schematic diagram of the structure of a computer device. For example... Figure 7 As shown, the computer device 400 may include: at least one processor 401, at least one network interface 404, user interface 403, memory 405, and at least one communication bus 402.
[0088] The communication bus 402 is used to enable communication between these components.
[0089] The user interface 403 may include a display screen and a camera. The user interface 403 may also include a standard wired interface and a wireless interface.
[0090] The network interface 404 may include standard wired interfaces and wireless interfaces (such as Wi-Fi interfaces).
[0091] The processor 401 may include one or more processing cores. The processor 401 connects to various parts of the server using various interfaces and lines, and performs various server functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in memory 405, and by calling data stored in memory 405. Optionally, the processor 401 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 401 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and application requests; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 401 and may be implemented as a separate chip.
[0092] The memory 405 may include random access memory (RAM) or read-only memory. Optionally, the memory 405 may include a non-transitory computer-readable storage medium. The memory 405 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 405 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 405 may also be at least one storage device located remotely from the aforementioned processor 401.
[0093] like Figure 7 As shown, this application provides a computer-readable storage medium storing instructions that, when executed, perform the method steps of any embodiment.
[0094] The memory 405, as a computer-readable storage medium, may include an operating system, a network communication module, a user interface module, and an application program that recommends performance testing and tuning methods. Figure 7 In the computer device 400 shown, the user interface 403 is mainly used to provide an input interface for the user and to obtain the user input data; while the processor 401 can be used to call the application program recommended by the storage performance test and optimization scheme in the memory 405. When executed by one or more processors, the computer device 400 performs one or more methods as described in the above embodiments.
[0095] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0096] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0097] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the shown or discussed mutual couplings or direct couplings or communication connections may be through some service interfaces; indirect couplings or communication connections between apparatuses or units may be electrical or other forms.
[0098] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0099] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0100] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, portable hard drives, magnetic disks, or optical disks.
[0101] The above are merely exemplary embodiments of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Those skilled in the art will readily conceive of other embodiments of this disclosure upon considering the specification and the disclosure of practical truths. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described in this disclosure.
[0102] The above are all preferred embodiments of this application, and are not intended to limit the scope of protection of this application. Therefore, all equivalent changes made in accordance with the structure, shape and principle of this application should be covered within the scope of protection of this application.
Claims
1. A method for recommending performance testing and tuning schemes, applied in servers, characterized in that, include: Obtain historical performance test plans and corresponding optimization plans for all applications in the test platform; Based on the historical performance test schemes and corresponding optimization schemes of all applications, an optimization scheme database is constructed, which includes a test scheme recommendation module and an optimization scheme recommendation module. Get the test plan recommendation request for the current application sent by the test client; Based on the test plan recommendation request, the test plan recommendation module is controlled to generate a recommended test plan for the current application, and then sent to the test terminal; Alternatively, obtain the optimization suggestion request for the current application sent by the test end; Based on the optimization scheme recommendation request, the optimization scheme recommendation module is controlled to generate a recommended optimization scheme for the current application, and then sent to the test terminal; Analyze the matching degree between the recommended tuning scheme and the current application; If the matching degree is lower than the preset matching degree threshold, then obtain the historical performance tuning schemes of applications on other backup platforms; By combining the historical performance tuning schemes of the applications on other backup platforms, the tuning scheme database is rebuilt; The optimization scheme recommendation module is taken back into control to generate a recommended optimization scheme for the current application; The analysis of the matching degree between the recommended optimization scheme and the current application includes: Analyze the reference data of the recommended tuning scheme and the reference data of the current application. The reference data includes workload traffic, number of load generators, type of script written, and user thinking time. Based on the reference data of the recommended optimization scheme and the reference data of the current application, the matching degree between the recommended optimization scheme and the current application is obtained; Based on the number of load generators in the recommended tuning scheme and the number of load generators in the current application, the number of virtual users in both is analyzed. The number of load generators is used to reflect the number of virtual users participating in the performance test. Obtain the difference in the number of virtual users between the two. If the difference reaches a preset difference threshold, determine whether the number of virtual users in the recommended optimization scheme is greater than the number of virtual users in the current application. If the number of virtual users in the recommended optimization scheme is greater than the number of virtual users in the current application, send a request to the test server asking whether it is necessary to connect real users of the difference to participate in performance testing and optimization. The test client sends a request to real users who need to link to the difference to participate in performance testing and optimization. Real users who contributed to the linking of the differences participated in performance testing and optimization.
2. The performance testing and optimization scheme recommendation method according to claim 1, characterized in that, The steps for constructing an optimization scheme database based on the historical performance test schemes and corresponding optimization schemes of all applications include: Based on the historical performance test schemes and corresponding optimization schemes of all applications, the historical performance test schemes and corresponding optimization schemes are screened and classified, and then an optimization scheme database is constructed. Following the step of sending the recommended test plan or recommended optimization plan to the test terminal, the following is included: Obtain test result cases or optimization result cases of the current application from the test terminal, and rebuild the optimization scheme database.
3. The performance testing and optimization scheme recommendation method according to claim 1, characterized in that, The step of determining whether the number of virtual users in the recommended optimization scheme is greater than the number of virtual users in the current application further includes: If the number of virtual users in the recommended optimization scheme is not greater than the number of virtual users in the current application; Reduce the number of load generators in the current application.
4. The method for recommending a performance testing and tuning scheme according to claim 1, characterized in that, After analyzing the user thought time of the recommended tuning scheme and the user thought time of the current application, the following steps are included: Obtain the difference in user thinking time between the two; Determine whether the difference between the user's thinking time and the difference between the two is within a preset range. If it is not within the preset difference range, obtain the average user thinking time of real users using the current application; The recommended optimization scheme is adjusted based on the average user thinking time of real users using the current application, and then recommended to the test server.
5. A performance testing and tuning scheme recommendation system, characterized in that, The performance testing and optimization scheme recommendation system is a server, and the server includes: The acquisition module (1) is used to acquire the historical performance test plans and corresponding optimization plans of all applications in the test platform; Processing module (2) is used to construct an optimization scheme database based on the historical performance test schemes and corresponding optimization schemes of all applications. The optimization scheme database includes a test scheme recommendation module and an optimization scheme recommendation module. The acquisition module (1) is also used to acquire the test plan recommendation request for the current application sent by the test terminal; The processing module (2) is also used to control the test plan recommendation module to generate a recommended test plan for the current application based on the test plan recommendation request; The sending module (3) is used to send the recommended test plan of the current application to the test terminal; The acquisition module (1) is also used to acquire the current application optimization scheme recommendation request sent by the test terminal; The processing module (2) is also used to control the optimization scheme recommendation module to generate a recommended optimization scheme for the current application based on the optimization scheme recommendation request; The sending module (3) is used to send the recommended optimization scheme of the current application to the test terminal; The processing module (2) is also used for: Analyze the matching degree between the recommended tuning scheme and the current application; If the matching degree is lower than the preset matching degree threshold, then obtain the historical performance tuning schemes of applications on other backup platforms; By combining the historical performance tuning schemes of the applications on other backup platforms, the tuning scheme database is rebuilt; The optimization scheme recommendation module is taken back into control to generate a recommended optimization scheme for the current application; The processing module (2) analyzes the matching degree between the recommended optimization scheme and the current application, including: Analyze the reference data of the recommended tuning scheme and the reference data of the current application. The reference data includes workload traffic, number of load generators, type of script written, and user thinking time. Based on the reference data of the recommended optimization scheme and the reference data of the current application, the matching degree between the recommended optimization scheme and the current application is obtained; Based on the number of load generators in the recommended tuning scheme and the number of load generators in the current application, the number of virtual users in both is analyzed. The number of load generators is used to reflect the number of virtual users participating in the performance test. Obtain the difference in the number of virtual users between the two. If the difference reaches a preset difference threshold, determine whether the number of virtual users in the recommended optimization scheme is greater than the number of virtual users in the current application. If the number of virtual users in the recommended optimization scheme is greater than the number of virtual users in the current application, send a request to the test server asking whether it is necessary to connect real users of the difference to participate in performance testing and optimization. The test client sends a request to real users who need to link to the difference to participate in performance testing and optimization. Real users who contributed to the linking of the differences participated in performance testing and optimization.
6. A computer device, characterized in that, The device includes a processor (401), a memory (405), a user interface (403), and a network interface (404). The memory (405) is used to store instructions. The user interface (403) and the network interface (404) are used to communicate with other devices. The processor (401) is used to execute the instructions stored in the memory (405) to cause the computer device to perform the method as described in any one of claims 1-4.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed, perform the steps of the method as described in any one of claims 1-4.
Citation Information
Patent Citations
Automatic database optimization method and device based on automatic load prediction
CN110188086A
Software test device and test method
CN111813698A