Intelligent stress testing method, device, electronic equipment and computer storage medium
By building a service topology diagram of complex software systems, the problems of low efficiency and high cost of pressure measurement in the existing technology are solved, and high efficiency pressure measurement and low cost pressure measurement results are realized in the full service link.
Patent Information
- Application Number
- CN202010219560.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-03-25
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2040-03-25
AI Technical Summary
The prior art requires a lot of human resources when conducting stress testing of complex software systems, resulting in low efficiency and high cost, and it is difficult to achieve stress testing of full service links.
By obtaining the service relationship between multiple services and services of the system to be tested, a service topology diagram is constructed, and pressure measurement is performed and pressure measurement is displayed based on this diagram.
The labor cost required for pressure testing is reduced, and efficient pressure testing for multiple services and full service links is achieved, and the cost is low.
Smart Images

Figure HDA0002425605370000011 
Figure HDA0002425605370000012 
Figure HDA0002425605370000021
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of computer technology, and in particular to an intelligent stress testing method, device, electronic device, and computer storage medium. Background Art
[0002] Stress testing is a testing method to establish system stability and to examine system functional limits and hidden dangers.
[0003] Usually, a complex software system may consist of dozens or even more services. Currently, stress testing of complex software systems is achieved by stress testing each service in the system separately. However, the normality of stress testing of a single service does not mean the normality of multiple services included in the system or the normality of the entire service link (the service link composed of all services in the system). If you want to perform stress testing of multiple services or the entire service link, you need to combine the human resources of the related services of the complex software system. Each service must ensure a certain single-machine performance. When performing stress testing, you also need to invest manpower to pay attention to the status of each service. This not only causes a large amount of human resources waste, but also makes stress testing of multiple services or the entire service link inefficient, and the implementation cost of stress testing is too high. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides an intelligent stress testing solution to at least partially solve the above problems.
[0005] According to a first aspect of an embodiment of the present invention, an intelligent stress testing method is provided, comprising: obtaining multiple services used by a system to be stress tested and service relationships between the multiple services; constructing a service topology map for the multiple services based on the service relationships; stress testing the multiple services based on the service topology map, and displaying the stress testing results through the service topology map.
[0006] According to a second aspect of an embodiment of the present invention, an intelligent stress testing device is provided, including: an information acquisition module, used to obtain multiple services used by a system to be stress tested and service relationships between the multiple services; a construction module, used to construct a service topology map for the multiple services based on the service relationships; a stress testing module, used to perform stress testing on the multiple services based on the service topology map, and display the stress testing results through the service topology map.
[0007] According to a third aspect of an embodiment of the present invention, there is provided an electronic device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other through the communication bus; the memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the intelligent stress testing method described in the first aspect.
[0008] According to a fourth aspect of an embodiment of the present invention, a computer storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the intelligent stress testing method as described in the first aspect is implemented.
[0009] According to the intelligent stress testing solution provided by the embodiment of the present invention, a corresponding service topology diagram including multiple services is constructed based on multiple services used by the system to be stress tested and the service relationships between the multiple services. When the multiple services are all services used by the system to be stress tested, the constructed service topology diagram is the service topology diagram of the full service link of the system to be stress tested. In addition, the stress testing results are displayed through the service topology diagram. Therefore, on the one hand, no matter which service is stress tested, the tester can obtain information and results related to the stress test through a service topology diagram, without having to be on duty specifically for the service to be stress tested, which greatly reduces the manpower cost required for the stress test; on the other hand, the stress test of different services can be achieved through the service topology diagram, which is simple, efficient and low-cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the embodiments of the present invention 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, the drawings described below are only some embodiments recorded in the embodiments of the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0011] Figure 1A This is a flowchart of a smart stress testing method according to Embodiment 1 of the present invention;
[0012] Figure 1B for Figure 1A A schematic diagram of a usage scenario of the illustrated embodiment;
[0013] Figure 2A This is a flowchart of a smart stress testing method according to Embodiment 2 of the present invention;
[0014] Figure 2B for Figure 2A A schematic diagram of a process of constructing a service topology diagram in the illustrated embodiment;
[0015] Figure 2C for Figure 2A An example diagram of a service topology showing stress testing results in the illustrated embodiment;
[0016] Figure 2D for Figure 2A A schematic diagram of a usage scenario in the illustrated embodiment;
[0017] Figure 3 This is a structural block diagram of an intelligent stress testing device according to Embodiment 3 of the present invention;
[0018] Figure 4 This is a structural block diagram of an intelligent stress testing device according to Embodiment 4 of the present invention;
[0019] Figure 5 FIG. 4 is a schematic diagram of the structure of an electronic device according to Embodiment 5 of the present invention. DETAILED DESCRIPTION
[0020] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the embodiments of the present invention should fall within the scope of protection of the embodiments of the present invention.
[0021] The specific implementation of the embodiment of the present invention is further described below in conjunction with the accompanying drawings of the embodiment of the present invention.
[0022] Embodiment 1
[0023] Reference Figure 1A , shows a step flow chart of an intelligent stress testing method according to embodiment 1 of the present invention.
[0024] The intelligent stress testing method of this embodiment includes the following steps:
[0025] Step S102: Acquire multiple services used by the system to be stress tested and service relationships between the multiple services.
[0026] In this embodiment, the system to be stress-tested can be any appropriate system implemented by services, for example, an application or platform including multiple service function modules, or a system composed of services used by multiple applications, etc. The embodiment of the present invention does not limit the specific form of the system to be stress-tested. The service is used to implement certain business functions (for example, data acquisition function, data upload function, data processing function, data download function, data push function, etc.). In this embodiment, the system to be stress-tested uses multiple (two or more) services to implement corresponding functions. The business functions implemented by each of the multiple services can be the same, different, or partially the same and partially different.
[0027] The service relationship between each service can be reflected through the calling relationship or data transmission relationship between the services.
[0028] Step S104: constructing a service topology map for multiple services according to the service relationship.
[0029] Since conventional service stress testing is mainly performed on a single service, there is no need for information on the service relationship between services, nor is there a need to construct a corresponding topology diagram. Since the embodiments of the present invention are committed to achieving full service link stress testing or achieving stress testing of multiple services, in the embodiments of the present invention, it is necessary to construct a service topology diagram for multiple services based on the service relationship between each service. The multiple services can be all services used by the system to be stress tested, or they can be part of all services used by the system to be stress tested.
[0030] As mentioned above, the service relationship can be a call relationship between various services or a data transmission relationship between various services. Based on this, a service topology diagram of multiple services can be constructed. Through this service topology diagram, in addition to intuitively displaying the services used by the system to be stress tested and the service relationships between various services, the corresponding stress test results can be displayed later, and even service status information that characterizes the service status of each service can be displayed.
[0031] Step S106: stress testing is performed on multiple services based on the service topology diagram, and the stress testing results are displayed through the service topology diagram.
[0032] For example, you can select the service to be stress-tested (i.e., the service to be stress-tested) through the service topology map, and then perform stress testing on the service according to the stress configuration, and display the stress testing results through the service topology map. The stress configuration can be pre-set and obtained when needed, or it can be set on-site when stress testing is required. It can be set on the platform where the service topology map is located, or it can be set through other means and then obtained through the corresponding interface and applied to the service to be stress-tested.
[0033] A scenario of the above process is shown below: Figure 1B As shown, Figure 1B In the example, business platform X provides information about the five services it uses and the service relationships between the five services. For example, service A calls services B and C respectively, service B calls service D, and service D further calls service E. After the intelligent stress testing platform obtains the information about the above services and the call information between the services from business platform X, it constructs a service topology diagram for display, such as Figure 1B After the service topology is constructed, the services displayed in the service topology can be stress-tested according to the set rules (such as timing and sequencing rules, etc., which can be appropriately set by technical personnel in this field according to actual conditions) or according to the triggering of the test personnel. Figure 1B In the example of stress testing service A (shown as a double-line frame in the figure), after obtaining the stress test results, they are displayed through the service topology diagram, such as Figure 1B As shown in the dashed box below in the intelligent stress testing platform.
[0034] It can be seen that through this embodiment, a corresponding service topology diagram including multiple services is constructed according to the multiple services used by the system to be stress tested and the service relationship between the multiple services. When the multiple services are all the services used by the system to be stress tested, the constructed service topology diagram is the service topology diagram of the full service link of the system to be stress tested. And the stress test results are displayed through the service topology diagram. Therefore, on the one hand, no matter which service is stress tested, the tester can obtain the information and results related to the stress test through a service topology diagram, without having to be on duty specifically for the service to be stress tested, which greatly reduces the manpower cost required for the stress test; on the other hand, the stress test of different services can be realized through the service topology diagram, which is simple, efficient and low-cost.
[0035] The intelligent stress testing method of this embodiment can be executed by any appropriate electronic device with data processing capabilities, including but not limited to: a server, a cloud device, and a PC.
[0036] Embodiment 2
[0037] Reference Figure 2A , shows a step flow chart of an intelligent stress testing method according to embodiment 2 of the present invention.
[0038] The intelligent stress testing method of this embodiment includes the following steps:
[0039] Step S202: Acquire multiple services used by the system to be stress tested and service relationships between the multiple services.
[0040] In this embodiment, the service relationship between each service is set as the calling relationship between each service. The calling relationship can clearly represent the relationship between the calling service and the called service, and most of the time the calling relationship is a one-way relationship, which can provide an accurate basis for the subsequent construction of the service topology map.
[0041] As mentioned above, the system to be stress-tested can be any appropriate system. In this embodiment, the online service search system is taken as an example. The trace platform in this system provides the call tracking function of the service provided by the system. Among them, the trace platform is the abbreviation of the system call tracking system. Through this platform, the call chain relationship between various services of a user request of the software system can be obtained. Each service can output information on the call chain, including but not limited to the call relationship information and debug information. Therefore, the topological relationship of each service of the entire software system can be obtained according to the information output in the trace platform. However, it is not limited to the trace platform. Other platforms or applications that can provide information on the services used and the service relationship between services can be applicable to the scheme of the embodiment of the present invention. It should be noted that in other systems such as e-commerce systems, etc., the trace platform can also be used to provide call tracking functions for them.
[0042] Step S204: construct a service topology map for multiple services according to the service relationship between each service.
[0043] When the service relationship between the services is a calling relationship between the services, a service topology diagram may be constructed for the multiple services according to the calling relationship between the services.
[0044] Still taking the information of multiple services and the call relationship between each service obtained based on the trace platform as an example, the process of building a service topology diagram is as follows: Figure 2B As shown. Figure 2B As can be seen in the figure, the information of six services, namely, services AF, and the calling relationships between these six services are obtained from the trace platform. For example, service A calls services B and C respectively, among which service B calls services D and E respectively, and service C calls service F. Based on this, each service is taken as a node, and according to the calling relationship between services, directed edges are constructed between the nodes corresponding to the services with calling relationships. Finally, the service topology diagram can be obtained based on the constructed nodes and directed edges between nodes, as shown in the figure below. Figure 2B Shown in the dashed box.
[0045] Step S206: Perform stress testing on multiple services based on the service topology diagram.
[0046] In a feasible manner, this step can be implemented as follows: selecting a service to be stress tested from multiple services displayed in the service topology diagram; performing stress testing on the service to be stress tested, and displaying the impact of the stress testing on all services in the service topology diagram through the service topology diagram.
[0047] Among them, when selecting the service to be stress-tested, any appropriate means can be used to implement it. In one feasible way, the stress-testing rules can be set in advance, for example, according to the service topology diagram, the traversed services are stress-tested one by one in sequence by using the depth-first traversal or breadth-first traversal method. In another feasible way, the services can be stress-tested one by one in sequence according to the calling relationship of the services. In another feasible way, the intelligent stress-testing platform can provide the user with a corresponding interface, and the user can input or trigger the stress test of one or some services through the interface. Furthermore, the stress test sequence of multiple services can also be set through the interface, and so on.
[0048] In addition, during the stress test of multiple services or the stress test of the entire service chain, the stress test on the current service not only affects the current service itself, but also has an impact on its downstream services. For example, when performing traffic stress testing on service A, the traffic applied to service A will not only affect service A itself, but may also affect its downstream service BF, causing the traffic of multiple services to exceed the standard. In this case, the service topology diagram will reflect that multiple services have generated alarm information. That is, in an embodiment of the present invention, the service topology diagram not only reflects the stress test results of the current service, but also reflects the impact of the current stress test on all services in the entire service chain. As a result, the service status of the service currently undergoing stress testing and its downstream services can be intuitively displayed and monitored, rather than focusing solely on the service being stress tested, making the display of stress test results more comprehensive and more intelligent.
[0049] A service topology diagram showing stress test results is as follows: Figure 2C As shown, Figure 2C There are 9 nodes corresponding to 9 services, namely nginx service node, php service node, agg_web service node, agg_specific_logic service node, arbiter service node, relative_search service node, qp service node, timeliness service node and ha3 service node. The calling relationship between these service nodes is as follows Figure 2C As shown by the directed edges in . When the service corresponding to the nginx service node is stress tested, such as monitoring the secure QPS (Queries Per Second), it can be seen from the figure that the stress operation causes the nginx service node to alarm 10 times in half an hour. In addition, it also causes the agg_web service node to alarm once in half an hour, and the arbiter service node to alarm once in half an hour. If the number of alarms in half an hour exceeds 5 times, it means that there is a problem with the service, and the nginx service node needs to be highlighted (such as marked in red) or an alarm prompt is issued to attract the attention of the inspection personnel.
[0050] In addition, optionally, stress testing the service to be stress tested may include: performing at least one of the following monitoring on the service to be stress tested during the stress testing process: security QPS monitoring, alarm monitoring, alarm aggregation monitoring and link indicator monitoring; and stress testing the service to be stress tested based on the monitoring results of the monitoring.
[0051] in:
[0052] (1) Safe QPS monitoring: For a single-machine stress test scenario (removing an online machine from a service for stress testing), the platform calculates the limit QPS of the service's single-machine stress test based on the service's historical online QPS peak. During the stress test, the platform monitors the service's real-time QPS based on the limit QPS to prevent excessive stress test traffic from affecting the normal operation of online and downstream services.
[0053] Specifically, the acceptable limit QPS of the service to be stress tested can be calculated based on the historical QPS peak of the service to be stress tested and the peak value that has occurred during the current stress test of the service to be stress tested; and the safe QPS of the service to be stress tested can be monitored based on the limit QPS.
[0054] For example, the limiting QPS can be calculated using the following formula:
[0055] Limit QPS = (QPS peak –QPS period_max )*N
[0056] Among them, QPS peak Indicates the historical QPS peak value of the service to be tested, QPS period_max Indicates that the service to be stress tested has reached a peak value during the current stress test. N indicates the number of machines where the service to be stress tested is deployed.
[0057] Therefore, when performing safe QPS monitoring on the stress test service, there is no need to inform the downstream service as long as the stress test QPS does not exceed the limit QPS. In this case, the stress test will not cause the downstream service to crash or hang up, thereby effectively ensuring the effective execution of the stress test and the normal execution of other services.
[0058] (2) Alarm monitoring: During the stress test, the alarm data of the service will be displayed in a centralized and real-time manner, and alarm monitoring can be provided. If the number of serious alarms exceeds a certain limit, the stress test can be automatically terminated.
[0059] (3) Alarm aggregation monitoring: During the stress test, the alarm data of all services are displayed in a unified and centralized manner in real time, and the alarm link aggregation monitoring function is provided. If the number of alarms for all services exceeds a certain number, the stress test can be automatically terminated.
[0060] (4) Link indicator monitoring: During the stress test, the indicator data of all services can be displayed in a unified and centralized manner in real time, and indicator thresholds can be set for different services. If the indicators are abnormal, the stress test can be automatically terminated.
[0061] Among them, the indicator thresholds of different services may be different, and can be appropriately set by technical personnel in this field according to the service status of each service. If the indicator threshold is exceeded, it can be considered that the service has been working abnormally or has reached the extreme service state. At the same time, the stress test will be terminated immediately, and the indicator data of the service under the extreme service state will be recorded. Among them, the six major core indicators of QPS, failed_QPS, latency, queue, mem, and cpu can all set indicator thresholds. For example, the latency of the downstream service cannot exceed a certain threshold. If it exceeds, it is considered that the service is not working properly and has reached the extreme state, and the stress test needs to be terminated.
[0062] When performing stress testing, you can first switch the flow of the service to be stress tested; apply stress to the service to be stress tested after the flow switching, and perform at least one of the following monitoring on the service to be stress tested during the stress operation: security QPS monitoring, alarm monitoring, alarm aggregation monitoring, and link indicator monitoring. After the stress test is terminated normally, you can switch back to the original flow. That is, if the stress test is terminated normally, the original flow of the service to be stress tested is switched back. As a result, the stress test has almost no impact on the online users' use of the service to be stress tested.
[0063] Step S208: Display the stress test results through the service topology diagram.
[0064] After the stress test is completed, the indicator statistics can be automatically calculated based on the stress test results, the limit indicators can be automatically recorded, and the statistical reports can be automatically generated, and these data can be reported for display in the service topology diagram. For example, the limit indicator data can be reported to the service topology, and the service resource utilization status can be displayed in real time based on the service topology diagram, and used for service capacity assessment.
[0065] In addition, in this embodiment, optionally, after constructing a service topology map for multiple services, service status information corresponding to each service can also be obtained, and the service status information can be associated with the corresponding service; and the service status information associated with each service can be monitored through the service topology map. The service status information includes at least one of the following: alarm information corresponding to each service, service change information corresponding to each service, business indicator information corresponding to each service, and problem and fault information corresponding to each service. In this way, comprehensive, real-time, and effective monitoring of multiple services can be achieved.
[0066] The following is an example of stress testing the services used by the trace platform to illustrate the above process. In this example, the stress testing of the service is implemented by an independent intelligent stress testing platform, such as Figure 2D shown.
[0067] Figure 2DIn the , the intelligent stress testing platform automatically obtains and records the information of each service and the service relationship between services from the "trace platform", and displays it in the form of a service topology diagram on the front end. Through the service topology diagram, users of the intelligent stress testing platform can intuitively obtain the upstream and downstream services of each service.
[0068] In addition, in this example, the intelligent stress testing platform will also connect with other operation and maintenance platforms, and associate the information obtained from other operation and maintenance platforms with each service on the service topology through the rule classifier. For example, the alarm information of each service is obtained from the alarm platform; the change information of each service is obtained from the change management platform (the change management platform is a system platform for change approval and operation, involving all actions on the online environment, such as release deployment, configuration modification, etc., and the change information of all services can be obtained from the change management platform); the business indicator information of each service is obtained from the cluster indicator system (the cluster indicator system is responsible for collecting, displaying, and managing the business indicator data of each service, not limited to QPS, CPU usage, memory usage, failed QPS, request queue size and other indicator data); and the online problems and faults of each service are obtained from the online problem management platform. After connecting these data, various service status information of the service can be seen on the service topology diagram displayed on the front end, such as the service's QPS, failed_QPS real-time indicator data, service alarm data, service resource usage, service deployment machine information, service change information, etc. At the same time, the platform also supports monitoring of these indicator data. When some indicators are in an unreasonable state, they can be highlighted with different colors. For example, for service alarm data, if the service alarm exceeds 5 times in the last half hour, it will be displayed in red, otherwise it will be displayed in normal blue; for service resource utilization, it will be displayed in red when it is greater than 80%, in yellow when it is greater than 50%, otherwise it will be displayed in normal blue, etc. Therefore, the service topology map also has the function of locating problems. When the software system fails, the service with problems can be intuitively located according to the colors of each service node in the service topology map and / or the service status information on the service topology map.
[0069] The front-end effect of the service topology diagram can be referred to Figure 2C In the form adopted, further, each service node can have a brief description of the service status, and the service node can also be clicked to view more detailed information.
[0070] Stress testing of services is implemented based on the service topology diagram. The stress testing of the intelligent stress testing platform needs to be associated with a specific application on the service topology diagram.
[0071] The stress test execution process is divided into two main lines. One is the stress operation, that is, sending requests to the service to be stress tested on demand. Its specific implementation can refer to related technologies and will not be described in detail here. The other is intelligent monitoring during the stress test, including the aforementioned security QPS monitoring, alarm monitoring, alarm aggregation monitoring and link indicator monitoring.
[0072] With the support of intelligent monitoring functions, service stress testing is safe and secure. Therefore, the intelligent stress testing platform can provide unattended stress testing on this basis, minimizing the cost of multi-service stress testing or full-service link stress testing, and increasing the stress testing frequency to daily levels.
[0073] The process of an unattended stress test based on the above intelligent monitoring includes:
[0074] (1) Turn off the alarm: call the corresponding monitoring interface to suppress the alarm.
[0075] It should be noted that although the alarm is turned off, there are still alarm records and the intelligent stress testing platform can still obtain alarm information.
[0076] (2) Traffic switching: The software system needs to be multi-computer room, and the service capacity of a single computer room should be able to withstand the traffic of multiple computer rooms. Before stress testing, the traffic of a certain computer room needs to be switched off, so that even if excessive stress testing or stress problems occur, it will not affect online users.
[0077] (3) Flow detection: to ensure the accuracy of flow cutting.
[0078] (4) Stress: Call the stress service to perform stress testing.
[0079] (4) Conditional stop: Intelligent monitoring triggers the stress test to terminate.
[0080] (5) Traffic switching back: If the stress test is terminated normally, the traffic in the computer room is switched back. If it is terminated abnormally (such as the service is suspended and cannot be restored), a telephone alarm is triggered to notify relevant personnel to handle the matter.
[0081] (6) Traffic detection: to ensure the correctness of traffic switching back.
[0082] (7) Enable alarm: Call the corresponding monitoring interface to disable alarm suppression.
[0083] (8) Stress testing report: Automatically generate statistics and stress testing reports.
[0084] After the stress test is completed, the intelligent stress test platform can automatically perform indicator statistics, automatically record limit indicators, and automatically generate statistical reports. At the same time, it supports reporting these data to the service topology and displaying them based on the service topology diagram. For example, reporting limit indicator data to the service topology can display the service resource utilization status in real time and be used for service capacity assessment.
[0085] As can be seen from the above, the intelligent stress testing platform first builds the network topology of each service of the software system, collects various key information of each service and displays it on the service topology diagram, intuitively feedbacks the service status of the software system, such as business indicators, alarms, changes, online problems and other information.
[0086] The platform's stress testing function is implemented based on the service topology diagram. During stress testing, the status information of the service to be tested and its downstream services is intuitively displayed and monitored, rather than focusing solely on the service to be tested. At the same time, the intelligent stress testing platform provides indicator estimation, real-time warning of service links, automatic shutdown, automatic statistics, capacity assessment and other functions based on the data in the service topology diagram, making stress testing safer and more intelligent.
[0087] With the above basic capabilities, the intelligent stress testing platform also provides unattended stress testing for the entire service link, minimizing the cost of stress testing for the entire service link, thereby ensuring the service capabilities of complex systems for a long time.
[0088] The intelligent stress testing platform has a powerful information integration and display capability, and relies on this capability to provide a powerful topology dashboard and intelligent stress testing functions. For the topology dashboard, the intelligent stress testing platform integrates a lot of service status information and displays the service status in an intuitive and clear way in the form of a service topology diagram, greatly improving the efficiency of locating system problems.
[0089] For stress testing, the intelligent stress testing platform uses the data integration capabilities of the service topology map to empower stress testing. Based on the data of the service topology map, it provides information presentation, indicator estimation, link monitoring, intelligent judgment and stop, automatic statistics and other functions for stress testing, reducing the manpower input of link stress testing and making online stress testing more secure. Furthermore, the intelligent stress testing platform relies on the intelligent stress testing function to provide a safe and reliable unattended full-service link stress testing function, reducing the cost of full-service link stress testing to the extreme.
[0090] The intelligent stress testing method of this embodiment can be executed by any appropriate electronic device with data processing capabilities, including but not limited to: a server, a cloud device, and a PC.
[0091] Embodiment 3
[0092] Reference Figure 3 , shows a structural block diagram of an intelligent stress testing device according to Embodiment 3 of the present invention.
[0093] The intelligent stress testing device of this embodiment includes: an information acquisition module 302, which is used to obtain multiple services used by the system to be stress tested and the service relationships between the multiple services; a construction module 304, which is used to construct a service topology map for the multiple services based on the service relationships; a stress testing module 306, which is used to stress test the multiple services based on the service topology map, and display the stress testing results through the service topology map.
[0094] The intelligent stress testing device of this embodiment is used to implement the corresponding intelligent stress testing methods in the aforementioned multiple method embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here. In addition, the functional implementation of each module in the intelligent stress testing device of this embodiment can refer to the description of the corresponding parts in the aforementioned method embodiments, which will not be repeated here.
[0095] Embodiment 4
[0096] Reference Figure 4 , shows a structural block diagram of an intelligent stress testing device according to Embodiment 4 of the present invention.
[0097] The intelligent stress testing device of this embodiment includes: an information acquisition module 402, which is used to obtain multiple services used by the system to be stress tested and the service relationships between the multiple services; a construction module 404, which is used to construct a service topology map for the multiple services based on the service relationships; a stress testing module 406, which is used to stress test the multiple services based on the service topology map, and display the stress testing results through the service topology map.
[0098] Optionally, the service relationship between the multiple services is a calling relationship between the various services; the construction module 404 is used to construct a service topology map for the multiple services according to the calling relationship between the various services.
[0099] Optionally, the intelligent stress testing device of this embodiment also includes: a status monitoring module 408, which is used to obtain service status information corresponding to each service after the construction module 404 constructs a service topology map for the multiple services, and associate the service status information with the corresponding service; and monitor the service status information associated with each service through the service topology map.
[0100] Optionally, the service status information includes at least one of the following: alarm information corresponding to each service, service change information corresponding to each service, business indicator information corresponding to each service, and problem and fault information corresponding to each service.
[0101] Optionally, the stress testing module 406 is used to select a service to be stress tested from multiple services displayed in the service topology diagram; perform stress testing on the service to be stress tested, and display the impact of the stress testing on all services in the service topology diagram through the service topology diagram.
[0102] Optionally, the stress testing module 406 is used to select a service to be stress tested from multiple services displayed in the service topology diagram; perform at least one of the following monitoring on the service to be stress tested during the stress testing process: security QPS monitoring, alarm monitoring, alarm aggregation monitoring and link indicator monitoring; perform stress testing on the service to be stress tested based on the monitoring results; and display the impact of the stress testing on all services in the service topology diagram through the service topology diagram.
[0103] Optionally, when the monitoring includes the safe QPS monitoring, the stress testing module 406 calculates the acceptable limit QPS of the service to be stress tested based on the historical QPS peak of the service to be stress tested and the peak value that has occurred during the current stress testing of the service to be stress tested; and performs safe QPS monitoring on the service to be stress tested based on the limit QPS.
[0104] Optionally, when the stress testing module 406 performs at least one of the following monitoring on the service to be stress tested during the stress testing process: security QPS monitoring, alarm monitoring, alarm aggregation monitoring and link indicator monitoring: switches the service to be stress tested; applies stress to the service to be stress tested after the switch, and performs at least one of the following monitoring on the service to be stress tested during the stress operation: security QPS monitoring, alarm monitoring, alarm aggregation monitoring and link indicator monitoring.
[0105] Optionally, the stress testing module 406 switches back the original traffic of the service to be stress tested if the stress testing is terminated normally.
[0106] The intelligent stress testing device of this embodiment is used to implement the corresponding intelligent stress testing methods in the aforementioned multiple method embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here. In addition, the functional implementation of each module in the intelligent stress testing device of this embodiment can refer to the description of the corresponding parts in the aforementioned method embodiments, which will not be repeated here.
[0107] Embodiment 5
[0108] Reference Figure 5 , shows a schematic diagram of the structure of an electronic device according to Embodiment 5 of the present invention. The specific embodiment of the present invention does not limit the specific implementation of the electronic device.
[0109] like Figure 5 As shown, the electronic device may include: a processor (processor) 502 , a communication interface (Communications Interface) 504 , a memory (memory) 506 , and a communication bus 508 .
[0110] in:
[0111] The processor 502 , the communication interface 504 , and the memory 506 communicate with each other via a communication bus 508 .
[0112] The communication interface 504 is used to communicate with other electronic devices or servers.
[0113] The processor 502 is used to execute the program 510, and specifically can execute the relevant steps in the above-mentioned intelligent stress testing method embodiment.
[0114] Specifically, the program 510 may include program codes, which include computer operation instructions.
[0115] The processor 502 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. The one or more processors included in the smart device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0116] The memory 506 is used to store the program 510. The memory 506 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0117] Program 510 can be specifically used to enable processor 502 to perform the following operations: obtain multiple services used by the system to be stress tested and the service relationships between the multiple services; construct a service topology map for the multiple services based on the service relationships; perform stress testing on the multiple services based on the service topology map, and display the stress testing results through the service topology map.
[0118] In an optional embodiment, the service relationship between the multiple services is a calling relationship between the various services; the program 510 is also used to enable the processor 502 to construct a service topology map for the multiple services based on the service relationship, and to construct a service topology map for the multiple services based on the calling relationship between the various services.
[0119] In an optional embodiment, the program 510 is also used to enable the processor 502 to obtain service status information corresponding to each service after constructing a service topology map for the multiple services, and associate the service status information with the corresponding service; and monitor the service status information associated with each service through the service topology map.
[0120] In an optional implementation, the service status information includes at least one of the following: alarm information corresponding to each service, service change information corresponding to each service, business indicator information corresponding to each service, and problem and fault information corresponding to each service.
[0121] In an optional embodiment, the program 510 is also used to enable the processor 502 to select a service to be stress-tested from the multiple services displayed in the service topology map when stress-testing the multiple services based on the service topology map and displaying the stress-testing results through the service topology map; stress-testing the service to be stress-tested, and displaying the impact of the stress test on all services in the service topology map through the service topology map.
[0122] In an optional embodiment, the program 510 is also used to enable the processor 502 to perform at least one of the following monitoring on the service to be stress tested during the stress testing process: security QPS monitoring, alarm monitoring, alarm aggregation monitoring and link indicator monitoring; and perform stress testing on the service to be stress tested based on the monitoring results of the monitoring.
[0123] In an optional embodiment, the program 510 is also used to enable the processor 502 to calculate the acceptable limit QPS of the service to be stress tested according to the historical QPS peak value of the service to be stress tested and the peak value that has occurred during the current stress test of the service to be stress tested when the monitoring includes the safety QPS monitoring; and perform safety QPS monitoring on the service to be stress tested according to the limit QPS.
[0124] In an optional embodiment, the program 510 is also used to enable the processor 502 to cut the flow of the service to be stress tested when performing at least one of the following monitoring on the service to be stress tested during the stress testing process: security QPS monitoring, alarm monitoring, alarm aggregation monitoring and link indicator monitoring; to apply stress to the service to be stress tested after the flow cutting, and to perform at least one of the following monitoring on the service to be stress tested during the stress operation: security QPS monitoring, alarm monitoring, alarm aggregation monitoring and link indicator monitoring.
[0125] In an optional implementation, the program 510 is further configured to enable the processor 502 to switch back the original traffic of the service to be stress tested if the stress test is terminated normally.
[0126] The specific implementation of each step in program 510 can refer to the corresponding description of the corresponding steps and units in the above-mentioned intelligent stress testing method embodiment, which will not be repeated here. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described devices and modules can refer to the corresponding process description in the above-mentioned method embodiment, which will not be repeated here.
[0127] Through the electronic device of this embodiment, a corresponding service topology diagram including multiple services is constructed according to the multiple services used by the system to be stress tested and the service relationship between the multiple services. When the multiple services are all the services used by the system to be stress tested, the constructed service topology diagram is the service topology diagram of the full service link of the system to be stress tested. And the stress test results are displayed through the service topology diagram. Therefore, on the one hand, no matter which service is stress tested, the tester can obtain the information and results related to the stress test through a service topology diagram, without having to be on duty specifically for the service to be stress tested, which greatly reduces the manpower cost required for the stress test; on the other hand, the stress test of different services can be realized through the service topology diagram, which is simple, efficient and low-cost.
[0128] It should be pointed out that, according to the needs of implementation, the various components / steps described in the embodiments of the present invention can be split into more components / steps, or two or more components / steps or partial operations of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of the present invention.
[0129] The above-described method according to an embodiment of the present invention may be implemented in hardware, firmware, or may be implemented as software or computer code that may be stored in a recording medium (such as a CD ROM, RAM, floppy disk, hard disk, or magneto-optical disk), or may be implemented as computer code that is originally stored in a remote recording medium or a non-temporary machine-readable medium downloaded through a network and will be stored in a local recording medium, so that the method described herein may be stored in such software processing on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware (such as an ASIC or FPGA). It is understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code, and when the software or computer code is accessed and executed by a computer, a processor, or hardware, the intelligent stress testing method described herein is implemented. In addition, when a general-purpose computer accesses code for implementing the intelligent stress testing method shown herein, the execution of the code converts the general-purpose computer into a dedicated computer for executing the intelligent stress testing method shown herein.
[0130] Those of ordinary skill in the art will appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present invention.
[0131] The above implementation methods are only used to illustrate the embodiments of the present invention, and are not limitations of the embodiments of the present invention. Ordinary technicians in the relevant technical field may make various changes and modifications without departing from the spirit and scope of the embodiments of the present invention. Therefore, all equivalent technical solutions also belong to the scope of the embodiments of the present invention. The patent protection scope of the embodiments of the present invention should be defined by the claims.
Claims
1. An intelligent stress testing method, comprising: Obtain multiple services used by the system to be stress tested and the service relationships between multiple services; Constructing a service topology graph for the multiple services according to the service relationship; Performing stress testing on the multiple services based on the service topology diagram, and displaying stress testing results through the service topology diagram; Among them, the stress testing of the multiple services based on the service topology diagram and displaying the stress testing results through the service topology diagram include: selecting a service to be stress tested from the multiple services displayed in the service topology diagram; stress testing the service to be stress tested, and displaying the impact of the stress testing on all services in the service topology diagram through the service topology diagram.
2. The method according to claim 1, wherein: The service relationship between the multiple services is the calling relationship between the various services; The constructing a service topology map for the multiple services according to the service relationship includes: constructing a service topology map for the multiple services according to the calling relationship between each service.
3. The method according to claim 1 or 2, wherein: After constructing a service topology graph for the multiple services, the method further includes: Obtaining service status information corresponding to each service, and associating the service status information with the corresponding service; The service status information associated with each service is monitored through the service topology map.
4. The method according to claim 3, wherein: The service status information includes at least one of the following: alarm information corresponding to each service, service change information corresponding to each service, business indicator information corresponding to each service, and problem and fault information corresponding to each service.
5. The method according to claim 1, wherein: The performing stress testing on the service to be stress tested includes: Perform at least one of the following monitoring on the service to be stress tested during the stress testing process: secure query rate per second (QPS) monitoring, alarm monitoring, alarm aggregation monitoring, and link indicator monitoring; According to the monitoring result of the monitoring, the service to be stress tested is stress tested.
6. The method according to claim 5, wherein: When the monitoring includes safety QPS monitoring, the safety QPS monitoring of the service to be stress tested during the stress testing process includes: Calculate the acceptable limit QPS of the service to be stress tested according to the historical QPS peak of the service to be stress tested and the peak value of the service to be stress tested during the current stress test; According to the limit QPS, the safety QPS of the service to be stress tested is monitored.
7. The method according to claim 5, wherein: The service to be stress tested is monitored during the stress test process at least one of the following: security QPS monitoring, alarm monitoring, alarm aggregation monitoring and link indicator monitoring, including: Cutting the flow of the service to be stress tested; A stress operation is performed on the service to be stress tested after the flow switching, and during the stress operation, at least one of the following monitoring is performed on the service to be stress tested: security QPS monitoring, alarm monitoring, alarm aggregation monitoring, and link indicator monitoring.
8. The method according to claim 7, wherein: The method further comprises: If the stress test is terminated normally, the original traffic of the service to be stress tested is switched back.
9. An intelligent stress testing device, comprising: The information acquisition module is used to obtain multiple services used by the system to be stress tested and the service relationships between multiple services; A construction module, used to construct a service topology map for the multiple services according to the service relationship; A stress testing module, configured to perform stress testing on the plurality of services based on the service topology diagram, and display stress testing results through the service topology diagram; The stress testing module is specifically used to: select a service to be stress tested from multiple services displayed in the service topology diagram; perform stress testing on the service to be stress tested, and display the impact of the stress testing on all services in the service topology diagram through the service topology diagram.
10. An electronic device comprising: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform an operation corresponding to the intelligent stress testing method according to any one of claims 1-8.
11. A computer storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the intelligent stress testing method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
An index monitoring method and system
CN109254901A