Link pressure testing method and device, electronic equipment and storage medium
By obtaining business demand information, configuring stress testing parameters and determining the application service call relationship, the problem of not being able to effectively test link pressure is solved, and effective testing of link pressure and system performance optimization is achieved.
Patent Information
- Application Number
- CN202411974455.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-25
AI Technical Summary
In actual R&D environments, various services cannot be called directly due to different configuration environments, resulting in the inability to effectively test link pressure.
By obtaining the business requirements information of the link to be tested, configuring stress test parameters, determining multiple application services and their calling relationships, and conducting stress tests to obtain test results.
Effective testing of link pressure is achieved to help optimize system performance and improve user experience.
Smart Images

Figure CN119883847A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a link pressure testing method, device, electronic device and storage medium. Background Art
[0002] With the gradual promotion and popularization of distributed service technology in the link, in the actual R&D environment, various services do not exist independently. Usually, a certain business function is completed through multiple different application services. Due to the different configuration environments of different application services, there are situations where they cannot be called directly, which leads to the technical problem of being unable to effectively test the link pressure.
[0003] With respect to the technical problem that the link stress cannot be effectively tested in the related technologies, no effective solution has been proposed so far. Summary of the invention
[0004] The main purpose of the present application is to provide a link pressure testing method, device, electronic device and storage medium to solve the technical problem that the link pressure cannot be effectively tested in the related art.
[0005] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a link stress testing method is provided. The method includes: obtaining business demand information of the link to be tested, wherein the business demand information is used to characterize the performance requirements of the link to be tested; based on the business demand information, configuring stress test parameters in the link to be tested; based on the stress test parameters, determining multiple application services of the link to be tested, and the call relationship between the multiple application services, wherein the call relationship is used to characterize the call sequence between the multiple application services; based on the multiple application services and the call relationship, performing stress testing on the link to be tested, and obtaining the stress test result of the link to be tested, wherein the stress test result is used to characterize the performance of the link to be tested under the target load, and the target load is greater than the target load threshold of the link to be tested.
[0006] Optionally, based on the stress test parameters, multiple application services of the link to be tested and the calling relationships between the multiple application services are determined, including: based on the stress test parameters, triggering a start instruction of the test tool of the link to be tested, wherein the start instruction is used to start the test tool; in response to the start instruction, obtaining the working status of the test tool, wherein the working status is used to characterize whether the test tool is in a normal working state; in response to the working status being that the test tool is in a normal working state, determining multiple application services and calling relationships.
[0007] Optionally, based on multiple application services and calling relationships, a stress test is performed on the link to be tested to obtain a stress test result of the link to be tested, including: based on the calling relationship, stress testing the multiple application services separately to obtain time consumption information corresponding to the multiple application services respectively, wherein the time consumption information is used to characterize the time consumption of calling the application service; based on the multiple time consumption information, selecting a target application service from the multiple application services, wherein the time consumption information of the target application service is greater than the time consumption information of other application services except the target application service among the multiple application services; based on the target application service, determining the stress test result of the link to be tested.
[0008] Optionally, based on the target application service, determining the stress test result of the link to be tested includes: calling the monitoring platform of the link to be tested to obtain at least one target database of the target application service, wherein the target database is used to store data generated by calling the target application service; based on the at least one target database, determining at least one query statement of the target database, and a call duration corresponding to the at least one query statement, wherein the call duration is used to characterize the call time of calling the query statement, and the query statement is used to perform at least one target operation on the data; based on the call duration, and a call duration threshold corresponding to the call duration, determining the stress test result.
[0009] Optionally, based on the call duration and a call duration threshold corresponding to the call duration, determining the stress test result includes: in response to the call duration being greater than the call duration threshold, determining the query statement corresponding to the call duration as the first target query statement; and determining the stress test result based on the first target query statement.
[0010] Optionally, based on the first target query statement, determining the stress test result includes: calling the monitoring platform of the link to be tested to obtain the number of calls of at least one query statement, wherein the number of calls is used to characterize the access status of the database corresponding to the query statement; based on the first target query statement, the number of calls, and a call number threshold corresponding to the call number, determining the stress test result.
[0011] Optionally, based on the first target query statement, the number of calls, and a call number threshold corresponding to the call number, the stress test result is determined, including: in response to the number of calls being greater than the call number threshold, determining the query statement corresponding to the call number as the second target query statement; based on the first target query statement and the second target query statement, determining the stress test result.
[0012] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a link stress testing device is provided. The device includes: an acquisition unit, used to acquire the business demand information of the link to be tested, wherein the business demand information is used to characterize the performance requirements of the link to be tested; a configuration unit, used to configure the stress test parameters in the link to be tested based on the business demand information; a determination unit, used to determine multiple application services of the link to be tested and the call relationship between the multiple application services based on the stress test parameters, wherein the call relationship is used to characterize the call sequence between the multiple application services; a testing unit, used to perform stress testing on the link to be tested based on the multiple application services and the call relationship, and obtain the stress test result of the link to be tested, wherein the stress test result is used to characterize the performance of the link to be tested under the target load, and the target load is greater than the target load threshold of the link to be tested.
[0013] Optionally, the determination unit may include: a trigger module, used to trigger a start instruction of a test tool for the link to be tested based on stress test parameters, wherein the start instruction is used to start the test tool; a first acquisition module, used to obtain a working status of the test tool in response to the start instruction, wherein the working status is used to characterize whether the test tool is in a normal working state; a first determination module, used to determine multiple application services and call relationships in response to the working status being that the test tool is in a normal working state.
[0014] Optionally, the testing unit may include: a second acquisition module, used to perform stress tests on multiple application services respectively based on the calling relationship, and obtain time consumption information corresponding to the multiple application services respectively, wherein the time consumption information is used to characterize the time consumption of calling the application service; a selection module, used to select a target application service from multiple application services based on multiple time consumption information, wherein the time consumption information of the target application service is greater than the time consumption information of other application services except the target application service among the multiple application services; a second determination module, used to determine the stress test result of the link to be tested based on the target application service.
[0015] Optionally, the second determination module may include: an acquisition submodule, used to call the monitoring platform of the link to be tested, and acquire at least one target database of the target application service, wherein the target database is used to store data generated by calling the target application service; a first determination submodule, used to determine at least one query statement of the target database based on at least one target database, and a call duration corresponding to at least one query statement, wherein the call duration is used to characterize the call time of calling the query statement, and the query statement is used to perform at least one target operation on the data; a second determination submodule, used to determine the stress test result based on the call duration, and a call duration threshold corresponding to the call duration.
[0016] Optionally, the second determination submodule is further used to determine the query statement corresponding to the call duration as the first target query statement in response to the call duration being greater than the call duration threshold; and to determine the stress test result based on the first target query statement.
[0017] Optionally, the second determination submodule is also used to call the monitoring platform of the link to be tested to obtain the number of calls of at least one query statement, wherein the number of calls is used to characterize the access status of the database corresponding to the query statement; and to determine the stress test result based on the first target query statement, the number of calls, and the call number threshold corresponding to the call number.
[0018] Optionally, the second determination submodule is further used to determine the query statement corresponding to the number of calls as the second target query statement in response to the number of calls being greater than a call number threshold; and to determine the stress test result based on the first target query statement and the second target query statement.
[0019] In an embodiment of the present application, the business demand information of the link to be tested can be obtained first, and then the stress test parameters in the link to be tested can be configured according to the business demand information obtained above, and then according to the stress test parameters, multiple application services of the link to be tested and the calling relationship between the multiple application services can be determined, and finally, according to the multiple application services and calling relationships obtained in the above steps, the link to be tested is stress tested to achieve the purpose of obtaining the stress test result of the link to be tested. Considering that after configuring the stress test parameters in the link to be tested, the multiple application services of the link to be tested and the calling relationship between the multiple application services can be determined based on the stress test parameters, further, according to the multiple application services and the calling relationship, the link to be tested is stress tested to obtain the stress test result, thereby solving the technical problem of not being able to effectively test the link pressure and achieving the technical effect of effectively testing the link pressure. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0021] Figure 1 A hardware structure block diagram of a computer terminal (or mobile device) for implementing a link pressure testing method is shown;
[0022] Figure 2 is a flow chart of a link pressure testing method provided according to an embodiment of the present application;
[0023] Figure 3It is a flowchart of a full-link stress testing processing method for a combined service based on holographic monitoring provided according to an embodiment of the present application;
[0024] Figure 4 is a schematic diagram of a full-link performance test report provided according to an embodiment of the present application;
[0025] Figure 5 is a schematic diagram of a link pressure testing device provided according to an embodiment of the present application;
[0026] Figure 6 It is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0029] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following explanations:
[0030] Holographic monitoring platform: As a distributed monitoring technology platform, the holographic monitoring platform is mainly used to monitor the entire link of distributed services. It can also provide all-round operation monitoring functions for applications, and provide distributed services and devices running distributed services with faster, more accurate, simpler and more complete monitoring capabilities.
[0031] Virtual machine: A virtual machine is an abstract computer that is implemented by simulating various computer functions on an actual computer. The virtual machine has its own complete hardware architecture, such as processor, stack, register, etc., and also has a corresponding instruction system. The virtual machine shields the information related to the specific operating system platform, so that some programs only need to generate target code (bytecode) running on the virtual machine, and can run on multiple platforms without modification.
[0032] Operating system: An operating system is a set of system software programs that manage and control computer operations, computer applications, and provide hardware and software resources and public services to organize users' interrelated systems. According to the operating environment, operating systems can be divided into desktop operating systems, mobile operating systems, server operating systems, embedded operating systems, etc.
[0033] Distributed service framework: The distributed service framework mainly includes: service registration, service discovery, service call, load balancing and other contents.
[0034] Stress testing tools: Stress testing tools are used to perform stress testing on software. Stress testing tools can simulate huge loads on servers, networks, or objects, test their strength under different stress categories, and analyze overall performance. In addition, stress testing tools can perform functional testing or regression testing on applications by creating scripts with assertions to verify whether the program returns the expected results. In order to provide maximum flexibility during testing, stress testing tools allow the use of regular expressions to create assertions.
[0035] It should be noted that the collected information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this application are information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data are in compliance with relevant laws, regulations and standards, necessary confidentiality measures are taken, and public order and good customs are not violated, and corresponding operation entrances are provided for users to choose to authorize or refuse. For example, an interface is set up between this system and relevant users or institutions to provide users with corresponding operation entrances for users to choose to agree or refuse the results of automated decision-making; if the user chooses to refuse, the expert decision-making process will be entered.
[0036] According to an embodiment of the present application, a method embodiment of a link stress testing method is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0037] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 The hardware structure block diagram of a computer terminal (or mobile device) for implementing a link pressure testing method is shown. Figure 1 As shown, the computer terminal 10 (or mobile device) may include one or more (102a, 102b, ..., 102n are used to illustrate) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0038] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10 (or mobile device). As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0039] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the link pressure test method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, the link pressure test method is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0040] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0041] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 (or mobile device).
[0042] Under the above operating environment, this application provides Figure 2 The link stress testing method is shown. Figure 2 1 is a flow chart of a link pressure testing method provided according to an embodiment of the present application. The implementation steps of the link pressure testing method include:
[0043] Step S201: obtaining service requirement information of a link to be tested.
[0044] In step S201 of the embodiment of the present application, business demand information of the link to be tested can be obtained, wherein the link to be tested is used to characterize the link that has not been stress tested, and the business demand information is used to characterize the performance requirements of the link to be tested, such as the number of services to be processed, the number of concurrent services that can be processed by the link to be tested, the called service information, etc. It should be noted that the content of the business demand information is only illustrated here by way of example, and the content of the business demand information is not specifically limited.
[0045] Step S202: Based on the service demand information, configure the stress test parameters in the link to be tested.
[0046] In step S202 of the embodiment of the present application, after obtaining the service demand information, the stress test parameters in the link to be tested can be configured, wherein the stress test parameters are used to characterize the performance of the link under different load conditions, such as the number of users, concurrency, stress test duration, etc.
[0047] For example, using the test tool, according to business needs, configure the number of users, concurrency, stress test duration, transaction assertions, etc. of the stress test, so that the full-link stress test can be started. Among them, the number of users is used to represent the number of service calls initiated in parallel at fixed time intervals. The concurrency can be the ratio of the number of users to the fixed time interval. The stress test duration is used to represent the duration of the stress test. The transaction assertion is used to represent the return assertion of the successful transaction, so as to count the transaction success rate during the stress test.
[0048] It should be noted that this is only a preferred implementation method for configuring the stress test parameters in the link to be tested, and does not specifically limit the process and method for configuring the stress test parameters in the link to be tested. As long as it is based on business demand information, the process and method for configuring the stress test parameters in the link to be tested are within the scope of protection of this application and are not listed here.
[0049] Step S203: Based on the stress test parameters, multiple application services of the link to be tested and the calling relationship between the multiple application services are determined.
[0050] In step S203 of the embodiment of the present application, multiple application services of the link to be tested and the calling relationship between the multiple application services obtained above can be determined according to the stress test parameters.
[0051] Optionally, application services are used to represent various services provided by the Internet or other networks, such as backend services, database services, and cache services, etc. Call relationships are used to represent the calling sequence between multiple application services, such as calling the database service first, then calling the backend service, and finally calling the cache service.
[0052] For example, based on the number of users, concurrency, stress test duration, transaction assertions and other parameters of the stress test, the test tool can be used to display the overall call link in the full-link stress test, as well as the various application services in the link, and the front-and-back call relationships between the various application services.
[0053] It should be noted that this is only a preferred implementation method for determining multiple application services of the link to be tested and the calling relationship between multiple application services. The process and method for determining multiple application services of the link to be tested and the calling relationship between multiple application services are not specifically limited. As long as the process and method for determining multiple application services of the link to be tested and the calling relationship between multiple application services are based on stress test parameters, they are within the scope of protection of this application and are not listed here.
[0054] Step S204: Based on the multiple application services and call relationships, a stress test is performed on the link to be tested to obtain a stress test result of the link to be tested.
[0055] In step S204 of the embodiment of the present application, after obtaining multiple application services and call relationships, a stress test may be performed on the link to be tested to achieve the purpose of obtaining the stress test result of the link to be tested.
[0056] Optionally, the stress test result is used to characterize the performance of the link to be tested under the target load, and if the target load is greater than the target load threshold of the link to be tested, it means that the link to be tested is under a high load condition at this time, wherein the target load threshold may be a preset value.
[0057] For example, after obtaining each application service in the link to be tested and the forward and backward calling relationship between each application service, the link to be tested can be controlled to be in a high load scenario, and then the link to be tested can be tested to obtain the stress test result of the link to be tested.
[0058] It should be noted that this is only a preferred implementation method for obtaining the stress test results of the link to be tested, and the process and method for obtaining the stress test results of the link to be tested are not specifically limited. As long as the link to be tested is stress tested based on multiple application services and calling relationships, the process and method for obtaining the stress test results of the link to be tested are within the scope of protection of this application and will not be repeated here.
[0059] In steps S201 to S204 of the embodiment of the present application, the business demand information of the link to be tested can be obtained first, and then the stress test parameters in the link to be tested can be configured according to the business demand information obtained above, and then according to the stress test parameters, multiple application services of the link to be tested and the calling relationship between the multiple application services can be determined, and finally, according to the multiple application services and calling relationships obtained in the above steps, the link to be tested is stress tested to achieve the purpose of obtaining the stress test result of the link to be tested. Considering that after configuring the stress test parameters in the link to be tested, the multiple application services of the link to be tested and the calling relationship between the multiple application services can be determined based on the stress test parameters, further, according to the multiple application services and the calling relationship, the link to be tested is stress tested to obtain the stress test result, thereby solving the technical problem of not being able to effectively test the link pressure and achieving the technical effect of effectively testing the link pressure.
[0060] In the link stress testing method provided in the embodiment of the present application, multiple application services of the link to be tested and the calling relationship between the multiple application services are determined based on the stress test parameters, including: based on the stress test parameters, triggering a start instruction of the test tool of the link to be tested, wherein the start instruction is used to start the test tool; in response to the start instruction, obtaining the working status of the test tool, wherein the working status is used to characterize whether the test tool is in a normal working state; in response to the working status being that the test tool is in a normal working state, determining multiple application services and calling relationships.
[0061] In this embodiment, the start instruction of the test tool of the link to be tested can be triggered according to the stress test parameters to start the test tool, and then the working status of the test tool can be obtained. When the test tool is in a normal working state at this time, multiple application services and call relationships can be determined.
[0062] For example, based on the number of users, concurrency, stress test duration, transaction assertions and other parameters of the stress test, the test tool is started to start the full-link stress test. When the test tool is in normal working condition, it can display the overall call link in the full-link stress test, as well as the various application services in the link, the front-end call relationship between each application service, etc., so as to effectively evaluate the application services and call relationships, help optimize system performance and improve user experience.
[0063] In the link stress testing method provided in the embodiment of the present application, a stress test is performed on the link to be tested based on multiple application services and calling relationships to obtain a stress test result of the link to be tested, including: based on the calling relationship, stress testing is performed on multiple application services respectively to obtain time consumption information corresponding to the multiple application services respectively, wherein the time consumption information is used to characterize the time consumption of calling the application service; based on multiple time consumption information, a target application service is selected from multiple application services, wherein the time consumption information of the target application service is greater than the time consumption information of other application services except the target application service among the multiple application services; based on the target application service, the stress test result of the link to be tested is determined.
[0064] In this embodiment, after obtaining the call relationship, multiple application services can be stress tested respectively, and the time consumption information corresponding to the multiple application services can be obtained by holographic monitoring, and then according to the multiple time consumption information obtained above, the application service with the longest time consumption can be selected from the multiple application services, and the application service can be determined as the target application service. Further, according to the target application service, the purpose of determining the stress test result of the link to be tested can be achieved. Among them, the time consumption information can be simply referred to as time consumption.
[0065] Table 1 A specific time consumption table of each application service
[0066] Application Services time consuming A 1.523s B 1.513s C 41.861ms D 404.319ms ... ...
[0067] Optionally, Table 1 is a specific time table of each application service. As shown in Table 1, when the application service is A, the time consumption of calling the application service A is 1.523 seconds (s); when the application service is B, the time consumption of calling the application service A is 1.513s; when the application service is C, the time consumption of calling the application service C is 41.861 milliseconds (ms); when the application service is D, the time consumption of calling the application service D is 404.319ms; the time consumption corresponding to each application service is different, as shown in Table 1, and is not listed here.
[0068] For example, the test tool can be used to display the specific time consumption of each application service in the entire link, and the business indicator monitoring function of the holographic monitoring platform can be used to count and display the corresponding time consumption of each application service in the entire link, so as to locate the application service that is the performance bottleneck of the link during the stress testing process; after obtaining the time consumption of each application service, the specific application service with a longer time consumption in the entire link can be located (application service A in Table 1), and the access status of the internal service data in the application service can be displayed, so as to help developers better monitor and debug applications and effectively avoid potential risks.
[0069] In the link stress testing method provided in the embodiment of the present application, based on the target application service, the stress test result of the link to be tested is determined, including: calling the monitoring platform of the link to be tested to obtain at least one target database of the target application service, wherein the target database is used to store data generated by calling the target application service; based on the at least one target database, at least one query statement of the target database and the call duration corresponding to the at least one query statement are determined, wherein the call duration is used to characterize the call time of calling the query statement, and the query statement is used to perform at least one target operation on the data; based on the call duration, and the call duration threshold corresponding to the call duration, the stress test result is determined.
[0070] In this embodiment, the monitoring platform of the link to be tested can be called to obtain at least one target database of the target application service, and then based on the at least one target database obtained above, at least one query statement of the target database and the call duration of the query statement can be determined, and based on the call duration and the call duration threshold, the purpose of determining the stress test result can be achieved.
[0071] Optionally, the query statement may be represented by a preset statement (SQL statement), and the target operation may be a preset operation performed on the data, such as an update operation, an insert operation, and a delete operation, etc. The call duration threshold may be a preset value, such as 3 seconds.
[0072] For example, among the various operation steps within the service, the common performance bottleneck is the slow SQL statement. Therefore, it is necessary to monitor whether there are slow SQL statements in the target application service and determine the call duration of the slow SQL. Based on the call duration and call duration threshold obtained above, the stress test results can be determined to discover potential performance bottlenecks of the application service and optimize them, thereby improving the performance and stability of the application service.
[0073] In the link stress testing method provided in an embodiment of the present application, the stress test result is determined based on the call duration and a call duration threshold corresponding to the call duration, including: in response to the call duration being greater than the call duration threshold, determining the query statement corresponding to the call duration as the first target query statement; and determining the stress test result based on the first target query statement.
[0074] In this embodiment, after obtaining the call duration and the call duration threshold, when the call duration is greater than the call duration threshold, the query statement corresponding to the call duration can be determined as the first target query statement, and the first identification information is set for the above-mentioned first target query statement, and the first target query statement is displayed in the final test report of the link to be tested. Among them, the first target query statement can be called a slow SQL statement. The first identification information is used to identify the first target query statement as a slow SQL statement. The test report can be called a statistical report.
[0075] Optionally, the user sets a call duration threshold for SQL statements in a certain database. SQL statements that exceed the threshold are identified as slow SQL statements and summarized and displayed in the statistical report. For example, if the call duration of a SQL statement is 3.587s, and 3.587s is greater than the call duration threshold of 3 seconds, the statement will be statistically graded and summarized and displayed in the test report of the entire link performance, so as to quickly locate the source that affects the link carrying capacity and improve the overall performance of the link.
[0076] Optionally, Table 2 is a call duration table of slow SQL statements in the target application service. As shown in Table 2, when the slow SQL statement is a, the call duration of the statement is 4.409s. Since different statements have different corresponding call durations, when the call duration of the statement exceeds the call duration threshold, the statement can be determined as a slow SQL statement, as shown in Table 2, and no further details are given here.
[0077] Table 2 Call duration of slow SQL statements in target application services
[0078] Slow SQL statements Call duration a 4.409s b 3.587s ... ...
[0079] In the link stress testing method provided in an embodiment of the present application, the stress test result is determined based on the first target query statement, including: calling the monitoring platform of the link to be tested to obtain the number of calls of at least one query statement, wherein the number of calls is used to characterize the access status of the database corresponding to the query statement; based on the first target query statement, the number of calls, and the call number threshold corresponding to the call number, the stress test result is determined.
[0080] In this embodiment, the monitoring platform of the link to be tested can be called to obtain the number of calls of at least one query statement, and then the stress test result can be determined according to the first target query statement, the number of calls and the call number threshold obtained in the above steps, wherein the monitoring platform can be called a holographic monitoring platform. The call number threshold can be a preset value, for example, 20 times.
[0081] For example, in various operation steps within the service, it is found that due to unreasonable program design, the same database is accessed multiple times, resulting in increased service time. At this time, the monitoring function of the SQL statement call of the holographic monitoring platform can be used to count the number of times each SQL statement in the target application service is called, so as to achieve the purpose of determining the stress test results.
[0082] In the link stress testing method provided in an embodiment of the present application, the stress test result is determined based on a first target query statement, the number of calls, and a call number threshold corresponding to the call number, including: in response to the number of calls being greater than the call number threshold, determining the query statement corresponding to the call number as a second target query statement; and determining the stress test result based on the first target query statement and the second target query statement.
[0083] In this embodiment, after obtaining the number of calls and the number of calls threshold, if the number of calls is greater than the number of calls threshold, it is necessary to determine the query statement corresponding to the number of calls as the second target query statement, and set the second identification information for the second target query statement, and display the second target query statement in the final test report of the link to be tested, and then determine the stress test result according to the first target query statement and the second target query statement. Among them, the second target query statement can be called a redundant SQL statement. The second identification information is used to identify the second target query statement as a redundant SQL statement.
[0084] Optionally, when obtaining the number of calls of a SQL statement, the user sets a call count threshold for the SQL statement being called in the database. SQL statements that exceed the threshold are identified as redundant SQL statements and summarized and displayed in the statistical report. For example, if a SQL statement is called 30 times and 30 times exceeds the call count threshold of 20 times, the SQL statement needs to be statistically registered and summarized and displayed in the full-link performance test report.
[0085] Optionally, Table 3 is a table of call counts of redundant SQL statements in the target application service. As shown in Table 3, when the redundant SQL statement is x, the number of calls corresponding to the statement is 30 times; when the redundant SQL statement is y, the number of calls corresponding to the statement is 25 times; since the number of calls to different SQL statements is different, when the number of calls to the SQL statement at this time exceeds the call count threshold, the statement can be determined as a redundant SQL statement, as shown in Table 3, and no further details are given here.
[0086] Table 3 Number of calls to redundant SQL statements in the target application service
[0087] Redundant SQL statements Number of calls x 30 times y 25 times ... ...
[0088] In an embodiment of the present application, after obtaining the stress test results, a test report for the link to be tested can be generated, wherein the test report is used to record the test data of the link, which can be called a full-link performance test report. For example, after forming the full-link performance test report, specific services with performance issues, slow SQL statements, and redundant SQL statements can be summarized and displayed.
[0089] In the link stress testing method provided in the embodiment of the present application, the business demand information of the link to be tested can be obtained first, and then the stress test parameters in the link to be tested can be configured according to the business demand information obtained above, and then according to the stress test parameters, multiple application services of the link to be tested and the calling relationship between the multiple application services can be determined, and finally, according to the multiple application services and the calling relationship obtained in the above steps, the link to be tested is stress tested to achieve the purpose of obtaining the stress test result of the link to be tested. Considering that after configuring the stress test parameters in the link to be tested, the multiple application services of the link to be tested and the calling relationship between the multiple application services can be determined based on the stress test parameters, further, according to the multiple application services and the calling relationship, the link to be tested is stress tested to obtain the stress test result, thereby solving the technical problem of being unable to effectively test the link stress and achieving the technical effect of being able to effectively test the link stress.
[0090] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0091] The technical solution of the embodiment of the present application is illustrated below in conjunction with preferred implementation modes.
[0092] At present, with the gradual promotion and popularization of distributed service technology, in the actual R&D environment, various services do not exist independently. A business function often requires a combination of multiple different application services to complete. Due to the different configuration environments of different application services, there are situations where they cannot be called directly, which leads to the technical problem of being unable to effectively test the link pressure.
[0093] In order to solve the above problems, a full-link stress testing system for composite services based on holographic monitoring is provided. The system can generate a full-link stress testing report. In addition to displaying the performance evaluation results of the entire link, the report can also display the time consumption view of the entire chain composite service from the overall to the details of each service, and provide performance improvement suggestions for the performance shortcomings (key services) in the link, thereby helping the development team to optimize the performance of the application service and effectively improve the overall performance of the full-link transaction service.
[0094] In an embodiment of the present application, by combining the stress testing tool and the holographic monitoring platform, the following functions can be achieved: display the overall call link in the full-link stress test, for example, which application services are involved, the front-end call relationship between application services, etc.; display the specific time consumption of each application service in the full link, for example, in addition to the original transaction full-link time consumption report in the stress testing tool, the time consumption of each application service collected by holographic monitoring is integrated into the original time consumption report of the stress testing tool, thereby displaying the detailed time consumption view from the overall to each service of the full-chain composite service; locate the application services that take a long time in the whole link, and display the internal data access of the specific service. Through the time consumption of each application service collected by holographic monitoring, after locating the application service that takes a long time, the reason for the long time consumption of the application service can be analyzed according to relevant data, for example, whether there is a slow SQL statement, whether there is a redundant SQL statement call, etc.
[0095] In the embodiments of the present application, Figure 3 is a flowchart of a full-link stress testing processing method for a combined service based on holographic monitoring according to an embodiment of the present application, such as Figure 3 As shown, the method mainly includes the following steps:
[0096] Step S301, start the full link stress test.
[0097] In this embodiment, a test tool is used to configure the number of users, concurrency, stress test duration, transaction assertions, etc. of the stress test according to business requirements so that the full-link stress test can be started. The number of users is used to represent the amount of service calls initiated in parallel at fixed time intervals.
[0098] Optionally, the concurrency can be the ratio of the number of users to the fixed time interval, for example, the number of users is 10, the fixed time interval is 1s, and the concurrency is 10 transactions per second (tps). The stress test duration is used to characterize the duration of the stress test. The transaction assertion is used to characterize the return assertion of setting a successful transaction, so as to count the transaction success rate during the stress test.
[0099] Step S302: Display the overall call link in the full-link stress test.
[0100] In this embodiment, the overall call link in the full-link stress test can be displayed, for example, which application services are involved, and the forward and backward call relationships between application services, etc. The link tracking function of the holographic monitoring platform is used to uniformly collect, process and display the service call data. The holographic monitoring platform can collect the call relationships between various application services on the full link during the stress test, and analyze and display them.
[0101] Optionally, based on the link tracking function of the holographic monitoring platform, it is possible to count and display the various application services involved in the link to be tested, as well as the forward and backward call relationships between the various application services, etc., and it also supports querying on the platform interface, and the data can also be downloaded. For example, the terminal application of a certain enterprise system can use the transaction link logged in by an alias, then the approximate call relationship of the application service can be: first the terminal application, then the A application service, then the B application service, and finally the C application service. The call relationship view between the application services of the transaction link can be integrated into the performance test report of the JMeter test tool, thereby serving as the basis for displaying the time-consuming view of each application service.
[0102] Step S303: Display the specific time consumption of each application service in the entire link.
[0103] In this embodiment, the specific time consumption of each application service in the entire link can be displayed. For example, the business indicator monitoring function of the holographic monitoring platform is enabled to count and display the corresponding time consumption of each application service in the entire link, so that the application service that is at the performance bottleneck can be determined during the positioning stress testing process.
[0104] Optionally, in addition to the original transaction full-link time consumption report in the stress testing tool, holographic monitoring is used to collect the time consumption data of each application service in the full link of each transaction in the stress testing tool, as shown in Table 1. At the same time, the call link view of the composite service is integrated into the time consumption report of the stress testing tool, thereby showing the detailed time consumption view of the composite service from the overall to each service in the full link.
[0105] Step S304, locating the target application service that takes a long time in the entire link.
[0106] In this embodiment, the target application service that takes a long time in the entire link is located, and the data access situation inside the specific service is displayed. For key application services with performance issues, the time consumption of each operation step inside the service can be further obtained through the holographic monitoring platform.
[0107] Optionally, for key application services with performance issues, the time consumption of each operation step within the service can be obtained through the holographic monitoring platform. For example, to locate the key application service with performance issues in the application service, it can be detected whether there are slow SQL statements or redundant SQL statements in the application service, etc., so as to give reasonable suggestions to help the development team optimize the performance of the application service.
[0108] Step S305: Detect slow SQL statements from the target application service.
[0109] In this embodiment, among the various operation steps within the service, the corresponding common performance bottleneck is the slow SQL statement, and it is necessary to monitor whether there are slow SQL statements in the target application service, that is, to set a call time threshold for SQL statements in a certain database for the user, and SQL statements that exceed the threshold are identified as slow SQL statements and summarized and displayed in a statistical report.
[0110] Optionally, according to the actual business scenarios and the specifications of the industry application systems, a call time threshold for slow SQL statements can be set, and the call time threshold for slow SQL statements can be set to 3 seconds. During the stress test, the call monitoring function of the SQL statement of the holographic monitoring platform is used to count the call time of SQL statements in all databases within the application service. If the call time of a SQL statement exceeds the call time threshold of the slow SQL statement, for example, the call time of a SQL statement is 3.587s, and it has exceeded the call time threshold of the slow SQL statement by 3 seconds, then the SQL statement needs to be statistically registered so that it can be summarized and displayed in the full-link performance test report later.
[0111] Step S306: Detect redundant SQL statements from the target application service.
[0112] In this embodiment, in various operation steps within the service, it is found that due to unreasonable program design, the same database may be accessed multiple times, resulting in increased service time. At this time, the monitoring function of the SQL statement call of the holographic monitoring platform can be used to count the number of times each SQL statement in the target application service is called, and then the user sets the call number threshold of the SQL statement called in the database. The SQL statements exceeding the threshold are identified as redundant SQL statements and summarized and displayed in the statistical report.
[0113] Optionally, according to the actual business scenarios and the rules of the industry application system, a call count threshold for SQL statements in the database can be set. For example, the call count threshold can be 20 times. During the stress test, the SQL statement call monitoring function of the holographic monitoring platform is used to count the number of SQL statement calls within the application service. If the number of calls to a SQL statement exceeds the call count threshold, for example, if a SQL statement is called 30 times, it has exceeded the SQL statement call count threshold of 20 times, and the SQL statement will be statistically registered and subsequently summarized and displayed in the full-link performance test report.
[0114] Step S307, forming a full-link performance test report.
[0115] In this embodiment, a full-link performance test report can be formed, wherein the full-link performance test report may include: a curve report of the combined service performance, a service slow SQL statement report, and a service redundant SQL statement report. The full-link performance test report is used to summarize and display specific services, slow SQL statements, and redundant SQL statements with performance issues.
[0116] Optionally, Figure 4 is a schematic diagram of a full-link performance test report provided according to an embodiment of the present application, such as Figure 4 As shown, the full-link performance test report may include: a curve report 401 of the combined service performance, a service slow SQL statement report 402 and a service redundant SQL statement report 403, and the full-link performance test report may be displayed on the terminal interface.
[0117] In an embodiment of the present application, the business demand information of the link to be tested can be obtained first, and then the stress test parameters in the link to be tested can be configured according to the business demand information obtained above, and then according to the stress test parameters, multiple application services of the link to be tested and the calling relationship between the multiple application services can be determined, and finally, according to the multiple application services and calling relationships obtained in the above steps, the link to be tested is stress tested to achieve the purpose of obtaining the stress test result of the link to be tested. Considering that after configuring the stress test parameters in the link to be tested, the multiple application services of the link to be tested and the calling relationship between the multiple application services can be determined based on the stress test parameters, further, according to the multiple application services and the calling relationship, the link to be tested is stress tested to obtain the stress test result, thereby solving the technical problem of not being able to effectively test the link pressure and achieving the technical effect of effectively testing the link pressure.
[0118] The present application also provides a link pressure test device. It should be noted that the link pressure test device of the present application can be used to execute the link pressure test method provided in the present application. The link pressure test device provided in the present application is introduced below.
[0119] According to an embodiment of the present application, a device for implementing the above-mentioned link pressure testing method is also provided. Figure 5 is a schematic diagram of a link pressure testing device provided according to an embodiment of the present application, such as Figure 5 As shown, the device comprises:
[0120] The acquisition unit 501 is used to acquire service requirement information of the link to be tested, wherein the service requirement information is used to characterize the performance requirement of the link to be tested.
[0121] The configuration unit 502 is used to configure stress test parameters in the link to be tested based on the service demand information.
[0122] The determination unit 503 is used to determine multiple application services of the link to be tested and the calling relationship between the multiple application services based on the stress test parameters, wherein the calling relationship is used to represent the calling sequence between the multiple application services.
[0123] The testing unit 504 is used to perform a stress test on the link to be tested based on multiple application services and call relationships to obtain a stress test result of the link to be tested, wherein the stress test result is used to characterize the performance of the link to be tested under a target load, and the target load is greater than a target load threshold of the link to be tested.
[0124] The link stress testing device provided in the embodiment of the present application obtains business demand information of the link to be tested through an acquisition unit, wherein the business demand information is used to characterize the performance requirements of the link to be tested; configures stress test parameters in the link to be tested based on the business demand information through a configuration unit; determines multiple application services of the link to be tested and the calling relationship between the multiple application services based on the stress test parameters through a determination unit, wherein the calling relationship is used to characterize the calling order between the multiple application services; performs stress testing on the link to be tested based on the multiple application services and the calling relationship through a testing unit, and obtains a stress test result of the link to be tested, wherein the stress test result is used to characterize the performance of the link to be tested under a target load, and the target load is greater than a target load threshold of the link to be tested, thereby solving the technical problem in the related art that the link stress cannot be effectively tested, thereby achieving the technical effect that the link stress can be effectively tested.
[0125] Optionally, in the link stress testing device provided in the embodiment of the present application, the determination unit 503 may include: a trigger module, used to trigger a start instruction of a test tool for the link to be tested based on stress test parameters, wherein the start instruction is used to start the test tool; a first acquisition module, used to obtain a working status of the test tool in response to the start instruction, wherein the working status is used to characterize whether the test tool is in a normal working state; a first determination module, used to determine multiple application services and call relationships in response to the working status being that the test tool is in a normal working state.
[0126] Optionally, in the link stress testing device provided in the embodiment of the present application, the testing unit 504 may include: a second acquisition module, used to perform stress tests on multiple application services respectively based on the calling relationship, and obtain time consumption information corresponding to the multiple application services respectively, wherein the time consumption information is used to characterize the time consumption of calling the application service; a selection module, used to select a target application service from multiple application services based on multiple time consumption information, wherein the time consumption information of the target application service is greater than the time consumption information of other application services except the target application service among the multiple application services; a second determination module, used to determine the stress test result of the link to be tested based on the target application service.
[0127] Optionally, in the link stress testing device provided in the embodiment of the present application, the second determination module may include: an acquisition submodule, used to call the monitoring platform of the link to be tested, and obtain at least one target database of the target application service, wherein the target database is used to store data generated by calling the target application service; a first determination submodule, used to determine at least one query statement of the target database based on at least one target database, and a call duration corresponding to at least one query statement, wherein the call duration is used to characterize the call time of calling the query statement, and the query statement is used to perform at least one target operation on the data; a second determination submodule, used to determine the stress test result based on the call duration, and a call duration threshold corresponding to the call duration.
[0128] Optionally, in the link stress testing device provided in an embodiment of the present application, the second determination submodule is also used to determine the query statement corresponding to the call duration as the first target query statement in response to the call duration being greater than a call duration threshold; and to determine the stress test result based on the first target query statement.
[0129] Optionally, in the link stress testing device provided in the embodiment of the present application, the second determination submodule is also used to call the monitoring platform of the link to be tested to obtain the number of calls of at least one query statement, wherein the number of calls is used to characterize the access status of the database corresponding to the query statement; and to determine the stress test result based on the first target query statement, the number of calls, and a call number threshold corresponding to the number of calls.
[0130] Optionally, in the link stress testing device provided in the embodiment of the present application, the second determination submodule is also used to determine the query statement corresponding to the number of calls as the second target query statement in response to the number of calls being greater than a call number threshold; and to determine the stress test result based on the first target query statement and the second target query statement.
[0131] It should be noted that the above-mentioned modules or units can be hardware components or software components stored in a memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n), and the above-mentioned modules can also be run as part of the device in the computer terminal 10 provided in Example 1.
[0132] An embodiment of the present application may provide an electronic device, Figure 6 is a structural block diagram of an electronic device according to an embodiment of the present application. Figure 6 As shown, the electronic device may include: one or more ( Figure 6 (only one is shown) processor 602, memory 604, storage controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.
[0133] Among them, the memory can be used to store software programs and modules, such as program instructions / modules corresponding to the methods and devices in the embodiments of the present application, and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0134] The processor can call the information and application programs stored in the memory through the transmission device to perform the following steps: obtain business demand information of the link to be tested, wherein the business demand information is used to characterize the performance requirements of the link to be tested; based on the business demand information, configure the stress test parameters in the link to be tested; based on the stress test parameters, determine multiple application services of the link to be tested, and the calling relationship between the multiple application services, wherein the calling relationship is used to characterize the calling order between the multiple application services; based on the multiple application services and the calling relationship, perform a stress test on the link to be tested to obtain a stress test result of the link to be tested, wherein the stress test result is used to characterize the performance of the link to be tested under a target load, and the target load is greater than the target load threshold of the link to be tested.
[0135] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: based on the stress test parameters, determine multiple application services of the link to be tested, and the calling relationship between the multiple application services, including: based on the stress test parameters, trigger the start instruction of the test tool of the link to be tested, wherein the start instruction is used to start the test tool; in response to the start instruction, obtain the working status of the test tool, wherein the working status is used to characterize whether the test tool is in a normal working state; in response to the working status being that the test tool is in a normal working state, determine multiple application services and calling relationships.
[0136] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: based on multiple application services and calling relationships, perform stress testing on the link to be tested to obtain stress test results of the link to be tested, including: based on the calling relationship, perform stress testing on multiple application services respectively to obtain time consumption information corresponding to the multiple application services respectively, wherein the time consumption information is used to characterize the time consumption of calling the application service; based on multiple time consumption information, select a target application service from multiple application services, wherein the time consumption information of the target application service is greater than the time consumption information of other application services except the target application service among the multiple application services; based on the target application service, determine the stress test results of the link to be tested.
[0137] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: based on the target application service, determine the stress test result of the link to be tested, including: calling the monitoring platform of the link to be tested to obtain at least one target database of the target application service, wherein the target database is used to store the data generated by calling the target application service; based on at least one target database, determine at least one query statement of the target database, and the call duration corresponding to the at least one query statement, wherein the call duration is used to characterize the call time of calling the query statement, and the query statement is used to perform at least one target operation on the data; based on the call duration, and the call duration threshold corresponding to the call duration, determine the stress test result.
[0138] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: determine the stress test results based on the call duration and the call duration threshold corresponding to the call duration, including: in response to the call duration being greater than the call duration threshold, determining the query statement corresponding to the call duration as the first target query statement; based on the first target query statement, determine the stress test results.
[0139] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: determine the stress test result based on the first target query statement, including: calling the monitoring platform of the link to be tested to obtain the number of calls of at least one query statement, wherein the number of calls is used to characterize the access status of the database corresponding to the query statement; determine the stress test result based on the first target query statement, the number of calls, and the call number threshold corresponding to the call number.
[0140] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: determine the stress test results based on the first target query statement, the number of calls, and the call number threshold corresponding to the call number, including: in response to the number of calls being greater than the call number threshold, determining the query statement corresponding to the call number as the second target query statement; determining the stress test results based on the first target query statement and the second target query statement.
[0141] By adopting the embodiment of the present application, a link pressure testing method is provided. The method can first obtain the business demand information of the link to be tested, and then configure the pressure test parameters in the link to be tested according to the business demand information obtained above, and then according to the pressure test parameters, multiple application services of the link to be tested and the call relationship between the multiple application services can be determined, and finally, according to the multiple application services and call relationships obtained in the above steps, the link to be tested is pressure tested to achieve the purpose of obtaining the pressure test result of the link to be tested, considering that after configuring the pressure test parameters in the link to be tested, multiple application services of the link to be tested and the call relationship between the multiple application services can be determined based on the pressure test parameters, and further, according to the multiple application services and the call relationship, the link to be tested is pressure tested to obtain the pressure test result, thereby solving the technical problem that the link pressure cannot be effectively tested, and achieving the technical effect that the link pressure can be effectively tested.
[0142] It can be understood by those skilled in the art that Figure 6 The structure shown is for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, referred to as MID), a PAD, and other terminal devices. Figure 6 The structure of the electronic device is not limited. Figure 6 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Figure 6 Different configurations are shown.
[0143] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.
[0144] The embodiment of the present application further provides a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the link stress testing method provided in the first embodiment.
[0145] Optionally, in this embodiment, the above storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.
[0146] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing the program steps of the link stress testing method.
[0147] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0148] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0149] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0150] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0151] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0152] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present 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, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.
[0153] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A link pressure testing method, characterized in that: include: Acquire service requirement information of the link to be tested, wherein the service requirement information is used to characterize the performance requirement of the link to be tested; Based on the business demand information, configure stress test parameters in the link to be tested; Based on the stress test parameters, determine multiple application services of the link to be tested, and a calling relationship between the multiple application services, wherein the calling relationship is used to characterize a calling sequence between the multiple application services; Based on the multiple application services and the calling relationships, the link to be tested is stress tested to obtain a stress test result of the link to be tested, wherein the stress test result is used to characterize the performance of the link to be tested under a target load, and the target load is greater than a target load threshold of the link to be tested.
2. The method according to claim 1, characterized in that: Determining a plurality of application services of the link to be tested and a calling relationship between the plurality of application services based on the stress test parameters includes: Based on the stress test parameter, triggering a start instruction of a test tool of the link to be tested, wherein the start instruction is used to start the test tool; In response to the start instruction, obtaining the working state of the test tool, wherein the working state is used to indicate whether the test tool is in a normal working state; In response to the working state being that the test tool is in the normal working state, a plurality of the application services and the calling relationships are determined.
3. The method according to claim 1, characterized in that Based on the plurality of application services and the call relationship, a stress test is performed on the link to be tested to obtain a stress test result of the link to be tested, including: Based on the calling relationship, respectively perform stress tests on the multiple application services to obtain time consumption information corresponding to the multiple application services, wherein the time consumption information is used to characterize the time consumption of calling the application services; Based on the plurality of time-consuming information, a target application service is selected from the plurality of application services, wherein the time-consuming information of the target application service is greater than the time-consuming information of other application services except the target application service among the plurality of application services; Based on the target application service, a stress test result of the link to be tested is determined.
4. The method according to claim 3, characterized in that Determining a stress test result of the link to be tested based on the target application service includes: Calling the monitoring platform of the link to be tested to obtain at least one target database of the target application service, wherein the target database is used to store data generated by calling the target application service; Based on at least one of the target databases, determining at least one query statement of the target database and a call duration corresponding to the at least one query statement, wherein the call duration is used to represent a call time of calling the query statement, and the query statement is used to perform at least one target operation on the data; The stress test result is determined based on the call duration and a call duration threshold corresponding to the call duration.
5. The method according to claim 4, characterized in that Determining the stress test result based on the call duration and a call duration threshold corresponding to the call duration includes: In response to the call duration being greater than the call duration threshold, determining the query statement corresponding to the call duration as a first target query statement; Based on the first target query statement, the stress test result is determined.
6. The method according to claim 5, characterized in that Determining the stress test result based on the first target query statement includes: Calling the monitoring platform of the link to be tested to obtain the number of calls of at least one of the query statements, wherein the number of calls is used to characterize the access status of the database corresponding to the query statement; The stress test result is determined based on the first target query statement, the number of calls, and a call number threshold corresponding to the number of calls.
7. The method according to claim 6, characterized in that Determining the stress test result based on the first target query statement, the number of calls, and a call number threshold corresponding to the number of calls includes: In response to the number of calls being greater than the number of calls threshold, determining the query statement corresponding to the number of calls as a second target query statement; The stress test result is determined based on the first target query statement and the second target query statement.
8. A link pressure testing device, characterized in that: include: An acquisition unit, configured to acquire service requirement information of a link to be tested, wherein the service requirement information is used to characterize the performance requirement of the link to be tested; A configuration unit, configured to configure stress test parameters in the link to be tested based on the business demand information; A determination unit, configured to determine, based on the stress test parameters, a plurality of application services of the link to be tested, and a calling relationship between the plurality of application services, wherein the calling relationship is used to characterize a calling sequence between the plurality of application services; A testing unit is used to perform a stress test on the link to be tested based on the multiple application services and the call relationship to obtain a stress test result of the link to be tested, wherein the stress test result is used to characterize the performance of the link to be tested under a target load, and the target load is greater than a target load threshold of the link to be tested.
9. An electronic device, characterized in that: include: A memory storing an executable program; A processor, configured to run the program, wherein the program executes the method according to any one of claims 1 to 7 when running.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored executable program, wherein when the executable program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 7.
Citation Information
Cited By
Link fault processing method and electronic equipment
CN121125448A