Full-link pressure testing method and device, equipment, storage medium and program product

By generating a tree topology and optimizing SLA indicators, the problem of low efficiency of full-link stress testing in large-scale business chains is solved, efficient identification and testing of key service units is achieved, and testing efficiency and observability are improved.

CN118733409APending Publication Date: 2024-10-01TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202310352370.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-30
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

As business expands, traditional full-link stress testing methods are inefficient in large-scale business chains, resulting in high work costs and difficulty in efficiently identifying and testing key service units.

Method used

By obtaining the calling relationship between service units in the business service, a tree topology structure is generated, and editing operations are performed based on this structure to determine the service units to be stress tested, and the test process is optimized using pre-stress testing and SLA indicators.

Benefits of technology

It improves the efficiency and observability of stress testing, avoids the generation of dirty data, realizes intelligent detection and stability assessment of service units in stress testing, and reduces the need for manual monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733409A_ABST
    Figure CN118733409A_ABST
Patent Text Reader

Abstract

The invention discloses a full-link pressure testing method and device, equipment, a storage medium and a program product, and belongs to the technical field of system pressure testing. The method comprises the following steps: acquiring a calling relationship among service units in a business service; the calling relation refers to a single calling relation between any two service units in the business service; generating a tree topology structure based on the calling relation; the tree topology structure comprises at least two service nodes, and the service nodes in the at least two service nodes are in one-to-one correspondence with the service units; and in response to an editing operation of the tree topology structure, determining the service unit to be subjected to pressure test. Through the method, the full-link service unit to be subjected to the pressure test can be clearly displayed through the topological structure, the nodes in the topological structure can be edited to obtain the service unit to be subjected to the pressure test, and the efficiency of the pressure test is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the technical field of system stress testing, and in particular to a full-link stress testing method, apparatus, device, storage medium, and program product. Background Art

[0002] Full-link stress testing refers to the process of stress testing the entire business chain by simulating massive user requests and data based on actual business scenarios and system environments.

[0003] In the related technology, the stress test traffic is passed through all nodes in the entire link in sequence, and a node topology map is constructed based on the nodes through which the stress test traffic flows and the stress test data corresponding to each node, and the stress test indicator performance analysis is performed based on the node topology map.

[0004] However, with the continuous expansion of the business, the scale of the entire business chain is also getting larger and larger. If the stress test traffic is imported to all nodes in the entire link separately, it will bring high work costs to the stress testers, resulting in low efficiency of stress testing. Summary of the invention

[0005] The present application provides a full-link stress testing method, device, equipment, storage medium and program product, and the technical solution is as follows:

[0006] According to one aspect of the present application, a full-link stress testing method is provided, the method comprising:

[0007] Obtaining a call relationship between each service unit in the business service; the call relationship refers to a single call relationship between any two service units in the business service;

[0008] Generate a tree topology structure based on the call relationship; the tree topology structure includes at least two service nodes, and the service nodes in the at least two service nodes correspond to the service units one by one;

[0009] In response to the editing operation of the tree topology structure, the service unit to be stress tested is determined.

[0010] In some embodiments, the method further includes: obtaining a business service identifier corresponding to the business service;

[0011] Identification is performed based on the business service identifier to obtain the service unit to be stress-tested in the business service.

[0012] In some embodiments, the identifying based on the business service identifier to obtain the service unit to be stress-tested in the business service includes:

[0013] Obtaining a historical stress test record corresponding to the business service; the historical stress test record includes a historical business service that has undergone the stress test, and a historical service unit that has undergone the stress test in the historical business service;

[0014] Identify the business service identifier in the historical stress test record to obtain the historical service unit corresponding to the business service identifier;

[0015] Based on the historical service unit, the service unit in the business service to be subjected to the stress test is obtained.

[0016] In some embodiments, the method further includes: performing a pre-stress test on all the service nodes in the tree topology structure to obtain stress test data corresponding to all the service nodes; the stress test data is used to evaluate the carrying capacity of the service nodes; the pre-stress test refers to a pre-test performed before the stress test to determine the service unit to be tested in the tree topology structure;

[0017] Automatically determine the upper node of the service node corresponding to the stress test data that meets the screening conditions as the entry service node, and obtain the link service topology structure to be stress tested based on the entry service node;

[0018] Based on the link service topology, the service unit to be stress tested is determined.

[0019] In some embodiments, the stress testing data that meets the screening conditions includes at least one of the following:

[0020] The stress test data with a delay time greater than a first threshold; the delay time is used to represent the delay time for the service unit to complete the request;

[0021] The stress testing data has a growth rate greater than a second threshold; the growth rate is used to describe the growth of the requests in the service unit.

[0022] According to one aspect of the present application, a full-link stress testing device is provided, the device comprising:

[0023] An acquisition module, used to acquire the calling relationship between each service unit in the business service; the calling relationship refers to a single calling relationship between any two service units in the business service;

[0024] A generating module, configured to generate a tree topology structure based on the calling relationship; the tree topology structure comprises at least two service nodes, and a service node in the at least two service nodes corresponds to the service unit in a one-to-one manner;

[0025] The editing module is used to determine the service unit to be stress-tested in response to the editing operation of the tree topology structure.

[0026] According to another aspect of the present application, a computer device is provided, which includes: a processor and a memory, wherein at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor to implement the full-link stress testing method as described above.

[0027] According to another aspect of the present application, a computer storage medium is provided, in which at least one computer program is stored. The at least one computer program is loaded and executed by a processor to implement the full-link stress testing method as described above.

[0028] According to another aspect of the present application, a computer program product is provided, which includes a computer program stored in a computer-readable storage medium; the computer program is read and executed from the computer-readable storage medium by a processor of a computer device, so that the computer device executes the full-link stress testing method described above.

[0029] The beneficial effects of the technical solution provided by this application include at least:

[0030] By obtaining the calling relationship between each service unit in the business service; generating a tree topology structure based on the calling relationship; and responding to the editing operation of the tree topology structure, determining the service unit to be stress tested. Based on the above method, not only can the full-link service unit to be stress tested be clearly displayed through the topology structure, but the nodes in the topology structure can also be edited to obtain the service unit to be stress tested, thereby improving the efficiency of stress testing. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0032] Figure 1 is a schematic diagram of a full-link stress testing method provided by an exemplary embodiment of the present application;

[0033] Figure 2 is a schematic diagram of the architecture of a computer system provided by an exemplary embodiment of the present application;

[0034] Figure 3is a flowchart of a full-link stress testing method provided by an exemplary embodiment of the present application;

[0035] Figure 4 is a flowchart of a full-link stress testing method provided by an exemplary embodiment of the present application;

[0036] Figure 5 is a schematic diagram of a link service topology structure provided by an exemplary embodiment of the present application;

[0037] Figure 6 It is a schematic diagram of performing Mock configuration on a business service interface provided by an exemplary embodiment of the present application;

[0038] Figure 7 It is a schematic diagram of performing Mock configuration on a database provided by an exemplary embodiment of the present application;

[0039] Figure 8 It is a schematic diagram of overview data from the perspective of a requesting end that initiates a stress test provided by an exemplary embodiment of the present application;

[0040] Fig. 9 is a schematic diagram of node status of a service node provided by an exemplary embodiment of the present application;

[0041] Fig.10 is a diffusion diagram of a QPS provided by an exemplary embodiment of the present application;

[0042] Fig.11 is a schematic diagram of a full-link stress testing method provided by an exemplary embodiment of the present application;

[0043] Fig.12 is a schematic diagram of constructing a tree topology structure provided by an exemplary embodiment of the present application;

[0044] Fig.13 It is a schematic diagram of performing a Mock operation on a service unit provided by an exemplary embodiment of the present application;

[0045] Fig.14 is a schematic diagram of a real-time monitoring service unit provided by an exemplary embodiment of the present application;

[0046] Fig.15 It is a schematic diagram of implementing stress testing using a stress testing SDK provided by an exemplary embodiment of the present application;

[0047] Fig.16 is a block diagram of a full-link stress testing device provided by an exemplary embodiment of the present application;

[0048] Fig.17 It is a structural diagram of a computer device provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical scheme and advantages of the present application clearer, the implementation mode of the present application will be further described in detail below in conjunction with the accompanying drawings. The exemplary embodiments will be described in detail here, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation modes described in the following exemplary embodiments do not represent all implementation modes consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.

[0050] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms of "a", "said" and "the" used in this disclosure and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0051] It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other.

[0052] First, the nouns and terms involved in the embodiments of the present application are briefly introduced:

[0053] Mocking operation: In development, it generally refers to returning a virtual return value when the business service interface is called.

[0054] MOCK service: provides MOCK operation services, which can configure MOCK rules for multiple interfaces and return data.

[0055] Service Level Agreement (SLA): It is an agreement or contract between a service provider and a service user regarding the quality, level, and performance of the service.

[0056] Query Per Second (QPS): It is a measure of the amount of traffic processed by a specific query server within a specified time. In stress testing, it is the data from the server's perspective.

[0057] Request Per Second (RPS): It is a measure of the amount of request traffic sent by a specific stress-generating machine within a specified time. In stress testing, it is the data from the request-side perspective.

[0058] Figure 1 : is a schematic diagram of a full-link stress testing method provided by an exemplary embodiment of the present application. The method can be executed by a stress testing software development kit (Software Development Kit, SDK). The method includes:

[0059] The stress testing SDK obtains the calling relationship 10 between each service unit in the business service; generates a tree topology structure 20 based on the calling relationship 10; the tree topology structure 20 includes at least two service nodes, and the service nodes in at least two service nodes correspond one to one to the service units; in response to the editing operation of the tree topology structure 20, the service unit to be stress tested is determined.

[0060] A service unit is a functional unit that can provide a certain function.

[0061] For example, taking video playback as an example, the video recommendation function is a service unit, the advertisement recommendation function is a service unit, and the barrage display function is a service unit, but it is not limited to this, and the embodiments of the present application do not make specific limitations on this.

[0062] Optionally, the service unit includes a business service interface or a database. The business service interface refers to a docking interface that can provide a corresponding service function. By calling the interface, the service function can be obtained. For example, the video recommendation function in the video playback software corresponds to a business service interface. By calling the business service interface of the video recommendation function, the video playback software can have a video recommendation function.

[0063] Optionally, the business service interface includes an interface provided by itself or an interface provided by a third party.

[0064] The call relationship 10 refers to a single-layer call relationship between any two service units in a business service.

[0065] For example, calling relationship 10 includes: service unit 1 calls service unit 2, service unit 2 calls service unit 3, and service unit 2 calls service unit 4, where each service unit corresponds to a service unit name and a business service interface, for example, service unit one@business service interface one, where the service unit name is before @ and the business service interface corresponding to the service unit is after @.

[0066] Exemplarily, the stress testing SDK determines the link service topology structure 30 to be stress tested in response to the selection operation of the entry service node in the tree topology structure 20; the stress testing SDK determines the service unit to be stress tested based on the service node in the link service topology structure 30.

[0067] The link service topology 30 is a subset of the tree topology 20 .

[0068] The entry service node is a service node that is a root node in the link service topology structure 30 ; or, the entry service node is a service node located at the top in the link service topology structure 30 .

[0069] For example, in the case where the entry service node is the root node in the tree topology structure 20, the link service topology structure 30 takes the root node in the tree topology structure 20 as the root node in the link service topology structure 30, and the link service topology structure 30 includes the root node and leaf nodes in the tree topology structure 20; in the case where the entry service node is the leaf node in the tree topology structure 20, the link service topology structure 30 takes the leaf node in the tree topology structure 20 as the root node in the link service topology structure 30, and the link service topology structure 30 only includes the leaf nodes in the tree topology structure 20.

[0070] Optionally, the stress testing SDK determines the entry service node in the tree topology structure 20 in response to a query operation on the service unit name and / or business service interface corresponding to the entry service node; after determining the entry service node, based on the calling relationship 10 between each service unit, obtains the downstream service node having a link relationship with the entry service node; based on the entry service node and the downstream service node, determines the link service topology structure 30 to be stress tested.

[0071] The downstream service node is a service node that is a leaf node in the link service topology structure 30 .

[0072] The link relationship includes a direct calling relationship or an indirect calling relationship with the entry service node.

[0073] For example, the tree topology structure 20 includes four service nodes, specifically: service unit 1 calls service unit 2, service unit 2 calls service unit 3, and service unit 2 calls service unit 4. The stress testing SDK searches in the tree topology structure 20 based on the service unit name and / or business service interface, and determines that the entry and exit service nodes are: service unit 2. Based on the calling relationship 10 between each service unit, the downstream service nodes with a link relationship with the entry service node are determined to be: service unit 3, service unit 4, thereby obtaining a link service topology structure 30. After obtaining the service nodes in the link service topology structure 30, the service nodes in the link service topology structure 30 can be added or deleted, for example, adding service node 5.

[0074] Deletion is to delete the existing service nodes in the link service topology structure 30.

[0075] Adding is to add the link service topology structure 30 from scratch, that is, gradually adding new service nodes in the order of root node-leaf node.

[0076] In a possible implementation, after obtaining the service node in the link service topology structure 30, a service unit corresponding to the service node may be simulated and configured as a Mock to obtain a simulated service unit.

[0077] The simulation service unit is a virtual service unit. When the simulation service unit is called, it returns a virtual return value in the simulation service unit.

[0078] Optionally, when the service unit is a business service interface, the business service interface is mock configured to obtain a simulated business service interface; wherein the simulated business service interface is a virtual business service interface; when the business service interface is called, it returns the data configured in the simulated business service interface.

[0079] Optionally, when the service unit is a database, the database is mock configured to obtain a shadow database; wherein the shadow database is a virtual database; when the storage resources in the database are called, the configured storage resources in the shadow database are returned.

[0080] For example, when service unit 3 is business service interface 3, the service unit is configured with Mock to obtain simulated business service interface 3*. When service unit 4 is database 4, the service unit is configured with Mock to obtain shadow database 4*. For example, when business service interface 3 is called, the data configured in simulated business service interface 3* is directly returned; when the storage resources in database 4 are called, the storage resources configured in shadow database 4* are returned.

[0081] In a possible implementation, during the process of editing the service nodes in the link service topology 30, an SLA indicator may be set on the service unit corresponding to each service node. The SLA indicator corresponds to the service unit one by one. When performing a stress test on the service unit, the stress test is interrupted based on the SLA indicator.

[0082] SLA indicators are used to measure the stability of service units.

[0083] Exemplarily, when a service unit is subjected to a stress test, a monitoring indicator of the service unit is obtained; when the monitoring indicator does not meet the SLA indicator and reaches a tolerance corresponding to the SLA indicator, the stress test is interrupted.

[0084] Monitoring indicators refer to the real-time measurement data of the service unit when performing stress testing.

[0085] Tolerance refers to the number of times or time that the monitored indicator cannot meet the SLA indicator.

[0086] For example, the SLA indicators set for service unit 3 are: CPU usage 90%, MEM usage 90%, call success rate 99.9%; when stress testing service unit 3, the monitoring indicators of service unit 3 are: CPU usage 50%, MEM usage 30%, call success rate 99%. Comparing the monitoring indicators and SLA indicators of service unit 3, it can be seen that the CPU usage and MEM usage of service unit 3 both meet the SLA indicators, and the call success rate of service unit 3 does not meet the SLA indicators.

[0087] The health of the service unit is judged based on the monitoring indicators, SLA indicators, and the tolerance corresponding to the SLA indicators.

[0088] The health of the service unit includes healthy, sub-healthy and unhealthy. Different results will be displayed in different colors in the real-time status diagram of the service unit, corresponding to green, yellow and red respectively. For example, the tolerance corresponding to the SLA indicator is three times of not meeting the SLA indicator. If the service unit does not meet the SLA indicator three times, the health of the service unit will be red, and the stress test will be stopped in time.

[0089] In summary, the method provided in this embodiment obtains the calling relationship between each service unit in the business service; generates a tree topology structure based on the calling relationship; and determines the service unit to be stress tested in response to the editing operation of the tree topology structure. Based on the above method, not only can the full-link service unit to be stress tested be clearly displayed through the topology structure, thereby improving the observability of the link service, but also the nodes in the topology structure can be edited or added or deleted; secondly, Mock configuration is performed for different service units to obtain simulated service units, thereby avoiding the generation of dirty data during the stress test; in addition, by setting SLA indicators for each service unit, intelligent detection of the stability of the service unit during the stress test is achieved, without the need to manually monitor whether each service unit meets the stability indicators, thereby improving the efficiency of the stress test.

[0090] Figure 2 The schematic diagram of the architecture of a computer system provided by an embodiment of the present application is shown. The computer system may include: a terminal 100 and a server 200.

[0091] The terminal 100 can be an electronic device such as a mobile phone, a tablet computer, a vehicle-mounted terminal (vehicle computer), a wearable device, a personal computer (PC), a palm image recognition voice interaction device, a palm image recognition appliance, a vehicle-mounted terminal, an aircraft, an unmanned vending terminal, etc. The terminal 100 can be installed with a client that runs a target application. The target application can be an application that refers to the full-link stress test, or it can be other applications that provide a full-link stress test function, which is not limited in this application. In addition, this application does not limit the form of the target application, including but not limited to applications (Application, App) installed in the terminal 100, applets, etc., and can also be in the form of a web page.

[0092] The server 200 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services, cloud database, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and cloud servers for basic cloud computing services such as big data. The server 200 may be a background server of the above-mentioned target application, used to provide background services for the client of the target application.

[0093] Among them, cloud technology refers to a hosting technology that unifies hardware, software, network and other resources in a wide area network or local area network to realize data computing, storage, processing and sharing. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool, which is used on demand and flexible and convenient. Cloud computing technology will become an important support. The background services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the high development and application of the Internet industry, in the future, each item may have its own identification mark, and all need to be transmitted to the background system for logical processing. Data of different levels will be processed separately. All kinds of industry data require strong system backing support, which can only be achieved through cloud computing.

[0094] In some embodiments, the above-mentioned server can also be implemented as a node in a blockchain system. Blockchain is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, the platform product service layer, and the application service layer.

[0095] The terminal 100 and the server 200 may communicate with each other via a network, such as a wired or wireless network.

[0096] Figure 3 This is a flowchart of a full-link stress testing method provided by an exemplary embodiment of the present application. The method can be executed by a stress testing SDK. The method includes:

[0097] Step 302: Obtain the calling relationship between each service unit in the business service.

[0098] Stress testing is used to obtain the limits of correct operation of business service systems and to check the ability of business service systems to perform correctly under instantaneous peak loads.

[0099] For example, when stress testing a server, you can increase the number of concurrent users, or continuously send requests to the server, or send extremely large amounts of data to the server at one time, and observe the maximum state that the server can reach while maintaining normal operation.

[0100] A service unit is a functional unit that can provide a certain function.

[0101] For example, taking video playback as an example, the video recommendation function is a service unit, the advertisement recommendation function is a service unit, and the barrage display function is a service unit, but it is not limited to this, and the embodiments of the present application do not make specific limitations on this.

[0102] Optionally, the service unit includes a business service interface or a database. The business service interface refers to a docking interface that can provide a corresponding service function. By calling the interface, the service function can be obtained. For example, the video recommendation function in the video playback software corresponds to a business service interface. By calling the business service interface of the video recommendation function, the video playback software can have a video recommendation function.

[0103] Optionally, the business service interface includes an interface provided by itself or an interface provided by a third party.

[0104] A call relationship refers to a single-layer call relationship between any two service units in a business service.

[0105] For example, the calling relationship includes: service unit 1 calls service unit 2, service unit 2 calls service unit 3, and service unit 2 calls service unit 4.

[0106] Step 304: Generate a tree topology structure based on the call relationship.

[0107] The tree topology is formed by adding branches to the bus structure. The transmission medium of the tree topology can have multiple branches, but it does not form a closed loop. The tree topology can be symmetrical and has a certain fault tolerance. When a branch fails, the branch can be separated from the entire structure. The information sent by any node can be transmitted throughout the transmission medium, which is a broadcast network. It is a hierarchical structure. The nodes are connected hierarchically. Information exchange is mainly carried out between upper and lower nodes. Adjacent nodes or nodes on the same layer generally do not exchange data.

[0108] The tree topology structure includes at least two service nodes, and the service nodes in the at least two service nodes correspond to the service units one by one, that is, each service node in the tree topology structure corresponds to one service unit.

[0109] For example, the calling relationship includes: service unit 1 calls service unit 2, service unit 2 calls service unit 3, and service unit 2 calls service unit 4. Based on the calling relationship between service units 1-4, they are integrated into the same tree topology structure, that is, a tree topology structure in which service unit 1 calls service unit 2, service unit 2 calls service unit 3 and service unit 4 is obtained.

[0110] Step 306: In response to the editing operation of the tree topology structure, determine the service unit to be stress tested.

[0111] The editing operation refers to editing the service nodes in the tree topology structure, that is, editing the service units in the business service.

[0112] Optionally, the editing operation includes at least one of a selection operation, an addition operation, and a deletion operation, but is not limited thereto, and the embodiments of the present application do not make specific limitations on this.

[0113] The selection operation refers to selecting a service node in the tree topology structure and using the selected service node as a service unit to be subjected to stress testing.

[0114] The deletion operation refers to deleting the service node in the tree topology structure.

[0115] The adding operation refers to adding service nodes from scratch, that is, gradually adding new service nodes in the order of root node-leaf node.

[0116] In summary, the method provided in this embodiment obtains the calling relationship between each service unit in the business service; generates a tree topology structure based on the calling relationship; and determines the service unit to be stress tested in response to the editing operation of the tree topology structure. Based on the above method, not only can the full-link service unit to be stress tested be clearly displayed through the topology structure, but the nodes in the topology structure can also be edited to obtain the service unit to be stress tested, thereby improving the efficiency of the stress test.

[0117] Figure 4 This is a flowchart of a full-link stress testing method provided by an exemplary embodiment of the present application. The method can be executed by a stress testing SDK. The method includes:

[0118] Step 402: Obtain the calling relationship between each service unit in the business service.

[0119] Stress testing is used to obtain the limits of correct operation of business service systems and to check the ability of business service systems to perform correctly under instantaneous peak loads.

[0120] For example, when stress testing a server, you can increase the number of concurrent users, or continuously send requests to the server, or send extremely large amounts of data to the server at one time, and observe the maximum state that the server can reach while maintaining normal operation.

[0121] A service unit is a functional unit that can provide a certain function.

[0122] Optionally, the service unit includes a business service interface or a database. The business service interface refers to a docking interface that can provide a corresponding service function. By calling the interface, the service function can be obtained. For example, the video recommendation function in the video playback software corresponds to a business service interface. By calling the business service interface of the video recommendation function, the video playback software can have a video recommendation function.

[0123] Optionally, the business service interface includes an interface provided by itself or an interface provided by a third party.

[0124] A call relationship refers to a single-layer call relationship between any two service units in a business service.

[0125] Step 404: Generate a tree topology structure based on the call relationship.

[0126] The tree topology structure includes at least two service nodes, and the service nodes in the at least two service nodes correspond to the service units one by one, that is, each service node in the tree topology structure corresponds to one service unit.

[0127] For example, the calling relationship includes: service unit 1 calls service unit 2, service unit 2 calls service unit 3, and service unit 2 calls service unit 4. Based on the calling relationship between service units 1-4, they are integrated into the same tree topology structure, that is, a tree topology structure in which service unit 1 calls service unit 2, service unit 2 calls service unit 3 and service unit 4 is obtained.

[0128] Step 406: In response to the selection operation of the entry service node in the tree topology structure, determine the link service topology structure to be stress tested.

[0129] The link service topology is a subset of the tree topology.

[0130] The selection operation refers to selecting an entry service node in the tree topology structure and using the selected service node as the entry service node.

[0131] The entry service node is a service node that is a root node in the link service topology structure; or, the entry service node is a service node located at the top in the link service topology structure 30 .

[0132] For example, in the case where the entry service node is the root node in a tree topology structure, the link service topology structure uses the root node in the tree topology structure as the root node in the link service topology structure, and the link service topology structure includes the root node and leaf nodes in the tree topology structure; in the case where the entry service node is a leaf node in the tree topology structure, the link service topology structure uses the leaf node in the tree topology structure as the root node in the link service topology structure, and the link service topology structure only includes the leaf nodes in the tree topology structure.

[0133] Exemplarily, the stress testing SDK determines the entry service node in the tree topology structure in response to the query operation of the service unit name and / or business service interface corresponding to the entry service node; after determining the entry service node, based on the calling relationship between each service unit, obtains the downstream service node having a link relationship with the entry service node; based on the entry service node and the downstream service node, determines the link service topology structure to be stress tested.

[0134] The downstream service node is a service node that is a leaf node in the link service topology.

[0135] The link relationship includes a direct calling relationship or an indirect calling relationship with the entry service node.

[0136] For example, the tree topology includes four service nodes, specifically: service unit 1 calls service unit 2, service unit 2 calls service unit 3, and service unit 2 calls service unit 4. The stress testing SDK searches in the tree topology based on the service unit name and / or business service interface, and determines that the entry and exit service nodes are: service unit 2. Based on the calling relationship between each service unit, the downstream service nodes with a link relationship with the entry service node are determined to be: service unit 3, service unit 4, thereby obtaining a link service topology.

[0137] For example, Figure 5 The schematic diagram of the link service topology structure shown in the figure, the link service topology structure currently undergoing stress testing in the figure involves five service nodes, and each service node corresponds to a service unit. The five service nodes include: service unit 1, service unit 2, service unit 3, service unit 4 and service unit 5, wherein service node 1 is an entry service node, service units 2-5 are downstream service nodes, service unit 1 calls service unit 2, service unit 1 calls service unit 3, service unit 3 calls service unit 4, and service unit 3 calls service unit 5. In addition to constructing a link service topology structure based on entry service nodes and downstream service nodes, it is also possible to add or delete service nodes in the link service topology structure, or to zoom in or out the link service topology structure, or to view the details of the service units corresponding to the service nodes in the link service topology structure.

[0138] Step 408: Determine the service unit to be stress tested based on the link service topology.

[0139] Exemplarily, the stress testing SDK determines the service unit to be stress tested based on the link service topology structure. That is, the stress testing SDK determines the service unit to be stress tested based on all service units in the link service topology structure.

[0140] Optionally, after obtaining the service nodes in the link service topology structure, the service nodes in the link service topology structure may be added or deleted.

[0141] Deletion is the process of deleting an existing service node in the link service topology structure.

[0142] Adding is to add service nodes from scratch to form a link service topology structure, that is, gradually adding new service nodes in the order of root node-leaf node.

[0143] In a possible implementation, after obtaining the service node in the link service topology structure, a mock configuration may be performed on the service unit corresponding to the service node to obtain a simulated service unit.

[0144] The simulation service unit is a virtual service unit. When the simulation service unit is called, it returns a virtual return value in the simulation service unit.

[0145] Optionally, when the service unit is a business service interface, the business service interface is mock configured to obtain a simulated business service interface; wherein the simulated business service interface is a virtual business service interface; when the business service interface is called, it returns the data configured in the simulated business service interface.

[0146] For example, Figure 6 The schematic diagram of the Mock configuration of the business service interface is shown. Since business services are relatively complex, when stress testing business services, the links in the link service topology are generally longer. Some business service interfaces involving third-party business services may not be willing or able to be stress tested. Therefore, it is necessary to perform Mock configuration on the business service interface. By clicking on the details of the business service interface in the link service topology, the Mock configuration of the business service interface can be realized. The Mock configuration interface of the business service interface displays: whether to perform Mock configuration on the business service interface, whether to Mock all business service interfaces, the method of selecting the Mock service, and the address of the Mock service. In addition, it also includes the target simulated business service interface of the Mock configuration, the name setting of the simulated business service interface, the protocol setting followed by the simulated business service interface, the environment, the namespace, and the timeout period.

[0147] Optionally, the Mock service mode includes a default mode and a custom mode.

[0148] Optionally, when the service unit is a database, the database is mock configured to obtain a shadow database; wherein the shadow database is a virtual database; when the storage resources in the database are called, the configured storage resources in the shadow database are returned.

[0149] For example, when the service unit is business service interface 1, the service unit is mocked and configured to obtain simulated business service interface 1*. When the service unit is database 2, the service unit is mocked and configured to obtain shadow database 2*. For example, when business service interface 1 is called, the data configured in simulated business service interface 1* is directly returned; when the storage resources in database 2 are called, the storage resources configured in shadow database 2* are returned.

[0150] For example, Figure 7The diagram shown is a schematic diagram of Mock configuration of the database. When stress testing the business service, in order to avoid dirty data generated by the stress test traffic, it is necessary to perform Mock configuration on the database. By clicking on the details of the database in the link service topology, you can implement Mock configuration of the database and obtain a shadow database. The Mock configuration interface of the database displays: whether there is already a Mock configuration of the corresponding shadow database in the business service, whether to discard the stress test traffic this time, and how to replace the existing shadow database. In addition, it also includes the password of the shadow database configured by the Mock and the shadow database configured by the Mock.

[0151] Optionally, methods of replacing an existing shadow database include: direct replacement and matching replacement.

[0152] In a possible implementation, during the process of editing the service nodes in the link service topology structure, an SLA indicator may be set on the service unit corresponding to each service node. The SLA indicator corresponds to the service unit one by one. When performing a stress test on the service unit, the stress test is interrupted based on the SLA indicator.

[0153] SLA indicators are used to measure the stability of service units.

[0154] For example, the configuration table of SLA indicators is shown in Table 1. The SLA indicators configured in the table can automatically monitor the stability of each service unit. When the SLA indicator of a service unit does not meet the requirements, the stress test and fuse processing are automatically performed to avoid online service failures from bringing a bad experience to business users.

[0155] Table 1 SLA indicator configuration table

[0156]

[0157] Exemplarily, when a service unit is subjected to a stress test, monitoring indicators of the service unit are obtained; and based on the monitoring indicators and the SLA indicators, the stress test is interrupted.

[0158] Optionally, when performing stress testing on a service unit, a monitoring indicator of the service unit is obtained; when the monitoring indicator does not meet the SLA indicator and reaches a tolerance corresponding to the SLA indicator, the stress test is interrupted.

[0159] Monitoring indicators refer to the real-time measurement data of the service unit when performing stress testing.

[0160] Tolerance refers to the number of times or time that the monitored indicator cannot meet the SLA indicator.

[0161] For example, the SLA indicators set for a service unit are: CPU usage 90%, MEM usage 90%, call success rate 99.9%; when the service unit is stress tested, the monitoring indicators of the service unit are: CPU usage 50%, MEM usage 30%, call success rate 99%. Comparing the monitoring indicators and SLA indicators of the service unit, it can be seen that the CPU usage and MEM usage of the service unit meet the SLA indicators, but the call success rate of the service unit does not meet the SLA indicators.

[0162] After the stress test for business services is started, this solution provides a complete set of stress test indicator viewing reports, which not only allows you to see the overview data of the overall stress test during the stress test, but also allows you to view the stress test reports of independent links. Figure 8 What is shown is a schematic diagram of the overview data from the perspective of the request end that initiates the stress test. The overview data includes indicators such as request rate per second RPS, average response time, request failure rate, total number of requests and network traffic, and there are also dynamic curve graphs as the stress test process is executed. The dynamic curve graphs include curve graphs of request failure rate and concurrency number, curve graphs of average response time and concurrency number, and curve graphs of request rate per second and concurrency number. In addition, the overview data also includes detailed parameters of the stress test initiated by the initiator, including: the duration of this stress test, scenario type, speed adjustment of the request rate per second, start time of the stress test, end time of the stress test, executor of the stress test (stress tester) and stress test status.

[0163] The health of the service unit is judged based on the monitoring indicators, SLA indicators, and the tolerance corresponding to the SLA indicators.

[0164] The health of the service unit includes healthy, sub-healthy and unhealthy. Different results will be displayed in different colors in the real-time status diagram of the service unit, corresponding to green, yellow and red respectively. For example, the tolerance corresponding to the SLA indicator is three times of not meeting the SLA indicator. If the service unit does not meet the SLA indicator three times, the health of the service unit will be red, and the stress test will be stopped in time.

[0165] In addition to seeing the overview data of the overall stress test, you can also see the node status diagram of the service node in real time, such as Fig. 9 A schematic diagram of the node status of the service node shown in the figure, the right side of the figure shows the link service topology structure for stress testing, in detail: service node one 901 calls service node two 902, service node one 901 calls service node three 903; the left side of the figure shows the node status corresponding to service node one 901, and the node status includes: node status description, node name, CPU utilization, memory utilization, service success rate, and at least one of the interface delay of the business service interface.

[0166] Optionally, the status description of the node includes at least one of location status, health status, sub-health status, unhealthy status and query abnormal status, but is not limited to this, and the embodiments of the present application do not make specific limitations on this.

[0167] In addition to viewing the overall stress test overview data, you can also view the QPS diffusion chart of the overall stress test in real time, such as Fig.10 The QPS diffusion diagram shown in the figure shows the link service topology structure for stress testing, which is as follows: service node one 1001 calls service node two 1002, service node one 1001 calls service node three 1003, service node one 1001 calls service node four 1004, and service node one 1001 calls service node five 1005. In the figure, the QPS of service node one 1001 is 3.76, the QPS of service node two 1002 is 3.76, the QPS of service node three 1003 is 3.76, the QPS of service node four 1004 is 3.75, and the QPS of service node five 1005 is 3.78. Due to the different processing logic of each service node, when scaling up or down the stress test traffic, for example, during the stress test, service node 1001 calls service node 2 1002, and service node 1 1001 sends a request per second. After the request reaches service node 2 1002, service node 2 1002 aligns and performs a scaling operation, and one request becomes three requests. Through the QPS diffusion diagram, we can clearly see the stress test traffic acceptance capacity between service nodes and the amplification multiple of the service node for the stress test traffic, so as to facilitate subsequent resource planning. For example, the service unit corresponding to service node 1001 places one device, and the service unit corresponding to service node 2 1002 places three devices.

[0168] In a possible implementation, the stress testing SDK obtains a business service identifier corresponding to the business service; the stress testing SDK performs identification based on the business service identifier to obtain a service unit to be stress tested in the business service.

[0169] Optionally, the stress testing SDK obtains historical stress testing records corresponding to the business service; identifies the business service identifier in the historical stress testing records to obtain a historical service unit corresponding to the business service identifier; and based on the historical service unit, obtains a service unit in the business service to be stress tested.

[0170] Historical stress testing records include historical business services that have undergone stress testing, and historical service units that have undergone stress testing in historical business services;

[0171] For example, the stress test SDK identifies the historical stress test records based on the business service identifier, obtains the historical service unit corresponding to the business service identifier, and determines the service unit to be stress tested corresponding to the business service in this stress test based on the historical service unit that has undergone stress testing in the historical business service. For example, the historical service unit that has undergone stress testing in historical business service A is: service unit 3-8; then, the service unit to be stress tested corresponding to the business service in this stress test also selects service unit 3-8.

[0172] In one possible implementation, the stress testing SDK performs a pre-stress test on all service nodes in the tree topology structure to obtain the stress testing data corresponding to all service nodes; the upper-level node of the service node corresponding to the stress testing data that meets the screening conditions is automatically determined as the entry service node, and based on the entry service node, the link service topology structure to be stress tested is obtained; based on the link service topology structure, the service unit to be stress tested is determined.

[0173] Stress test data is used to evaluate the carrying capacity of service nodes.

[0174] Pre-stress testing refers to a pre-test performed before stress testing to determine the service units to be tested in the tree topology.

[0175] Optionally, the stress testing data meeting the screening conditions includes at least one of the following:

[0176] The stress test data with a delay time greater than the first threshold; the delay time is used to indicate the delay time for the service unit to complete the request;

[0177] The stress test data with a growth rate greater than the second threshold; the growth rate is used to describe the growth of requests in the service unit, but is not limited to this, and the embodiments of the present application do not make specific limitations on this.

[0178] A service unit with a large delay time indicates that the service node's ability to process requests is relatively weak, and the service node can be used as the object of key stress testing.

[0179] A service unit with a large growth rate means that the service node needs to face more stress testing traffic in some scenarios. The ability of the service node to process requests requires more attention. The service node can be the object of key stress testing.

[0180] In summary, the method provided in this embodiment obtains the calling relationship between each service unit in the business service; generates a tree topology structure based on the calling relationship; and determines the service unit to be stress tested in response to the editing operation of the tree topology structure. Based on the above method, not only can the full-link service unit to be stress tested be clearly displayed through the topology structure, thereby improving the observability of the link service, but the nodes in the topology structure can also be edited to obtain the service unit to be stress tested, thereby improving the efficiency of the stress test.

[0181] The method provided in this embodiment selects an entry service node in a tree topology structure, determines a downstream service node that has a direct call relationship or an indirect call relationship with the entry service node, determines a link service topology structure to be stress tested based on the entry service node and the downstream service node, and determines a service unit to be stress tested based on the link service topology structure. Based on the above method, by selecting an entry service node, the entire link service topology structure with the entry service node as the root node can be quickly obtained, thereby determining the service unit to be stress tested, and improving the efficiency of the stress test.

[0182] The method provided in this embodiment performs Mock configuration on different service units to obtain simulated service units, so that different service units can achieve data isolation, thereby avoiding the generation of dirty data during the stress test.

[0183] The method provided in this embodiment realizes intelligent detection of the stability of service units during stress testing by setting SLA indicators for each service unit. There is no need to manually monitor whether each service unit meets the stability indicators, thereby improving the efficiency of stress testing.

[0184] Fig.11 : is a schematic diagram of a full-link stress testing method provided by an exemplary embodiment of the present application. The method can be executed by a stress testing platform. The method includes:

[0185] The stress testing platform performs link combing service 1102 on the calling relationship between each service unit in the business service. The stress testing management terminal 1101 obtains the link topology relationship based on the service unit interface to obtain a single calling relationship between any two service units in the business service. After the stress testing management terminal 1101 obtains the link service topology structure corresponding to the business service, the stress testing management terminal 1101 edits the service unit in the link service topology structure and sends it to the SDK configuration management center 1103. The SDK configuration management center 1103 is used to store the configuration of the service unit in the link service topology structure. During the next stress test, it can be called directly from the SDK configuration management center 1103 without reconfiguration. While editing the service unit in the link service topology structure, the stress testing management terminal 1101 can also set SLA indicators for the service unit corresponding to each service node, and send the SLA indicators corresponding to each service node to the stress testing control center 1104.

[0186] Optionally, the stress testing management end 1101 edits the service unit in the link service topology structure, including: when the service unit is a business service interface, the business service interface is mock configured to obtain a simulated business service interface 1112; when the service unit is a database, the database is mock configured to obtain a shadow database 1113.

[0187] After editing the service unit in the link service topology, the stress test engine 1106 starts the stress test. The stress test engine 1106 sends the stress test traffic to the entry service node 1107 and the downstream service node 1110 via the stress test SDK 1108. The stress test SDK 1108 sends the stress test traffic to the simulated business service interface 1112 or the shadow database 1113 based on the configuration of the service unit in the SDK configuration management center 1103. During the stress test of each service unit, the monitoring data capture component 1109 obtains the real-time measurement data of the service unit during the stress test. The cloud monitor 1111 pulls the real-time measurement data of the service unit from the monitoring data capture component 1109, and compares the real-time measurement data with the SLA indicator in the stress test control center 1104, so as to feedback the health of the service unit or the termination instruction to the stress test management end 1101, thereby realizing intelligent fuse.

[0188] To sum up, the method provided in this embodiment can not only clearly display the full-link service unit to be stress tested through the topological structure, thereby improving the observability of the link service, but also edit or add and delete nodes in the topological structure; secondly, Mock configuration is performed for different service units to obtain simulated service units, thereby avoiding the generation of dirty data during the stress testing process; in addition, by setting SLA indicators for each service unit, intelligent detection of the stability of the service unit during the stress testing process is achieved, without the need to manually monitor whether each service unit meets the stability indicators, thereby improving the efficiency of the stress testing.

[0189] Fig.12 This is a schematic diagram of building a tree topology structure provided by an exemplary embodiment of the present application. The method can be executed by a stress testing SDK. The method includes:

[0190] The stress testing SDK obtains the calling relationship 1201 between each service unit in the business service; the calling relationship 1201 refers to the single-layer calling relationship between any two service units in the business service. The stress testing SDK records all the service unit calling and service unit called relationships to form an independent single-layer calling chain, that is, a single-layer calling relationship. A tree topology structure 1202 is generated based on the calling relationship 1201; the tree topology structure 1202 includes at least two service nodes, and the service nodes in at least two service nodes correspond to the service units one by one.

[0191] A service unit is a functional unit that can provide a certain function.

[0192] Optionally, the service unit includes a business service interface or a database. The business service interface refers to a docking interface that can provide a corresponding service function. By calling the interface, the service function can be obtained. For example, the video recommendation function in the video playback software corresponds to a business service interface. By calling the business service interface of the video recommendation function, the video playback software can have a video recommendation function.

[0193] Optionally, the business service interface includes an interface provided by itself or an interface provided by a third party.

[0194] For example, calling relationship 1201 includes: service unit 1 calls service unit 2, service unit 2 calls service unit 3, and service unit 2 calls service unit 4, where each service unit corresponds to a service unit name and a business service interface, for example, service unit 1@business service interface 1, where the service unit name is before @ and the business service interface corresponding to the service unit is after @.

[0195] Exemplarily, the stress testing SDK determines the first link service topology structure 1203 to be stress tested in response to the selection operation of the entry service node in the tree topology structure 1202; the stress testing SDK determines the service unit to be stress tested based on the service node in the first link service topology structure 1203.

[0196] The link service topology 1203 is a subset of the tree topology 1202 .

[0197] When the user enters the specified service unit name and / or business service interface, the stress testing SDK will perform corresponding logical data queries, aggregate the downstream service nodes corresponding to the entry service node and generate a complete first-link service topology structure 1203. At the same time, it will verify the validity of the downstream service nodes during processing. If the access is invalid, the link call relationship will be eliminated, thereby obtaining the second-link service topology structure 1204.

[0198] To sum up, the method provided in this embodiment clearly displays the full-link service unit to be stress tested through the topological structure, thereby improving the observability of the link service. The nodes in the topological structure can also be edited or added or deleted, thereby improving the efficiency of the stress test.

[0199] Fig.13 This is a schematic diagram of performing a mock operation on a service unit provided by an exemplary embodiment of the present application. The method can be executed by a stress testing SDK. The method includes:

[0200] By acquiring the link service topology structure corresponding to the business service 1301, the service unit in the link service topology structure is configured by Mock to obtain a simulated service unit.

[0201] The simulation service unit is a virtual service unit. When the simulation service unit is called, it returns a virtual return value in the simulation service unit.

[0202] Optionally, when the service unit is a business service interface, the business service interface is configured by Mock as a simulated business service interface; when the service unit is a database, the database is configured by Mock as a shadow database.

[0203] During the stress test, the stress test SDK 1302 is equivalent to an interception filter. When the stress test traffic with the stress test mark enters the service unit, for example, the stress test traffic requests to call the business service interface 1 1303, requests to call the business service interface 2 1304, requests to access the database 1 1305, and requests to access the database 2 1306, the stress test SDK 1302 will determine the request of the current stress test traffic. When the stress test traffic requests to call the business service interface, the stress test SDK 1302 performs logical processing 1307 on the business service interface to determine whether the business service interface requested to be called is authorized and whether a mock is required, so as to directly report an error 1308 for the stress test traffic request, discard the request 1309, or forward the actual service unit request 1310 to the simulated service unit 1311. The actual service unit request 1310 refers to forwarding the request of the current stress test traffic to call the business service interface to the actual service unit. When the stress test traffic requests to access the database, the stress test SDK 1302 performs logic processing 1316 on the database to determine whether the database accessed by the stress test traffic request is authorized and whether a mock is required, thereby directly reporting the stress test traffic request as invalid data 1312, discarding data 1313, actual database access 1314, or accessing a shadow database 1315. The actual database access 1314 refers to forwarding the current stress test traffic request to access the database to the actual database.

[0204] Optionally, the database includes at least one of a MySQL database and a Remote Dictionary Server (Redis) database, but is not limited thereto and is not specifically limited in the embodiments of the present application.

[0205] In summary, the method provided in this embodiment performs Mock configuration for different service units to obtain simulated service units, thereby avoiding the generation of dirty data during the stress test and improving the efficiency of the stress test.

[0206] Fig.14 : is a schematic diagram of a real-time monitoring service unit provided by an exemplary embodiment of the present application. The method can be executed by a stress testing SDK. The method includes:

[0207] In the process of editing the service nodes in the link service topology structure, SLA indicators can also be set on the service units corresponding to each service node. Based on the SLA indicators set on the entry service node 1401 and the downstream service node 1403, the stress testing SDK 1402 detects the entry service node 1401 and the downstream service node 1403, and interrupts the stress test through the SLA indicators to achieve intelligent fuse processing for the stress test.

[0208] When stress testing the service unit, the cloud monitor 1404 obtains monitoring indicators of the entry service node 1401 and the downstream service node 1403 every 5 seconds, thereby generating detection feedback 1405.

[0209] Monitoring indicators refer to the real-time measurement data of the service unit when performing stress testing.

[0210] Optionally, the monitoring indicator includes at least one of CPU usage, MEM usage, call success rate, and delay, but is not limited to this, and the embodiments of the present application do not make specific limitations on this.

[0211] The detection feedback 1405 includes the real-time measurement data and SLA indicators of the ingress service node 1401 and the real-time measurement data and SLA indicators of the downstream service node 1403 .

[0212] For example, the SLA indicators of the entry service node 1401 are CPU usage 90%, MEM usage 90%, and call success rate 99.9%; the real-time measurement data of the entry service node 1401 is: CPU usage 50%, MEM usage 30%, and call success rate 99%. The SLA indicators of the downstream service node 1403 are CPU usage 60%, MEM usage 90%, and call success rate 80%; the real-time measurement data of the downstream service node 1403 is: CPU usage 50%, MEM usage 30%, and call success rate 99%.

[0213] The stress test management terminal 1407 queries and feedbacks the cloud monitor 1404 in real time, thereby obtaining the indicators and health status feedback 1406 corresponding to the ingress service node 1401 and the downstream service node 1403 .

[0214] The health of a service unit includes healthy, sub-healthy and unhealthy. Different results are displayed in different colors or shades in the real-time status diagram of the service unit, such as green, yellow and red. For example, the tolerance corresponding to the SLA indicator is three times of not meeting the SLA indicator. If the service unit does not meet the SLA indicator three times, the health of the service unit will be red, and the stress test will be stopped in time.

[0215] In summary, the method provided in this embodiment realizes intelligent detection of the stability of service units during stress testing by setting SLA indicators for each service unit. There is no need to manually monitor whether each service unit meets the stability indicators, thereby improving the efficiency of stress testing.

[0216] Fig.15 1 is a schematic diagram of implementing stress testing using a stress testing SDK provided by an exemplary embodiment of the present application. The method can be executed by the stress testing SDK. The method includes:

[0217] The stress testing SDK is the basis of the full-link stress testing method. It runs through the life cycle of the entire link and completes the above-mentioned link configuration, Mock service forwarding, isolated storage of shadow libraries, and intelligent SLA fuse functions. Since the embodiment of this application performs full-link stress testing on the background remote procedure call (RPC) service implemented in the Go language, the implementation of the stress testing SDK is also designed as a plug-in for the RPC service. The specific implementation principle is as follows: Fig.15 As shown, the stress test traffic includes stress test traffic request to call business service interface 1 1501, request to call business service interface 2 1502, request to access database 1 1503, and request to access database 2 1504. The core logic of the native client of the RPC service is the request processing Invoke operation 1505. The request processing operation 1505 can realize the processing of requests and return values ​​of all service interfaces. The embodiment of the present application controls the native client, creates a simulated client 1506, and forwards the stress test traffic based on the simulated client 1506, so as to realize the simulated Invoke operation 1505 in the simulated client. When the stress test traffic flows through the simulated client 1506, the simulated client 1506 processes the stress test traffic, for example, requests direct error 1507, discards the request 1508, the actual service unit request 1509 or forwards it to the simulated service unit 1510. Finally, the simulated client 1506 forwards the stress testing traffic to the native client 1511, and performs request processing operation 1505 in the native client 1511, for example, forwarding the stress testing traffic to the simulated business service interface 1512 or the shadow database 1513, thereby completing the entire stress testing process.

[0218] Optionally, there are various ways to implement the stress testing SDK. Although the embodiment of this application only implements the RPC service plug-in for the GO language, the implementation principle of RPC services in other languages ​​is similar. For example, a set of interception plug-ins can be implemented for the RPC service of the CPP language to complete operations such as forwarding the Mock service and isolating the data request of the shadow library.

[0219] Fig.16 A schematic diagram of the structure of a full-link stress test device provided by an exemplary embodiment of the present application is shown. The device can be implemented as all or part of a computer device through software, hardware, or a combination of both. The device includes:

[0220] The acquisition module 1601 is used to acquire the calling relationship between each service unit in the business service; the calling relationship refers to a single calling relationship between any two service units in the business service;

[0221] A generating module 1602 is used to generate a tree topology structure based on the calling relationship; the tree topology structure includes at least two service nodes, and the service nodes in the at least two service nodes correspond to the service units one by one;

[0222] The editing module 1603 is used to determine the service unit to be stress-tested in response to the editing operation of the tree topology structure.

[0223] In one possible implementation, the editing module 1603 is used to determine the link service topology structure to be stress tested in response to the selection operation of the entry service node in the tree topology structure; the link service topology structure is a subset of the tree topology structure; the entry service node is the service node at the top of the link service topology structure; based on the link service topology structure, the service unit to be stress tested is determined.

[0224] In a possible implementation, the editing module 1603 is used to determine the entry service node in the tree topology structure in response to a query operation of a service unit name and / or a business service interface corresponding to the entry service node.

[0225] In one possible implementation, the editing module 1603 is used to obtain, after determining the entry service node, a downstream service node having a link relationship with the entry service node based on the calling relationship between the various service units; the downstream service node is a service node that is a leaf node in the link service topology structure; the link relationship includes a direct calling relationship or an indirect calling relationship with the entry service node; based on the entry service node and the downstream service node, determine the link service topology structure to be stress tested.

[0226] In a possible implementation, the editing module 1603 is used to determine the service unit to be stress tested in response to a deletion operation of the service node in the link service topology structure.

[0227] In a possible implementation, the editing module 1603 is used to simulate the Mock configuration of the service unit to obtain a simulated service unit; wherein the simulated service unit is a virtual service unit; when the simulated service unit is called, the simulated service unit returns a virtual return value in the simulated service unit.

[0228] In one possible implementation, the editing module 1603 is used to, when the service unit is a business service interface, perform a Mock configuration on the business service interface to obtain a simulated business service interface; wherein the simulated business service interface is a virtual business service interface; and when the business service interface is called, it returns the data configured in the simulated business service interface.

[0229] In a possible implementation, the editing module 1603 is used to, when the service unit is a database, perform Mock configuration on the database to obtain a shadow database;

[0230] The shadow database is a virtual database; when the storage resources in the database are called, the configured storage resources in the shadow database are returned.

[0231] In one possible implementation, the editing module 1603 is used to set a service level agreement SLA indicator on the service unit; the SLA indicator corresponds to the service unit one-to-one; the SLA indicator is used to measure the stability of the service unit; when the service unit is stress tested, the stress test is interrupted based on the SLA indicator.

[0232] In one possible implementation, the editing module 1603 is used to obtain monitoring indicators of the service unit when the service unit is subjected to stress testing; the monitoring indicators refer to real-time measurement data of the service unit when the stress test is performed; based on the monitoring indicators and the SLA indicators, the stress test is interrupted.

[0233] In one possible implementation, the editing module 1603 is used to interrupt the stress test when the monitoring indicator does not meet the SLA indicator and reaches the tolerance corresponding to the SLA indicator; wherein the tolerance refers to the number of times or time that the monitoring indicator is tolerated not to meet the SLA indicator.

[0234] In a possible implementation, the acquisition module 1601 is used to acquire a business service identifier corresponding to the business service;

[0235] The identification module 1604 is used to identify based on the business service identifier to obtain the service unit to be stress-tested in the business service.

[0236] In a possible implementation, the acquisition module 1601 is used to acquire a historical stress test record corresponding to the business service; the historical stress test record includes a historical business service that has undergone the stress test, and a historical service unit that has undergone the stress test in the historical business service;

[0237] In a possible implementation, the identification module 1604 is used to identify the business service identifier in the historical stress testing record to obtain the historical service unit corresponding to the business service identifier; based on the historical service unit, obtain the service unit in the business service to be subjected to the stress test.

[0238] Determination module 1605 is used to perform a pre-stress test on all the service nodes in the tree topology structure to obtain stress test data corresponding to all the service nodes; the stress test data is used to evaluate the carrying capacity of the service nodes; the pre-stress test refers to a pre-test performed before the stress test to determine the service unit to be tested in the tree topology structure; the upper node of the service node corresponding to the stress test data that meets the screening conditions is automatically determined as the entry service node, and based on the entry service node, the link service topology structure to be stress tested is obtained; based on the link service topology structure, the service unit to be stress tested is determined.

[0239] The stress testing data that meets the screening conditions includes at least one of the following:

[0240] The stress test data with a delay time greater than a first threshold; the delay time is used to indicate the time delayed for the service unit to complete a request; the stress test data with a growth rate greater than a second threshold; the growth rate is used to describe the growth of the requests in the service unit.

[0241] Fig.17 The structural block diagram of a computer device 1700 shown in an exemplary embodiment of the present application is shown. The computer device can be implemented as the server in the above-mentioned solution of the present application. The image computer device 1700 includes a central processing unit (CPU) 1701, a system memory 1704 including a random access memory (RAM) 1702 and a read-only memory (ROM) 1703, and a system bus 1705 connecting the system memory 1704 and the central processing unit 1701. The image computer device 1700 also includes a large-capacity storage device 1706 for storing an operating system 1709, an application program 1710 and other program modules 1711.

[0242] The mass storage device 1706 is connected to the central processing unit 1701 through a mass storage controller (not shown) connected to the system bus 1705. The mass storage device 1706 and its associated computer readable medium provide non-volatile storage for the image computer device 1700. That is, the mass storage device 1706 may include a computer readable medium (not shown) such as a hard disk or a compact disc read-only memory (CD-ROM) drive.

[0243] Without loss of generality, the computer-readable medium may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable instructions, data structures, program modules or other data. Computer storage media include RAM, Erasable Programmable Read Only Memory (EPROM), Electronically-Erasable Programmable Read-Only Memory (EEPROM) flash memory or other solid-state storage technology, CD-ROM, Digital Versatile Disc (DVD) or other optical storage, cassettes, tapes, disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that the computer storage medium is not limited to the above. The above-mentioned system memory 1704 and mass storage device 1706 can be collectively referred to as memory.

[0244] According to various embodiments of the present disclosure, the image computer device 1700 can also be connected to a remote computer on a network such as the Internet for operation. That is, the image computer device 1700 can be connected to a network 1708 via a network interface unit 1707 connected to the system bus 1705, or the network interface unit 1707 can be used to connect to other types of networks or remote computer systems (not shown).

[0245] The memory also includes at least one computer program, which is stored in the memory. The central processor 1701 implements all or part of the steps in the full-link stress testing method shown in the above-mentioned embodiments by executing the at least one program.

[0246] An embodiment of the present application also provides a computer device, which includes a processor and a memory, wherein at least one program is stored in the memory, and the at least one program is loaded and executed by the processor to implement the full-link stress testing method provided by the above-mentioned method embodiments.

[0247] An embodiment of the present application also provides a computer-readable storage medium, which stores at least one computer program. The at least one computer program is loaded and executed by a processor to implement the full-link stress testing method provided by the above-mentioned method embodiments.

[0248] An embodiment of the present application also provides a computer program product, which includes a computer program, and the computer program is stored in a computer-readable storage medium; the computer program is read and executed from the computer-readable storage medium by a processor of a computer device, so that the computer device executes to implement the full-link stress testing method provided by the above-mentioned method embodiments.

[0249] It will be understood that in the specific implementation of the present application, the data involved, historical data, and data related to user data processing such as portraits related to user identity or characteristics, when the above embodiments of the present application are applied to specific products or technologies, need to obtain user permission or consent, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0250] It should be understood that the "plurality" mentioned in this article refers to two or more. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.

[0251] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0252] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent switching, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A full-link stress testing method, characterized in that: The method is executed by a stress testing software development kit SDK; the method includes: Obtaining a call relationship between each service unit in the business service; the call relationship refers to a single call relationship between any two service units in the business service; Generate a tree topology structure based on the call relationship; the tree topology structure includes at least two service nodes, and the service nodes in the at least two service nodes correspond to the service units one by one; In response to the editing operation of the tree topology structure, the service unit to be stress tested is determined.

2. The method according to claim 1, characterized in that The step of determining the service unit to be subjected to stress testing in response to the editing operation of the tree topology structure comprises: In response to the selection operation of the entry service node in the tree topology, determining the link service topology to be stress tested; the link service topology is a subset of the tree topology; the entry service node is the service node at the top of the link service topology; Based on the link service topology, the service unit to be stress tested is determined.

3. The method according to claim 2, characterized in that The step of determining the link service topology structure to be subjected to stress testing in response to the selection operation of the entry service node in the tree topology structure comprises: In response to a query operation of a service unit name and / or a business service interface corresponding to the entry service node, determining the entry service node in the tree topology structure; After determining the entry service node, based on the call relationship between the service units, a downstream service node having a link relationship with the entry service node is obtained; the downstream service node is a service node belonging to a leaf node in the link service topology structure; the link relationship includes a direct call relationship or an indirect call relationship with the entry service node; Based on the ingress service node and the downstream service node, the link service topology to be stress tested is determined.

4. The method according to claim 2, characterized in that: The method further comprises: In response to an operation of adding or deleting the service node in the link service topology structure, the service unit to be stress tested is determined.

5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: Performing a mock configuration on the service unit to obtain a simulated service unit; The simulation service unit is a virtual service unit; when the simulation service unit is called, it returns a virtual return value in the simulation service unit.

6. The method according to claim 5, characterized in that The performing Mock configuration on the service unit to obtain a simulated service unit includes: In the case where the service unit is a business service interface, the business service interface is Mock configured to obtain a simulated business service interface; The simulated business service interface is a virtual business service interface; when the business service interface is called, it returns the data configured in the simulated business service interface.

7. The method according to claim 5, characterized in that The performing Mock configuration on the service unit to obtain a simulated service unit includes: When the service unit is a database, the database is configured with Mock to obtain a shadow database; The shadow database is a virtual database; when the storage resources in the database are called, the configured storage resources in the shadow database are returned.

8. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: Setting a service level agreement SLA indicator on the service unit; the SLA indicator corresponds to the service unit one by one; the SLA indicator is used to measure the stability of the service unit; When the service unit is subjected to stress testing, the stress testing is interrupted based on the SLA indicator.

9. The method according to claim 8, characterized in that When performing stress testing on the service unit, interrupting the stress testing based on the SLA indicator includes: When performing a stress test on the service unit, obtaining a monitoring indicator of the service unit; the monitoring indicator refers to real-time measurement data of the service unit when performing a stress test; Based on the monitoring indicator and the SLA indicator, the stress test is interrupted.

10. The method according to claim 8, characterized in that The interrupting the stress test based on the monitoring indicator and the SLA indicator includes: When the monitoring indicator does not meet the SLA indicator and reaches the tolerance corresponding to the SLA indicator, interrupting the stress test; The tolerance refers to the number of times or time during which the monitoring indicator fails to meet the SLA indicator.

11. A full-link stress testing device, characterized in that: The device comprises: An acquisition module, used to acquire the calling relationship between each service unit in the business service; the calling relationship refers to a single calling relationship between any two service units in the business service; A generating module, configured to generate a tree topology structure based on the calling relationship; the tree topology structure comprises at least two service nodes, and a service node in the at least two service nodes corresponds to the service unit in a one-to-one manner; The editing module is used to determine the service unit to be stress-tested in response to the editing operation of the tree topology structure.

12. A computer device, characterized in that: The computer device includes: a processor and a memory, wherein at least one computer program is stored in the memory, and at least one computer program is loaded and executed by the processor to implement the full-link stress testing method as described in any one of claims 1 to 9.

13. A computer storage medium, characterized in that: At least one computer program is stored in the computer-readable storage medium, and the at least one computer program is loaded and executed by the processor to implement the full-link stress testing method as described in any one of claims 1 to 9.

14. A computer program product, characterized in that The computer program product includes a computer program, which is stored in a computer-readable storage medium; the computer program is read and executed from the computer-readable storage medium by a processor of a computer device, so that the computer device executes the full-link stress testing method as described in any one of claims 1 to 9.

Citation Information

Cited By

  • Full-link pressure testing method and system based on artificial intelligence

    CN120295928A

  • A full-link stress testing method and system based on artificial intelligence

    CN120295928B