Execution Method, Device and Electronic Equipment for Stress Testing Task
By registering multiple pressure testing engine nodes that support different programming languages in the registration center and using the container environment to perform pressure testing tasks, the compatibility problem of pressure testing platform is solved, and the reuse and dynamic expansion of resources are realized.
Patent Information
- Application Number
- CN202210273025.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-18
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2042-03-18
AI Technical Summary
The existing stress testing platform is difficult to compatible with game scenarios in different programming languages, resulting in waste of resources and repeated construction of execution platforms.
By registering multiple pressure testing engine nodes that support different programming languages in the registration center, and matching the corresponding pressure testing engine nodes according to the programming language identification of the task, the pressure testing task is performed using the container environment to achieve isolation and compatibility of different programming languages.
It realizes that stress testing tasks in different programming languages do not affect each other during the execution process. There are existing engine nodes that can be reused, support dynamic expansion and customization, and avoid resource waste.
Smart Images

Figure CN114625652B_ABST
Abstract
Description
Technical Field
[0001] This document relates to the field of computer software technology, and particularly relates to a method, device, and electronic device for executing stress testing tasks. Background Art
[0002] Stress testing, abbreviated as pressure testing, is a testing method for establishing system stability, usually carried out outside the normal operating range of the system to examine its functional limits and potential hidden dangers. Currently, the common robots used to execute stress testing tasks are written in the Go language. However, the robots for game projects to execute stress testing tasks need to be associated with the development language of the game project, such as other categories of languages other than the Go language like C#, Java, Lua, etc. This leads to the need to transform the existing robots with Go plugins based on the requirements of different game scenarios during the development of each game project and build an execution platform for stress testing tasks that meets its own needs.
[0003] Therefore, how to be compatible with stress testing tasks in game scenarios of different programming languages and avoid the problem of waste of resources in repeatedly building an execution platform for stress testing tasks still requires further solutions to be provided. Summary of the Invention
[0004] The purpose of the embodiments of this specification is to provide a method, device, and electronic device for executing stress testing tasks to be compatible with stress testing tasks in game scenarios of different programming languages and avoid the problem of waste of resources in repeatedly building an execution platform for stress testing tasks.
[0005] To solve the above technical problems, the embodiments of this specification are implemented as follows:
[0006] In a first aspect, a method for executing a stress testing task is proposed, including:
[0007] Obtain the configuration information of a target stress testing task to be executed, where the configuration information of the target stress testing task includes the target programming language identifier of the target stress testing task;
[0008] Based on the target programming language identifier, determine a target stress testing engine node that matches the target stress testing task from multiple registered stress testing engine nodes in the registry; the multiple stress testing engine nodes support at least two programming languages;
[0009] Send the target stress testing task to the target stress testing engine node so that the target stress testing engine node executes the target stress testing task through the running container of the stress testing engine corresponding to the target programming language identifier.
[0010] In a second aspect, a tenant isolation device is proposed, including:
[0011] An acquisition unit acquires configuration information of a target stress test task to be executed, and the configuration information of the target stress test task includes a programming language identifier of the target stress test task;
[0012] A configuration unit determines a target stress test engine node that matches the target stress test task from multiple stress test engine nodes registered in a registration center based on the target programming language identifier; the multiple stress test engine nodes support at least two programming languages;
[0013] A distribution unit sends the target stress test task to the target stress test engine node, so that the target stress test engine node executes the target stress test task through a running container of a stress test engine corresponding to the target programming language identifier.
[0014] In a third aspect, an electronic device is provided, including:
[0015] A processor; and
[0016] A memory arranged to store computer-executable instructions, and when the executable instructions are executed, the processor performs the following operations:
[0017] Acquire configuration information of a target stress test task to be executed, where the configuration information of the target stress test task includes a target programming language identifier of the target stress test task;
[0018] Based on the target programming language identifier, determine a target stress test engine node that matches the target stress test task from multiple stress test engine nodes registered in a registration center; the multiple stress test engine nodes support at least two programming languages;
[0019] Send the target stress test task to the target stress test engine node, so that the target stress test engine node executes the target stress test task through a running container of a stress test engine corresponding to the target programming language identifier.
[0020] In a fourth aspect, a computer-readable storage medium is provided, and the computer-readable storage medium stores one or more programs. When the one or more programs are executed by an electronic device including multiple application programs, the electronic device performs the following operations:
[0021] Acquire configuration information of a target stress test task to be executed, where the configuration information of the target stress test task includes a target programming language identifier of the target stress test task;
[0022] Based on the target programming language identifier, determine a target stress test engine node that matches the target stress test task from multiple stress test engine nodes registered in a registration center; the multiple stress test engine nodes support at least two programming languages;
[0023] Send the target stress testing task to the target stress testing engine node, so that the target stress testing engine node identifies the running container of the stress testing engine corresponding to the target programming language and executes the target stress testing task.
[0024] As can be seen from the technical solutions provided in the embodiments of this specification above, the solutions in the embodiments of this specification at least have the following technical effects:
[0025] One or more embodiments provided in this specification can build a stress testing engine node and its running environment for a programming language in the form of a container, so that each container can provide stress testing services for game scenarios of the programming language it supports, and register stress testing engine nodes that support various programming languages in the registration center of the stress testing engine nodes. When a stress testing task to be executed is to be executed, the stress testing engine node that matches its stress testing task can be configured from the registration center according to the programming language identifier of the stress testing task in the configuration information of the stress testing task, and the stress testing task to be executed is sent to the matching stress testing engine node, so that the stress testing engine node executes the corresponding stress testing task through the running container of the stress testing engine corresponding to the programming language identifier. It realizes the isolation between the running environments of stress testing engine nodes that support different programming languages, can compatibly process stress testing tasks of different programming languages, and different stress testing tasks can be executed without affecting each other during the execution process. Existing stress testing engine nodes can be reused, and at the same time, new stress testing engine nodes can be dynamically customized and added according to the requirements of new game scenarios, and the scalability is relatively good. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments recorded in this specification. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0027] Figure 1 It is a schematic flowchart of the implementation process of a method for executing a stress testing task provided by an embodiment of this specification.
[0028] Figure 2 It is a schematic diagram of the configuration information of a stress testing scenario in a method for executing a stress testing task provided by an embodiment of this specification.
[0029] Figure 3 It is a schematic diagram of the configuration information of a stress testing task in a method for executing a stress testing task provided by an embodiment of this specification.
[0030] Figure 4It is an overall schematic diagram of a service architecture to which the method for executing a stress testing task provided by an embodiment of this specification is applied.
[0031] Figure 5 It is an overall timing schematic diagram of a stress testing engine node, a stress testing engine node registration center, and a scheduler in the method for executing a stress testing task provided by an embodiment of this specification.
[0032] Figure 6 It is a schematic flowchart of the method for executing a stress testing task provided by an embodiment of this specification applied in an actual scenario.
[0033] Figure 7 It is a schematic structural diagram of an apparatus for executing a stress testing task provided by an embodiment of this specification.
[0034] Figure 8 It is a schematic structural diagram of an electronic device provided by an embodiment of this specification. Detailed implementation manners
[0035] In order to make the purpose, technical solutions, and advantages of this document more obvious, the exemplary embodiments according to this document will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this document, rather than all the embodiments of this document. It should be understood that this document is not limited by the exemplary embodiments described here.
[0036] The embodiments of this document will be described in more detail below with reference to the accompanying drawings. Although some embodiments of this document are shown in the drawings, it should be understood that this document can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. On the contrary, these embodiments are provided to more thoroughly and completely understand this document. It should be understood that the drawings and embodiments of this document are only for exemplary purposes and are not used to limit the protection scope of this document.
[0037] It should be understood that the various steps described in the method embodiments of this document can be executed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of this document is not limited in this regard.
[0038] The term "including" and its variations used in this document are open-ended, that is, "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0039] It should be noted that concepts such as "first" and "second" mentioned in this document are only used to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependent relationships.
[0040] It should be noted that the modification of "one" and "multiple" mentioned in this document is illustrative rather than restrictive. Those skilled in the art should understand that unless clearly specified otherwise in the context, it should be understood as "one or more".
[0041] The names of the messages or information exchanged between multiple devices in the embodiments of this document are only for illustrative purposes, and are not used to limit the scope of these messages or information.
[0042] As described in the background art, before a network game is launched, the game R & D team or operator often has to conduct game stress tests on it. The purpose is to understand the bearing capacity of the game server in order to better carry out operation or R & D. The stress test of the game scenario mainly detects the bearing capacity of the game server, including the bearing capacity of users (such as how many users can play simultaneously without affecting the game quality), traffic bearing and other aspects.
[0043] Currently, the scheduling and execution of stress test tasks for game scenarios mainly consider the following aspects of problems:
[0044] (1) There are various stress test robot script technology stacks for game scenarios, such as C#, Java, Lua, etc. Existing stress test platforms for executing stress test tasks often cannot cover all types of technology stacks.
[0045] (2) Due to the diversity of programming languages in the stress test of game scenarios, its execution logic and environmental dependencies are often more complex compared to protocol stress tests such as HTTP / HTTPS, Thrift, Protobuf, etc. Such scenarios will also encounter many environmental problems when accessing the stress test platform. For example, existing robots need to be transformed with plugins, which leads to problems such as long access cycles and low efficiency.
[0046] (3) The stress test robots supporting new technology stacks in game scenarios have complex logics. Often, a large amount of code modification to the stress test robots in the existing stress test platform is required to support them, and it is difficult to achieve dynamic pluggability of stress test robots supporting new technology stacks. That is, different stress test tasks may require customized corresponding stress test robots to execute corresponding stress test tasks.
[0047] (4) Existing stress test platforms usually do not support the scheduling and execution of stress test tasks for multiple programming languages and multiple technology stacks.
[0048] In view of this, one or more embodiments of this specification provide a scheduling method for stress testing tasks, so as to be compatible with stress testing tasks in game scenarios of different programming languages and avoid the problem of waste of resources in the execution platform for repeatedly constructing and executing stress testing tasks. Specifically, a stress testing engine node of a programming language and its running environment are constructed in the form of a container, so that each container can provide stress testing services for game scenarios of the programming language it supports, and register stress testing engine nodes that support various programming languages in the registration center of the stress testing engine nodes. When a to-be-executed stress testing task is to be executed, the stress testing engine node matching the stress testing task can be configured from the registration center according to the programming language identifier of the stress testing task in the configuration information of the stress testing task, and the to-be-executed stress testing task is sent to the matching stress testing engine node, so that the stress testing engine node executes the corresponding stress testing task through the running container of the stress testing engine corresponding to the programming language identifier. The isolation between the running environments of stress testing engine nodes supporting different programming languages is achieved, and stress testing tasks of different programming languages can be compatibly processed, and different stress testing tasks can also be independent of each other during the execution process. The existing stress testing engine nodes can be reused, and at the same time, new stress testing engine nodes can be dynamically customized and added according to the requirements of new game scenarios, and the scalability is relatively good.
[0049] It should be understood that the execution subject of the stress testing task execution method provided in the embodiments of this specification may include, but is not limited to, at least one of a server, a computer, and other user terminals that can be configured to execute the method provided in the embodiments of this specification.
[0050] For ease of description, in the following, the server that can execute this method is taken as an example of the execution subject of this method to introduce the implementation manners of this method. It can be understood that taking the server as the execution subject of this method is only an exemplary illustration and should not be construed as a limitation on this method.
[0051] Figure 1 It is a schematic flowchart of the implementation process of a stress testing task execution method provided by an embodiment of this specification. Figure 1 The method may include:
[0052] S110, obtain the configuration information of the target stress testing task to be executed, where the configuration information of the target stress testing task includes the programming language identifier of the target stress testing task.
[0053] For example, for S110, the configuration information of the target stress test task includes, but is not limited to, information such as the programming language identifier, memory size, number of CPU cores, and stress test engine node data center identifier of the target stress test task. Among them, the programming language identifier is used to indicate the programming language required to execute the target stress test task, and specifically may include programming languages such as go, C#, Java, Lua, C++, and Python. The data center identifier can be used to indicate the data center from which the stress test engine nodes for executing the target stress test task come, and there may be multiple stress test engine nodes in this data center.
[0054] Figure 2 The figure shows a schematic diagram of the configuration information of the stress test scenario, and this stress test scenario can be configured using a WEB front end. In Figure 2 it, the configuration information of the stress test scenario may include the scenario name ( Figure 2 shown as test), the scenario description ( Figure 2 shown as test), the running environment ( Figure 2 shown as go / Java / python / c++), the data center ( Figure 2 shown as Lf), the project file upload location, the memory of the stress test engine node ( Figure 2 shown as 8G), the number of CPU cores of the stress test engine node ( Figure 2 shown as 4 cores), the programming language ( Figure 2 shown as the go language), the running instruction for starting the stress test engine node ( Figure 2 shown as. / robot–n 2000–s login), and the initialization instruction for initializing the stress test engine node ( Figure 2 shown as. / init), etc.
[0055] Figure 3 The figure shows Figure 2 a schematic diagram of the configuration information of the stress test task when creating a stress test task based on the Figure 3 shown stress test scenario, and this stress test task can be configured using a WEB front end. In Figure 3 it, only the task label ( Figure 3 shown as test), the stress test duration ( Figure 3 shown as 120 seconds), and the number of stress test engine nodes ( Figure 2 shown as 2) need to be filled in, and other information is filled in by default based on the
[0056] Optionally, in actual applications, there are often multiple stress test tasks. To maintain the execution order of the stress test tasks, the stress test tasks to be executed can be added to the pending execution queue of the stress test tasks in sequence according to the order of task distribution. Specifically, obtaining the configuration information of the target stress test task to be executed includes:
[0057] Obtain the configuration information of the target stress test task to be executed from the to-be-executed queue of the stress test task. The to-be-executed queue of this stress test task contains multiple stress test tasks to be executed, and these multiple stress test tasks to be executed are sent by the task controller to the to-be-executed queue of the stress test task.
[0058] S120, based on the target programming language identifier, determine the target stress test engine node that matches the target stress test task from multiple stress test engine nodes registered in the registration center of the stress test engine node.
[0059] Among them, the multiple stress test engine nodes support at least two programming languages.
[0060] A stress test engine node is a stress test engine that supports one programming language, and one stress test engine corresponds to one running container.
[0061] For example, for S120, a stress test engine node can correspond to one stress test engine or multiple stress test engines. When the stress test engine node corresponds to multiple stress test engines, these multiple stress test engines can support one programming language.
[0062] Optionally, the embodiments of this specification implement it by deploying stress test engine nodes in the form of docker containers. Specifically, a stress test engine node is a stress test engine that supports one programming language, and one stress test engine corresponds to one docker running container. The stress test engine node can support the operation of robots with various technology stacks by configuring the base image, such as programming languages like Java, go, python, C++, C#. In practical applications, these stress test engine nodes can run in the kubernetes cluster. The stress test engine nodes running in the kubernetes cluster can include stress test engine nodes that support some common programming languages. When a new programming language appears, stress test engine nodes that support this new programming language can be customized in the kubernetes cluster according to actual needs.
[0063] Among them, for the multiple stress test engine nodes registered in the registration center of the stress test engine node, whenever a new stress test engine node is deployed, it can be registered in this registration center. When registering, the registration center can obtain the node information of this new stress test engine node, such as information like memory size, number of CPU cores, computer room identifier, and programming language identifier.
[0064] Optionally, based on the target programming language identifier, determining the target stress test engine node that matches the target stress test task from multiple stress test engine nodes registered in the registration center of the stress test engine node includes:
[0065] Determine a candidate stress testing engine node that matches the target programming language identifier from multiple registered stress testing engine nodes in the registration center; among them, the candidate stress testing engine node is in an idle state;
[0066] Determine the target stress testing engine node from the candidate stress testing engine nodes based on the matching degree between the configuration information of the candidate stress testing engine nodes and the configuration information of the target stress testing task.
[0067] It should be understood that in order for the target stress testing task to be executed normally, the candidate stress testing engine node that matches it obtained from the registration center of the stress testing engine node should be in an idle state, that is, the candidate stress testing engine node is currently in a state where no stress testing task is being executed.
[0068] For example, the configuration information of the candidate stress testing engine node may also include the memory size, the number of CPU cores, the computer room identifier, and the supported programming language identifier. Then, the matching degree between the configuration information of the candidate stress testing engine node and the configuration information of the target stress testing task can be determined according to the matching degree between the memory size, the number of CPU cores, the computer room identifier of the candidate stress testing engine node and the memory size, the number of CPU cores, the computer room identifier of the target stress testing task.
[0069] Optionally, determine the target stress testing engine node from the candidate stress testing engine nodes based on the matching degree between the configuration information of the candidate stress testing engine nodes and the configuration information of the target stress testing task. Specifically, the stress testing engine node with the highest matching degree can be obtained from the candidate stress testing engine nodes as the target stress testing engine node.
[0070] Optionally, in order to balance the utilization rate of each stress testing engine node, when determining the target stress testing engine node from the candidate stress testing engine nodes, the frequency of the candidate stress testing engine node executing stress testing tasks in the historical time period can also be considered. Specifically, determining the target stress testing engine node from the candidate stress testing engine nodes based on the matching degree between the configuration information of the candidate stress testing engine nodes and the configuration information of the target stress testing task includes:
[0071] Determine the target stress testing engine node from the candidate stress testing engine nodes based on the matching degree between the configuration information of the candidate stress testing engine nodes and the configuration information of the target stress testing task, and the frequency of the candidate stress testing engine node executing stress testing tasks in the historical time period.
[0072] For example, on the basis that the matching degree between the configuration information of the candidate stress testing engine node and the configuration information of the target stress testing task meets the set threshold, the frequency of the candidate stress testing engine node executing stress testing tasks in the historical time period can be sorted in ascending order of frequency, and the candidate stress testing engine node with a smaller frequency of executing stress testing tasks in the historical time period is preferentially considered as the target stress testing engine node.
[0073] S130. Send the target stress test task to the target stress test engine node, so that the target stress test engine node identifies the running container of the stress test engine corresponding to the target programming language and executes the target stress test task.
[0074] Figure 4 The figure shows an overall schematic diagram of the service architecture to which the execution method of the stress test task is applied. The service architecture may include a registration center of stress test engine nodes, Computer Room 1, a scheduler, and game servers. Among them, Stress Test Engine Node 1, Stress Test Engine Node 2, and Stress Test Engine Node 3 are deployed in Computer Room 1. Stress Test Engine Node 1 corresponds to a C language running container, and this running container includes the corresponding stress test engine and Robots 1 to N for executing robot scripts; Stress Test Engine Node 2 corresponds to a Java running container, and this running container includes the corresponding stress test engine and Robots 1 to N for executing robot scripts; Stress Test Engine Node 3 corresponds to a new running container, and this running container includes the corresponding stress test engine and Robots 1 to N for executing robot scripts. This new running container is a stress test engine node customized based on a new programming language.
[0075] When a stress test requirement for a game scenario with a new programming language requirement appears, the execution process of the stress test task for this game scenario may include:
[0076] (1) Deploy a new running container
[0077] Specifically, a new running container can be customized based on this new programming language to obtain Figure 4 the shown Stress Test Engine Node 3.
[0078] (2) The stress test engine node registers node information
[0079] Stress Test Engine Node 3 registers its node information in the stress test engine node registration center, including node information such as the programming language identifier supported by Stress Test Engine Node 3, memory size, number of CPU cores, and computer room identifier.
[0080] (3) Submit a stress test task
[0081] Specifically, a developer can submit a stress test task for this game scenario to the scheduler.
[0082] (4) Pull the newly registered stress test engine node
[0083] The scheduler adds Stress Test Engine Node 3 to the stress test engine node list.
[0084] (5) Match nodes according to the configuration information of the stress test task and the configuration information of the stress test engine node
[0085] The scheduler determines that the stress testing engine node matching the stress testing task is stress testing engine node 3 based on the matching degree between the configuration information of the stress testing task and the configuration information of the stress testing engine nodes in the stress testing engine node list.
[0086] (6) Start the stress testing task
[0087] Call stress testing engine node 3 through the stress testing engine node scheduling algorithm, and send the stress testing task to stress testing engine node 3, so that stress testing engine node 3 executes the stress testing task through the running container of the stress testing engine corresponding to the programming language identifier of the stress testing task.
[0088] (7) Initiate stress testing traffic
[0089] Stress testing engine node 3 initiates stress testing traffic to the game stress testing server in the game scenario for stress testing.
[0090] Figure 5 Shows the overall timing schematic diagram of the stress testing engine node, the stress testing engine node registration center, and the scheduler in the stress testing task execution method provided by an embodiment of this specification. In Figure 5 When there is a stress testing requirement for a game scenario with new programming language requirements, the execution process of the stress testing task for this game scenario may include:
[0091] S51, The target stress testing engine node registers node information with the registration center.
[0092] Specifically, the target stress testing engine node registers and synchronizes with the registration center its node information such as the programming language identifier it supports, memory size, number of CPU cores, and computer room identifier. After completing this registration process, the target stress testing engine node and the registration center achieve heartbeat synchronization, that is, the state of the target stress testing engine node is synchronized to the registration center in real time. At the same time, the registration center deletes some offline stress testing engine nodes regularly.
[0093] S52, The scheduler receives the stress testing task.
[0094] S53, The scheduler matches the target stress testing engine node from multiple stress testing engine nodes registered in the registration center based on the configuration information of the stress testing task.
[0095] S54, The registration center returns a list of the matching target stress testing engine nodes to the scheduler.
[0096] S55, The scheduler sends an initialization instruction to the target stress testing engine node.
[0097] S56, The target stress testing engine node initializes based on the initialization instruction.
[0098] S57, The target stress testing engine node synchronizes its initialization status to the scheduler.
[0099] S58. When the scheduler finishes initializing all target stress test nodes, it sends a running instruction to each target stress test engine node.
[0100] S59. The target stress test engine node synchronizes its running status to the scheduler.
[0101] S510. When the end time of the stress test task arrives, the scheduler sends a task end instruction to the target stress test engine node.
[0102] S511. The target stress test engine node kills the process of the stress test task based on the task end instruction.
[0103] S512. The target stress test engine node synchronizes its task end status to the scheduler.
[0104] Optionally, in order to enable the target stress test task to be executed smoothly, the stress test engine node used to execute the target stress test task often needs to be initialized based on the execution environment requirements of the target stress test task. For example, it is necessary to download and install some script dependencies. Specifically, the target stress test task is sent to the target stress test engine node so that the target stress test engine node executes the target stress test task through the running container of the stress test engine identified by the programming language of the target stress test task, including:
[0105] Based on the execution environment requirements of the target stress test task, an initialization instruction is sent to the running container of the stress test engine corresponding to the target stress test engine node, so that the running container of the stress test engine corresponding to the target stress test engine node runs the initialization instruction to initialize the execution environment of the target stress test task;
[0106] After the running container of the stress test engine corresponding to the target stress test engine node initializes the execution environment of the target stress test task, the target stress test task is sent to the target stress test engine node so that the target stress test engine node executes the target stress test task through the running container of the stress test engine identified by the programming language of the target stress test task.
[0107] Optionally, the target stress test task carries the execution time of the target stress test task. After the running container of the stress test engine corresponding to the target stress test engine node initializes the execution environment of the target stress test task, the target stress test task is sent to the target stress test engine node so that the target stress test engine node executes the target stress test task through the running container of the stress test engine identified by the programming language of the target stress test task, including:
[0108] After the running container of the stress test engine corresponding to the target stress test engine node initializes the execution environment of the target stress test task, the target stress test task is added to the timer queue;
[0109] At the start of the execution time of the target stress test task, obtain the target stress test task from the timer queue and send the target stress test task to the target stress test engine node, so that the target stress test engine node executes the target stress test task through the running container of the stress test engine corresponding to the programming language identifier of the target stress test task.
[0110] Optionally, in practical applications, some stress test engine nodes may encounter initialization failures during the initialization process. In this case, to improve the execution success rate of the target stress test task, the target stress test task can be added to the fallback task queue, and after a preset time period, the target stress test task can be added to the pending execution queue of the stress test task again to restart the execution. Specifically, the method provided in the embodiments of this specification further includes:
[0111] When the execution environment initialization of the target stress test task fails in the running container of the stress test engine corresponding to the target stress test engine node, add the target stress test task to the fallback task queue;
[0112] After a preset time period, add the stress test tasks in the fallback task queue to the pending execution queue of the stress test tasks.
[0113] For example, the preset time period can be set to powers of 2 seconds, such as 1s, 2s, 4s, 8s, and the maximum value is set to 8s. That is, after the first initialization failure, the target stress test task in the fallback task queue is added to the pending execution queue of the stress test task to restart the execution after an interval of 1s; if it fails again, the target stress test task in the fallback task queue is added to the pending execution queue of the stress test task to restart the execution after an interval of 2s; if it fails again, the target stress test task in the fallback task queue is added to the pending execution queue of the stress test task to restart the execution after an interval of 4s; if it fails again, the target stress test task in the fallback task queue is added to the pending execution queue of the stress test task to restart the execution after an interval of 8s; if it fails again, task error reporting is performed.
[0114] Optionally, the configuration information in the target stress test task may further include the duration of the target stress test task, and the end time of the target stress test task can be determined based on the duration and the execution time of the target stress test task. Specifically, the target stress test task also carries the end time of the target stress test task. After the target stress test task is sent to the target stress test engine node so that the target stress test engine node executes the target stress test task through the running container of the stress test engine corresponding to the programming language identifier of the target stress test task, the method further includes:
[0115] When the end time of the target stress test task arrives, send an instruction to the target stress test engine node to stop executing the target stress test task, so that the target stress test engine node stops executing the target stress test task.
[0116] Figure 6 The flowchart shows the execution method of the stress testing task provided by an embodiment of this specification applied in an actual scenario, including:
[0117] S1. The task controller issues the stress testing task to the pending execution queue of the stress testing task.
[0118] S2. The pipeline will repeatedly retrieve the stress testing tasks that need to be scheduled from the pending execution queue of the stress testing task and put them into the scheduling pipeline for execution.
[0119] Among them, the scheduling pipeline mainly has the following several stages: the scheduling stage, the waiting stage, the running stage, and the ending stage.
[0120] (1) Scheduling stage: Based on the configuration information of the stress testing task, select the target stress testing engine node that matches the configuration information of the stress testing task from multiple stress testing engine nodes in the registration center of the stress testing engine nodes. Specifically, it can be divided into a filtering stage, a scoring stage, and a reservation stage.
[0121] (11) The filtering stage is used to filter out the candidate stress testing engine nodes that match the configuration information of the stress testing task from multiple stress testing engine nodes in the registration center based on the configuration information of the stress testing task;
[0122] (12) The scoring stage is used to score and sort the filtered candidate stress testing engine nodes based on the matching degree between the configuration information of the stress testing task and the configuration information of the candidate stress testing engine nodes, as well as the frequency of the candidate stress testing engine nodes executing stress testing tasks in the historical time period;
[0123] (13) The reservation stage is used to set the status of the optimal stress testing engine node after sorting, that is, the target stress testing engine node, to busy to prevent it from being occupied by the next stress testing task waiting for scheduling.
[0124] (2) Waiting stage: This stage is used to complete the initialization of the target stress testing engine node for executing the stress testing task. Specifically, it can be divided into an initialization task stage and an initialization status check stage.
[0125] (21) Initialization task stage: The scheduler issues the initialization instruction of the stress testing task by calling the interface of the target stress testing engine node, so that the target stress testing engine node completes the download of the robot script and executes the initialization instruction.
[0126] (22) Initialization status check stage: After issuing the initialization instruction to the target stress testing engine node, the interface of the target stress testing engine node can be called to poll whether the task status of the target stress testing engine node is ready. After the task status of all target stress testing engine nodes is ready, the task enters the running stage.
[0127] (3) Running phase: This phase can be divided into starting tasks, status checking, and adding to the timer queue. The scheduler sends a stress test task start instruction to the target stress test engine nodes. Each target stress test engine node simulates real traffic to enter the running state based on this stress test task start instruction. After all target stress test engine nodes have started successfully, the stress test task is added to the timer queue.
[0128] During this process, if a certain target stress test engine node fails to start, the previously started successfully target stress test engine nodes are stopped, and the stress test task is inserted into the fallback task queue for later retry operations.
[0129] (4) Stopping phase: The timer queue hands over the stress test tasks with the end of the running time to this phase for processing. The stopping phase can call the stop interface of the stress test engine node to send a stop instruction to it. After receiving the stop command, the stress test engine node will kill the processes on the node and return a success status.
[0130] It should be noted that the tasks in the scheduling phase of the scheduling pipeline are scheduled one by one serially, while in the waiting phase, running phase, and stopping phase, they can be executed asynchronously in parallel.
[0131] In the embodiment of this specification, when the scheduler starts, all stress test tasks waiting to be scheduled can be inserted into the to-be-executed queue of stress test tasks. The to-be-executed queue of stress test tasks is sorted according to the execution time configured for the stress test tasks. The scheduling pipeline can obtain a stress test task from the to-be-executed queue of stress test tasks for the scheduling process. When the scheduling fails, the failed stress test task can be added to the fallback task queue. When the scheduling is successful, the successful stress test task is inserted into the timer queue.
[0132] Among them, the fallback task queue can re-add the failed scheduling tasks to the to-be-executed queue of stress test tasks for re-scheduling after a preset time period. This preset time period can be set as a power of 2. Assuming the first retry is 1s, the second is 2s, the third is 4s, and the fourth is 8s. The timer queue is a timer queue. After the stress test tasks issued in the waiting phase are successful, the successful stress test tasks can be put into this queue. This queue is sorted according to the end time of the stress test tasks. When the end time of the stress test task arrives, the scheduler can be triggered to enter the stopping phase.
[0133] Optionally, as the number of registered stress test engine nodes in the registration center increases, some registered stress test engine nodes may not be used for a long time. In this case, to avoid wasting resources in the registration center, some stress test engine nodes that have not been used for a long time can be deleted regularly. Specifically, the method provided in the embodiment of this specification further includes:
[0134] Among multiple stress testing engine nodes registered in the registration center, obtain the stress testing engine nodes whose heartbeat update interval is greater than a preset threshold;
[0135] Delete the stress testing engine nodes whose heartbeat update interval is greater than the preset threshold from the registration center of the stress testing engine nodes.
[0136] After each stress testing engine node completes the registration process with the registration center, each stress testing engine node and the registration center will achieve heartbeat synchronization, that is, the states of each stress testing engine node will be synchronized to the registration center in real time. In this way, the registration center can regularly delete some offline (i.e., the heartbeat has not been updated for a long time) stress testing engine nodes according to the heartbeat update time of each stress testing engine node.
[0137] One or more embodiments provided in this specification can build a stress testing engine node and its operating environment of a programming language in the form of a container, so that each container can provide stress testing services for game scenarios of the programming language it supports, and register stress testing engine nodes supporting various programming languages in the registration center of the stress testing engine nodes. When a stress testing task to be executed is to be executed, the stress testing engine node matching the stress testing task can be configured from the registration center according to the programming language identifier of the stress testing task in the configuration information of the stress testing task, and the stress testing task to be executed can be sent to the matching stress testing engine node, so that the stress testing engine node executes the corresponding stress testing task through the operating container of the stress testing engine corresponding to the programming language identifier. It realizes the isolation between the operating environments of stress testing engine nodes supporting different programming languages, can compatibly process stress testing tasks of different programming languages, and different stress testing tasks can be executed without affecting each other during the execution process. The existing stress testing engine nodes can be reused, and at the same time, new stress testing engine nodes can be dynamically customized and added according to the requirements of new game scenarios, and the scalability is relatively good.
[0138] Figure 7 It is a schematic structural diagram of an execution device 700 for a stress testing task provided by an embodiment of this specification. Please refer to Figure 7 , in a software implementation manner, the execution device 700 for a stress testing task may include:
[0139] An obtaining unit 701, which obtains the configuration information of a target stress testing task to be executed, and the configuration information of the target stress testing task includes the programming language identifier of the target stress testing task;
[0140] A configuration unit 702, which determines a target stress testing engine node matching the target stress testing task from multiple stress testing engine nodes registered in the registration center based on the target programming language identifier; the multiple stress testing engine nodes support at least two programming languages;
[0141] The sending unit 703 sends the target stress testing task to the target stress testing engine node, so that the target stress testing engine node runs the container corresponding to the stress testing engine through the target programming language identifier and executes the target stress testing task.
[0142] Since the execution device of the stress testing task provided in the embodiments of this specification can provide a stress testing engine node of a programming language and its operating environment in the form of a container, each container can provide stress testing services for game scenarios of the programming language it supports, and register stress testing engine nodes that support various programming languages in the registration center of the stress testing engine nodes. When a stress testing task to be executed is to be executed, according to the programming language identifier of the stress testing task in the configuration information of the stress testing task, a stress testing engine node that matches the stress testing task can be configured from the registration center, and the stress testing task to be executed is sent to the matching stress testing engine node, so that the stress testing engine node executes the corresponding stress testing task through the running container of the stress testing engine corresponding to the programming language identifier. It realizes the isolation between the operating environments of stress testing engine nodes that support different programming languages, can compatibly process stress testing tasks of different programming languages, and different stress testing tasks can be executed without affecting each other during the execution process. Existing stress testing engine nodes can be reused, and at the same time, new stress testing engine nodes can be dynamically customized and added according to the requirements of new game scenarios, and the scalability is relatively good.
[0143] Optionally, in one implementation manner, the configuration unit 702 is used for:
[0144] Based on the target programming language identifier, determine a candidate stress testing engine node that matches the target programming language identifier from multiple stress testing engine nodes registered in the registration center;
[0145] Based on the matching degree between the configuration information of the candidate stress testing engine node and the configuration information of the target stress testing task, determine the target stress testing engine node from the candidate stress testing engine nodes.
[0146] Optionally, in one implementation manner, the configuration unit 702 is used for:
[0147] Based on the matching degree between the configuration information of the candidate stress testing engine node and the configuration information of the target stress testing task, and the frequency of the candidate stress testing engine node executing stress testing tasks in the historical time period, determine the target stress testing engine node from the candidate stress testing engine nodes.
[0148] Optionally, in one implementation manner, the obtaining unit 701 is used for:
[0149] Obtain the configuration information of the target stress test task to be executed from the to-be-executed queue of the stress test task. The to-be-executed queue of the stress test task contains multiple to-be-executed stress test tasks, and the multiple to-be-executed stress test tasks are sent by the task controller to the to-be-executed queue of the stress test task.
[0150] Optionally, in one implementation, the sending unit 703 is configured to:
[0151] Based on the execution environment requirements of the target stress test task, send an initialization instruction to the running container of the stress test engine corresponding to the target stress test engine node, so that the running container of the stress test engine corresponding to the target stress test engine node runs the initialization instruction to initialize the execution environment of the target stress test task;
[0152] After the running container of the stress test engine corresponding to the target stress test engine node initializes the execution environment of the target stress test task, send the target stress test task to the target stress test engine node, so that the target stress test engine node executes the target stress test task through the running container of the stress test engine corresponding to the programming language identifier of the target stress test task.
[0153] Optionally, in one implementation, the target stress test task carries the execution time of the target stress test task, and the sending unit 703 is configured to:
[0154] After the running container of the stress test engine corresponding to the target stress test engine node initializes the execution environment of the target stress test task, add the target stress test task to the timer queue;
[0155] At the start of the execution time of the target stress test task, obtain the target stress test task from the timer queue, and send the target stress test task to the target stress test engine node, so that the target stress test engine node executes the target stress test task through the running container of the stress test engine corresponding to the programming language identifier of the target stress test task.
[0156] Optionally, in one implementation, the device further includes:
[0157] The first adding unit, when the initialization of the execution environment of the target stress test task by the running container of the stress test engine corresponding to the target stress test engine node fails, adds the target stress test task to the fallback task queue;
[0158] The second adding unit, after a preset time period, adds the stress test tasks in the fallback task queue to the to-be-executed queue of the stress test task.
[0159] Optionally, in one embodiment, the target stress test task also carries the end time of the target stress test task. After the sending unit 703 sends the target stress test task to the target stress test engine node so that the target stress test engine node executes the target stress test task through the running container of the stress test engine corresponding to the programming language identifier of the target stress test task, the apparatus further includes:
[0160] A stop unit, when the end time of the target stress test task arrives, sends an instruction to the target stress test engine node to stop executing the target stress test task, so that the target stress test engine node stops executing the target stress test task.
[0161] Optionally, in one embodiment, the apparatus further includes:
[0162] A heartbeat acquisition unit, which acquires a stress test engine node whose heartbeat update time interval is greater than a preset threshold from among a plurality of stress test engine nodes registered in the registration center;
[0163] A node deletion unit, deletes the stress test engine node whose heartbeat update time interval is greater than the preset threshold from the registration center of the stress test engine nodes.
[0164] The execution apparatus 700 of the stress test task can implement Figures 1 to 6 the method in the method embodiment, and specifically, reference can be made to Figures 1 to 6 the stress test task execution method shown in the embodiment, which will not be elaborated here.
[0165] Figure 8 is a schematic structural diagram of an electronic device according to an embodiment of this specification. Please refer to Figure 8 , at the hardware level, this electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. Among them, the memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory, etc. Of course, this electronic device may also include other hardware required for other services.
[0166] The processor, network interface, and memory can be interconnected via an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, Figure 8 only a bidirectional arrow is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0167] Memory, which is used to store programs. Specifically, the program can include program code, and the program code includes computer operation instructions. The memory can include a memory and a non-volatile memory, and provide instructions and data to the processor.
[0168] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming an execution device for the stress testing task at the logical level. The processor executes the program stored in the memory and is specifically used to perform the following operations:
[0169] Obtain the configuration information of the target stress testing task to be executed, and the configuration information of the target stress testing task contains the programming language identifier of the target stress testing task;
[0170] Based on the target programming language identifier, determine the target stress testing engine node that matches the target stress testing task from multiple stress testing engine nodes registered in the registration center; the multiple stress testing engine nodes support at least two programming languages;
[0171] Send the target stress testing task to the target stress testing engine node, so that the target stress testing engine node executes the target stress testing task through the running container of the stress testing engine corresponding to the target programming language identifier.
[0172] The electronic device provided in the embodiments of this specification can build a stress testing engine node and its operating environment for a programming language in the form of a container, enabling each container to provide stress testing services for game scenarios of the programming language it supports, and registering stress testing engine nodes that support various programming languages in the registration center of the stress testing engine nodes. When a stress testing task to be executed is to be performed, according to the programming language identifier of the stress testing task in the configuration information of the stress testing task, a stress testing engine node that matches the stress testing task can be configured from the registration center, and the stress testing task to be executed can be sent to the matching stress testing engine node, so that the stress testing engine node executes the corresponding stress testing task through the operating container of the stress testing engine corresponding to the programming language identifier. It realizes the isolation between the operating environments of stress testing engine nodes that support different programming languages, can compatibly process stress testing tasks in different programming languages, and different stress testing tasks can be executed without affecting each other during the execution process. Existing stress testing engine nodes can be reused, and at the same time, new stress testing engine nodes can be dynamically customized and added according to the requirements of new game scenarios, with good scalability.
[0173] As described above in this specification Figures 1 to 6 The method executed by the execution device of the stress testing task disclosed in the embodiments as shown in this specification can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, the steps of the above method can be completed by the integrated logic circuit in the hardware of the processor or instructions in software form. The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of this specification. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of this specification can be directly embodied as being executed and completed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. This storage medium is located in the memory, and the processor reads the information in the memory and combines its hardware to complete the steps of the above method.
[0174] The electronic device can also execute Figures 1 to 6 the method, and implement the function of the execution device for the stress testing task in Figures 1 to 6 the embodiment shown, which will not be elaborated herein in the embodiments of this specification.
[0175] The embodiments of this specification also propose a computer-readable storage medium. The computer-readable storage medium stores one or more programs. The one or more programs include instructions. When the instructions are executed by a portable electronic device including a plurality of application programs, the portable electronic device can be enabled to execute Figures 1 to 6 the method of the embodiment shown, and specifically used to perform the following operations:
[0176] Obtain the configuration information of the target stress testing task to be executed. The configuration information of the target stress testing task includes the programming language identifier of the target stress testing task;
[0177] Based on the target programming language identifier, determine a target stress testing engine node that matches the target stress testing task from a plurality of stress testing engine nodes registered in the registry; the plurality of stress testing engine nodes support at least two programming languages;
[0178] Send the target stress testing task to the target stress testing engine node, so that the target stress testing engine node executes the target stress testing task through the running container of the stress testing engine corresponding to the target programming language identifier.
[0179] For the computer-readable storage medium provided by the embodiments of this specification, since a stress testing engine node for a programming language and its running environment can be constructed in the form of a container, each container can provide stress testing services for the game scenarios of the programming language it supports, and register the stress testing engine nodes supporting various programming languages in the registry of the stress testing engine nodes. When a stress testing task to be executed is to be executed, according to the programming language identifier of the stress testing task in the configuration information of the stress testing task, a stress testing engine node that matches its stress testing task can be configured from the registry, and the stress testing task to be executed can be sent to the matching stress testing engine node, so that the stress testing engine node executes the corresponding stress testing task through the running container of the stress testing engine corresponding to the programming language identifier. It realizes the isolation between the running environments of stress testing engine nodes supporting different programming languages, can compatibly process stress testing tasks in different programming languages, and different stress testing tasks can be executed without affecting each other during the execution process. The existing stress testing engine nodes can be reused, and at the same time, new stress testing engine nodes can be dynamically customized and added according to the requirements of new game scenarios, and the scalability is relatively good.
[0180] Of course, in addition to the software implementation, the electronic devices described in this specification do not exclude other implementation methods, such as logical devices or a combination of software and hardware, etc. That is to say, the execution subject of the following processing flow is not limited to each logical unit, and can also be hardware or logical devices.
[0181] The specific embodiments of this specification have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve the desired results. Additionally, the processes depicted in the figures do not necessarily require the particular order or sequential order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0182] In summary, the above are only the preferred embodiments of this specification and are not intended to limit the protection scope of this specification. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of this specification shall be included within the protection scope of this specification.
[0183] The systems, devices, modules or units illustrated in the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or any combination of these devices.
[0184] Computer-readable media includes both permanent and non-permanent, removable and non-removable media and can be implemented by any method or technology for information storage. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic disk storage or other magnetic storage devices, or any other non-transitory medium that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media such as modulated data signals and carrier waves.
[0185] It should also be noted that the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or elements inherent to such process, method, commodity or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, commodity or device comprising said element.
[0186] Each embodiment in this specification is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for the relevant parts, reference can be made to the partial description of the method embodiment.
Claims
1. A method for executing a stress testing task, comprising: Obtaining configuration information of a target stress testing task to be executed, where the configuration information of the target stress testing task includes an identifier of the target programming language of the target stress testing task; Determining a target stress testing engine node that matches the target stress testing task from multiple registered stress testing engine nodes in a registration center based on the identifier of the target programming language; the multiple stress testing engine nodes support at least two programming languages; the target stress testing engine node includes a stress testing engine node that matches the identifier of the target programming language, is in an idle state, and has configuration information that matches the configuration information of the target stress testing task; Sending the target stress testing task to the target stress testing engine node so that the target stress testing engine node executes the target stress testing task through a running container of a stress testing engine corresponding to the identifier of the target programming language.
2. The method according to claim 1, wherein determining a target stress testing engine node that matches the target stress testing task from multiple registered stress testing engine nodes in a registration center based on the identifier of the target programming language includes: Determining candidate stress testing engine nodes that match the identifier of the target programming language from multiple registered stress testing engine nodes in the registration center; wherein the candidate stress testing engine nodes are in an idle state; Determining the target stress testing engine node from the candidate stress testing engine nodes based on the matching degree between the configuration information of the candidate stress testing engine nodes and the configuration information of the target stress testing task.
3. The method according to claim 2, wherein determining the target stress testing engine node from the candidate stress testing engine nodes based on the matching degree between the configuration information of the candidate stress testing engine nodes and the configuration information of the target stress testing task includes: Determining the target stress testing engine node from the candidate stress testing engine nodes based on the matching degree between the configuration information of the candidate stress testing engine nodes and the configuration information of the target stress testing task, and the frequency of the candidate stress testing engine nodes executing stress testing tasks in a historical time period.
4. The method according to claim 1, wherein obtaining configuration information of a target stress testing task to be executed includes: Obtaining configuration information of a target stress testing task to be executed from a to-be-executed queue of stress testing tasks, where the to-be-executed queue of stress testing tasks includes multiple to-be-executed stress testing tasks, and the multiple to-be-executed stress testing tasks are sent by a task controller to the to-be-executed queue of stress testing tasks.
5. The method according to claim 4, wherein sending the target stress testing task to the target stress testing engine node includes: Sending an initialization instruction to a running container of a stress testing engine corresponding to the target stress testing engine node based on the execution environment requirements of the target stress testing task, so that the running container of the stress testing engine corresponding to the target stress testing engine node runs the initialization instruction to initialize the execution environment of the target stress testing task; After the running container of the stress testing engine corresponding to the target stress testing engine node initializes the execution environment of the target stress testing task, sending the target stress testing task to the target stress testing engine node.
6. The method according to claim 5, wherein the target stress test task carries the execution time of the target stress test task. After initializing the execution environment of the target stress test task in the running container of the stress test engine corresponding to the target stress test engine node, sending the target stress test task to the target stress test engine node includes: After initializing the execution environment of the target stress test task in the running container of the stress test engine corresponding to the target stress test engine node, adding the target stress test task to a timer queue; At the start of the execution time of the target stress test task, obtaining the target stress test task from the timer queue and sending the target stress test task to the target stress test engine node.
7. The method according to claim 5, the method further includes: When the initialization of the execution environment of the target stress test task in the running container of the stress test engine corresponding to the target stress test engine node fails, adding the target stress test task to a fallback task queue; After a preset time period, adding the stress test tasks in the fallback task queue to the pending execution queue of the stress test tasks.
8. The method according to claim 1, the method further includes: Obtaining stress test engine nodes with a heartbeat update time interval greater than a preset threshold from among the multiple stress test engine nodes registered in the registration center; Deleting the stress test engine nodes with a heartbeat update time interval greater than the preset threshold from the registration center of the stress test engine nodes.
9. An execution device for stress test tasks, comprising: An acquisition unit that acquires the configuration information of a target stress test task to be executed, where the configuration information of the target stress test task includes the programming language identifier of the target stress test task; A configuration unit that determines a target stress test engine node matching the target stress test task from among the multiple stress test engine nodes registered in the registration center based on the target programming language identifier; the multiple stress test engine nodes support at least two programming languages; the target stress test engine node includes a stress test engine node that matches the target programming language identifier, is in an idle state, and has configuration information matching the configuration information of the target stress test task; A sending unit that sends the target stress test task to the target stress test engine node so that the target stress test engine node executes the target stress test task through the running container of the stress test engine corresponding to the target programming language identifier.
10. An electronic device, comprising: A processor; And A memory arranged to store computer-executable instructions that, when executed, cause the processor to perform the following operations: Acquire the configuration information of a target stress test task to be executed, where the configuration information of the target stress test task includes the target programming language identifier of the target stress test task; Determine a target stress testing engine node that matches the target stress testing task from multiple registered stress testing engine nodes in the registration center based on the target programming language identifier; the multiple stress testing engine nodes support at least two programming languages; the target stress testing engine node includes a stress testing engine node that matches the target programming language identifier, is in an idle state, and has configuration information that matches the configuration information of the target stress testing task; Send the target stress testing task to the target stress testing engine node so that the target stress testing engine node executes the target stress testing task through the running container of the stress testing engine corresponding to the target programming language identifier.
11. A computer-readable storage medium storing one or more programs, which when executed by an electronic device including a plurality of application programs, cause the electronic device to perform the following operations: Obtain the configuration information of a target stress testing task to be executed, where the configuration information of the target stress testing task contains the target programming language identifier of the target stress testing task; Determine a target stress testing engine node that matches the target stress testing task from multiple registered stress testing engine nodes in the registration center based on the target programming language identifier; the multiple stress testing engine nodes support at least two programming languages; the target stress testing engine node includes a stress testing engine node that matches the target programming language identifier, is in an idle state, and has configuration information that matches the configuration information of the target stress testing task; Send the target stress testing task to the target stress testing engine node so that the target stress testing engine node executes the target stress testing task through the running container of the stress testing engine corresponding to the target programming language identifier.
Citation Information
Patent Citations
Containerized pressure measurement scheduling method, computer equipment and readable storage medium
CN111752822A
Cross-language task scheduling method and device, equipment and readable storage medium
CN112199184A
Data task processing method and device and electronic equipment
CN112988350A