File parameter transfer method and system during stress testing

By proposing a file parameter transfer method in distributed pressure measurement, the problem of high disk IO pressure in file parameter transfer mode in high concurrency scenarios is solved, and the duplicate and non-heavy modes are supported, and the disk IO performance and parameter transfer mode of distributed pressure measurement are optimized.

CN114625709BActive Publication Date: 2025-05-09SHANGHAI HODE INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210261542.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-16
Publication Date
2025-05-09
Estimated Expiration
2042-03-16

AI Technical Summary

Technical Problem

During the distributed pressure testing process, the existing open source tools have problems with high or inapplicable disk IO pressure or inapplicable support for file parameter transfer mode, which makes it impossible to smoothly transfer file parameters.

Method used

A file parameter transfer method is proposed. The pressure measurement task is configured through the pressure measurement platform and the task execution file is generated. The dispatch center dispatches the compression instance to allocate and read the task execution file according to the parameter transfer mode. This method supports repeat mode and non-repeat mode, and optimizes the parameter transfer mode of disk IO and distributed pressure measurement through file content cache and dynamic file allocation.

Benefits of technology

It realizes the support of file parameter repetition and non-repetition modes in distributed pressure testing, optimizes disk IO performance, avoids disk IO becoming a bottleneck, and supports dynamic file allocation, which is suitable for distributed pressure testing scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114625709B_ABST
    Figure CN114625709B_ABST
Patent Text Reader

Abstract

The present application discloses a method for transferring file parameters in a stress testing process, the method comprising: the stress testing platform configures a stress testing task, and generates a task execution file after starting the stress testing task, wherein the stress testing task corresponds to a set of arranged stress testing interfaces, and the task execution file is generated according to a parameter transfer mode and a parameter transfer file bound to the stress testing interface according to preset rules; the scheduling center schedules a corresponding number of stress testing instances according to user stress requirements, and each of the stress testing instances allocates and reads the task execution file according to a strategy corresponding to the parameter transfer mode. The present application also discloses a file parameter transfer system, device, computer equipment, and computer-readable storage medium. Thus, it can be applied to distributed stress testing, and supports two file parameter transfer modes: repeated parameters and non-duplicate parameters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of software stress testing, and in particular to a method, system, device, computer equipment and computer-readable storage medium for transferring file parameters during stress testing. Background Art

[0002] Stress testing is an important means of software quality assurance. The current mainstream stress testing implementation plans are mainly based on open source tools such as Jmeter and Loadrunner. Under high concurrency requirements, single-machine nodes are limited by resources such as CPU and network card bandwidth, and the stress testing capacity may not meet the requirements, so there is a distributed stress testing solution based on multi-machine clusters. As containerization technology and container orchestration capabilities gradually mature, a distributed stress testing solution based on K8s (Kubernetes, a container orchestration management system) container scheduling has been proposed. Usually, according to the concurrency requirements of stress testing, a new Pod (the smallest unit level managed in K8s, which is a combination of one or more containers) is scheduled. Each Pod will execute Jmeter (or other stress testing tools) instructions and perform stress testing in the specified concurrent threads. Jmeter (or other stress testing tools) supports file-based parameter transmission, so that some field values ​​in the interface for each stress application are dynamically changed, increasing the diversity of stress testing interface content.

[0003] Open source tools such as Jmeter support two modes for reading parameter files: one is the repeat mode, in which the file is read again from the beginning after reading it once, and the interface is repeatedly tested; the other is the non-repeat mode, in which the file is read only once, and the interface corresponding to each line is sent out as soon as it is finished, so as to ensure that the content is not repeated. However, in the distributed stress testing solution, the existing open source tools may have the problem of high disk IO (Input / Output) pressure or inapplicability for the above two parameter transmission modes, so that the above two parameter transmission modes cannot be used to smoothly perform file parameter transmission. Summary of the invention

[0004] The main purpose of this application is to propose a file parameter transfer method, system, device, computer equipment and computer-readable storage medium, aiming to solve the problem of how to implement file parameter transfer in distributed stress testing.

[0005] To achieve the above purpose, the present application provides a method for transferring file parameters, the method comprising:

[0006] The stress testing platform configures a stress testing task and generates a task execution file after starting the stress testing task, wherein the stress testing task corresponds to a set of arranged stress testing interfaces, and the task execution file is generated according to a parameter transmission mode and a parameter transmission file bound to the stress testing interface according to preset rules;

[0007] The dispatch center dispatches a corresponding number of pressure-generating instances according to user pressure requirements, and each of the pressure-generating instances allocates and reads the task execution file according to a strategy corresponding to the parameter transmission mode.

[0008] Optionally, the configuration stress testing task includes:

[0009] In response to the user's operation, a new stress testing task is created, the stress testing interface corresponding to the stress testing task is configured, the parameter transfer file is uploaded to the file network disk, and the parameter transfer file is bound to the specified stress testing interface, and the parameter transfer mode of the stress testing interface is selected, wherein the parameter transfer mode includes a repeated mode and a non-repeated mode.

[0010] Optionally, the configuration stress testing task also includes:

[0011] The configuration information related to the stress testing task is saved to the database, wherein the related configuration information includes the stress testing interface arrangement information of the stress testing task, the information of each of the stress testing interfaces, the storage path of the parameter transfer file bound to the stress testing interface, and the parameter transfer mode of the stress testing interface.

[0012] Optionally, the arrangement rules of the stress testing interface include serial and parallel, and each group of serial interfaces corresponds to a subtask of the stress testing task.

[0013] Optionally, the generating task execution file includes:

[0014] When all the stress testing interfaces in a group of serial interfaces corresponding to the subtask adopt a repeated mode to transmit parameters, the subtask generates a task execution file in a repeated mode;

[0015] When one or more of the stress testing interfaces in a group of serial interfaces corresponding to the subtask adopt a non-re-mode for parameter transmission, the subtask generates a plurality of task execution file blocks in a non-re-mode.

[0016] Optionally, the subtask generates a task execution file in a repetitive mode, including:

[0017] At the same time, traverse each of the parameter files corresponding to the group of serial interfaces, and each time a line is traversed, concatenate the read parameter value with the interface information, and output a line of formatted content in the order of the interface arrangement, and add it to the task execution file. If traversing to the end of the parameter file, traverse again from the beginning until the line number requirement of the task execution file is met and then exit the traversal. The line number requirement is determined by comparing the maximum number of lines of each parameter file corresponding to the group of serial interfaces with the preset default minimum number of lines, and taking the maximum value of the two.

[0018] Optionally, the subtask adopts a non-repetitive mode to generate multiple task execution file blocks, including:

[0019] At the same time, each parameter file corresponding to the group of serial interfaces is traversed. After each line is traversed, the read parameter value is spliced ​​with the interface information, and a line of formatted content is output in the order of the interface arrangement, and accumulated into the task execution file. Among them, if the parameter file corresponding to the stress testing interface using the repeated mode is traversed to the end, it is traversed again from the beginning until the parameter file corresponding to any stress testing interface using the non-repetitive mode is traversed to the end and the traversal is exited.

[0020] Optionally, the subtask adopting a non-repetitive mode to generate multiple task execution file blocks also includes:

[0021] During the traversal process, when the task execution file is accumulated to N lines, it switches to a new file to continue accumulating, and obtains multiple task execution file blocks, where N is a preset number of block lines.

[0022] Optionally, each of the pressure-generating instances allocates and reads the task execution file according to a strategy corresponding to the parameter transmission mode, including:

[0023] When the subtask adopts a repetitive mode, each of the compression instances reads the task execution file through a separate thread, and consumes the read content alternately through two queues.

[0024] Optionally, reading the task execution file through a separate thread and consuming the read content alternately through two queues includes:

[0025] The stress testing instance maintains two queues A and B. The thread traverses the task execution file from the beginning, initially reads C line content and adds it to queue A, and then reads C line content and adds it to queue B; the stress testing execution thread group of the stress testing instance first consumes C line content from queue A, and when queue A is consumed, switches to queue B for consumption, and at the same time notifies the thread to continue traversing the stress testing execution file, reads C line content and adds it to queue A, and traverses again from the beginning when traversing to the end of the file, and consumes alternately in this way to execute the subtask.

[0026] Optionally, each of the pressure-generating instances allocates and reads the task execution file according to a strategy corresponding to the parameter transmission mode, further comprising:

[0027] When the subtask adopts the non-repetitive mode, the scheduling center adds the paths of the multiple task execution file blocks to the designated queue, and each of the compression instances consumes and reads one task execution file block from the designated queue each time through a separate thread.

[0028] Optionally, each of the pressure-generating instances consumes and reads one task execution file block from the designated queue through a separate thread each time, including:

[0029] Each of the stress testing instances consumes the path of one task execution file block from the designated queue each time through a separate thread; reads the corresponding task execution file block from the file network disk according to the path and adds it to queue D; the stress testing execution thread group of the stress testing instance consumes the task execution file block from queue D and executes the corresponding task; when queue D is consumed, the path of the next task execution file block is consumed from the designated queue until the designated queue is consumed.

[0030] In addition, to achieve the above-mentioned purpose, the embodiment of the present application also provides a file parameter transmission system, the system comprising:

[0031] A stress testing platform, used to configure stress testing tasks and generate task execution files after starting the stress testing tasks, wherein the stress testing tasks correspond to a set of arranged stress testing interfaces, and the task execution files are generated according to preset rules based on the parameter transmission mode and the parameter transmission files bound to the stress testing interfaces;

[0032] The scheduling center is used to schedule a corresponding number of pressure-generating instances according to user pressure requirements, and each of the pressure-generating instances allocates and reads the task execution file according to the strategy corresponding to the parameter transmission mode.

[0033] To achieve the above purpose, the embodiment of the present application further provides a file parameter transfer method, which is applied to a stress testing platform, and the method includes:

[0034] Configure a stress testing task, which corresponds to a set of orchestrated stress testing interfaces;

[0035] After starting the stress testing task, a task execution file is generated according to preset rules based on the parameter transfer mode and the parameter transfer file bound to the stress testing interface.

[0036] Optionally, the arrangement rules of the stress testing interface include serial and parallel, each group of serial interfaces corresponds to a subtask of the stress testing task, and the generating task execution file includes:

[0037] When all the stress testing interfaces in a group of serial interfaces corresponding to the subtask adopt a repeated mode to transmit parameters, the subtask generates a task execution file in a repeated mode;

[0038] When one or more of the stress testing interfaces in a group of serial interfaces corresponding to the subtask adopt a non-re-mode for parameter transmission, the subtask generates a plurality of task execution file blocks in a non-re-mode.

[0039] Optionally, the subtask generates a task execution file in a repetitive mode, including:

[0040] At the same time, traverse each of the parameter files corresponding to the group of serial interfaces, and each time a line is traversed, concatenate the read parameter value with the interface information, and output a line of formatted content in the order of the interface arrangement, and add it to the task execution file. If traversing to the end of the parameter file, traverse again from the beginning until the line number requirement of the task execution file is met and then exit the traversal. The line number requirement is determined by comparing the maximum number of lines of each parameter file corresponding to the group of serial interfaces with the preset default minimum number of lines, and taking the maximum value of the two.

[0041] Optionally, the subtask adopts a non-repetitive mode to generate multiple task execution file blocks, including:

[0042] At the same time, each parameter file corresponding to the group of serial interfaces is traversed. After each line is traversed, the read parameter value is spliced ​​with the interface information, and a line of formatted content is output in the order of the interface arrangement, and accumulated into the task execution file. Among them, if the parameter file corresponding to the stress testing interface using the repeated mode is traversed to the end, it is traversed again from the beginning until the parameter file corresponding to any stress testing interface using the non-repetitive mode is traversed to the end and the traversal is exited.

[0043] Optionally, the subtask adopting a non-repetitive mode to generate multiple task execution file blocks also includes:

[0044] During the traversal process, when the task execution file accumulates to N lines, it switches to a new file to continue accumulating, and obtains multiple task execution file blocks, where N is a preset number of block lines.

[0045] To achieve the above-mentioned purpose, the embodiment of the present application further provides a file parameter transmission device, the device comprising:

[0046] A configuration module, used to configure a stress testing task, wherein the stress testing task corresponds to a set of arranged stress testing interfaces;

[0047] A generation module is used to generate a task execution file according to preset rules based on the parameter transfer mode and the parameter transfer file bound to the pressure measurement interface after starting the pressure measurement task.

[0048] To achieve the above purpose, the embodiment of the present application further provides a file parameter transmission method, which is applied to a dispatching center, and the method includes:

[0049] Dispatching a corresponding number of pressure-generating instances based on user pressure requirements;

[0050] Control each of the pressure-generating instances to allocate and read the task execution file according to the strategy corresponding to the parameter transmission mode.

[0051] Optionally, each of the pressure-generating instances allocates and reads the task execution file according to a strategy corresponding to the parameter transmission mode, including:

[0052] When the subtask adopts the repetitive mode, each of the pressure-generating instances reads the task execution file corresponding to the subtask through a separate thread, and consumes the read content alternately through two queues;

[0053] When the subtask adopts the non-repetitive mode, the scheduling center adds the paths of multiple task execution file blocks corresponding to the subtask to the specified queue, and each of the compression instances consumes and reads one task execution file block each time from the specified queue through a separate thread.

[0054] To achieve the above-mentioned purpose, the embodiment of the present application further provides a file parameter transmission device, the device comprising:

[0055] The scheduling module is used to schedule the corresponding number of pressure generation instances according to the user's pressure requirements;

[0056] The execution module is used to control each of the pressure-generating instances to allocate and read the task execution file according to the strategy corresponding to the parameter transmission mode.

[0057] To achieve the above objectives, an embodiment of the present application also provides a computer device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the computer program is executed by the processor, the file parameter transfer method as described above is implemented.

[0058] To achieve the above objectives, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the file parameter transfer method as described above is implemented.

[0059] The file parameter transmission method, system, device, computer equipment and computer-readable storage medium proposed in the embodiments of the present application can be applied to distributed stress testing, and support two file parameter transmission modes: repeated parameters and non-repeated parameters. Among them, the stress testing platform generates a task execution file corresponding to the task based on the parameter transmission file and the interface configuration information. Each group of serial interfaces corresponds to a subtask and a group of files. Different rules are used for file generation according to different parameter transmission modes. The scheduling center schedules a corresponding number of stress transmission instances according to the user's pressure requirements. For different parameter transmission modes of stress testing tasks, different strategies (different queue settings and consumption methods) are used for the allocation and reading of task execution files. Thus, in the parameter transmission repetition mode, the file reading method is optimized by caching the file content, so that when the parameter transmission file uploaded by the user is a small file, the disk IO will not become a bottleneck; through the dynamic file allocation method, the parameter transmission non-repeated mode of distributed stress testing is supported. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 This is an application environment architecture diagram of a file parameter transfer system proposed in the first embodiment of the present application;

[0061] Figure 2 A flowchart of a file parameter transmission method proposed in the second embodiment of the present application;

[0062] Figure 3 A flowchart of another form of the file parameter transfer method proposed in the second embodiment of the present application;

[0063] Figure 4 A flowchart of a file parameter transmission method proposed in the third embodiment of the present application;

[0064] Figure 5 A schematic diagram of a module of a file parameter transmission device proposed in the fourth embodiment of the present application;

[0065] Figure 6 A flowchart of a file parameter transmission method proposed in the fifth embodiment of the present application;

[0066] Figure 7 A module diagram of a file parameter transmission device proposed in the sixth embodiment of the present application;

[0067] Figure 8 This is a schematic diagram of the hardware architecture of a computer device proposed in the seventh embodiment of the present application. DETAILED DESCRIPTION

[0068] In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0069] It should be noted that the descriptions involving "first", "second", etc. in the embodiments of the present application are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.

[0070] Embodiment 1

[0071] See also Figure 1 , Figure 1 This is an application environment architecture diagram of a file parameter transfer system proposed in the first embodiment of the present application. The present application can be applied to an application environment including, but not limited to, a stress testing platform 2, a file network disk 4, a database 6, a scheduling center 8, and a resource pool 10.

[0072] The repeated reading mode of the file parameter passing function supported by existing open source tools such as Jmeter will lead to frequent reading of file contents when the file is small, causing a sharp increase in disk IO pressure and becoming a bottleneck for the stress testing machine. The non-rereading mode of the file parameter passing function supported by open source tools such as Jmeter is only applicable to single-machine mode and is not applicable in the context of distributed stress testing, because there will be multiple stress instances in distributed stress testing, and they will increase dynamically, and files cannot be specified in advance.

[0073] The file parameter transmission system proposed in this application can effectively solve the above two problems. In this embodiment, the file parameter transmission system mainly includes a stress testing platform 2, a file network disk 4, a database 6, a scheduling center 8, etc.

[0074] The stress testing platform 2 is a Web platform that provides functions such as visual stress testing task configuration, stress testing task startup, and stress testing report display. In this embodiment, the stress testing platform 2 is mainly used to configure stress testing tasks and generate task execution files after starting the stress testing tasks. The stress testing tasks correspond to a set of orchestrated stress testing interfaces, and the orchestration rules support serial and parallel operations.

[0075] Specifically, the user can create a new stress testing task on the stress testing platform 2, configure a specific stress testing interface, and if parameter transmission is required, upload the local parameter transmission file through the stress testing platform 2, bind it to the specified stress testing interface, and select the file parameter transmission mode of the interface. The stress testing platform 2 responds to the user's operation, creates a new stress testing task, configures the stress testing interface corresponding to the stress testing task, uploads the parameter transmission file to the file network disk 4, binds the parameter transmission file to the specified stress testing interface, and selects the parameter transmission mode of the stress testing interface, wherein the parameter transmission mode includes a repeat mode and a non-repeat mode.

[0076] The stress testing platform 2 is also used to save the configuration information related to the stress testing task to the database 6. The related configuration information includes the stress testing interface arrangement information of the stress testing task, the information of each stress testing interface, the storage path of the parameter transfer file bound to the stress testing interface (the path where the user uploads from the local computer and stores it in the file network disk), and the parameter transfer mode of the stress testing interface.

[0077] When the user starts the stress test task, the stress test platform 2 is also used to generate the task execution file according to the preset rules based on the parameter transmission mode and the parameter transmission file bound to the stress test interface. At this time, the task execution file is solidified and generated according to the parameter transmission file and the interface configuration information, and each group of serial interfaces corresponds to a subtask and a group of files. Different rules are used to generate the task execution file according to different parameter transmission modes.

[0078] (1) Repeating mode: When all the stress testing interfaces in a group of serial interfaces corresponding to the subtask adopt a repeating mode for parameter transmission, the subtask generates a task execution file in a repeating mode. That is, each of the parameter transmission files corresponding to the group of serial interfaces is traversed at the same time, and each time a line is traversed, the read parameter transmission value is spliced ​​with the interface information, and a line of formatted content is output in the order of the interface arrangement, and accumulated into the task execution file. Among them, if the end of the parameter transmission file is traversed, it is traversed again from the beginning until the number of lines required by the task execution file is met and then the traversal is exited. The number of lines required is determined by comparing the maximum number of lines of each of the parameter transmission files corresponding to the group of serial interfaces with the preset default minimum number of lines M, and taking the maximum value of the two.

[0079] The purpose of setting the default minimum number of lines is to prevent the number of lines of the parameter file uploaded by the user from being too small, resulting in the number of lines of the final task execution file being too small, causing the file to be read frequently and affecting the disk IO load.

[0080] For example, suppose there is a group of serial interfaces A, B, and C, and the three interfaces are arranged in sequence to form a group of serial subtasks. Among them, the parameter file of interface A has 10,000 lines, the parameter file of interface B has 20,000 lines, and the parameter file of interface C has 30,000 lines. The system default minimum number of lines M is set to 100,000 lines, so the number of lines in the task execution file finally generated is 100,000 lines.

[0081] (2) Non-repetitive mode: When one or more of the stress measurement interfaces in a group of serial interfaces corresponding to the subtask adopts non-repetitive mode for parameter transmission, the subtask adopts non-repetitive mode to generate multiple task execution file blocks. That is, the parameter transmission files corresponding to the group of serial interfaces are traversed at the same time. After each line is traversed, the read parameter transmission value is spliced ​​with the interface information and a line of formatted content is output according to the interface arrangement order, and accumulated into the task execution file. If the parameter transmission file corresponding to the stress measurement interface using the repetitive mode is traversed to the end, it is traversed again from the beginning until the parameter transmission file corresponding to any stress measurement interface using the non-repetitive mode is traversed to the end, then the traversal is exited. In addition, the default number of task execution file block lines N is pre-set. During the traversal process, when the task execution file XXX-part-[i] is accumulated to N lines, it is switched to the new file XXX-part-[i+1] to continue accumulating, and multiple task execution file blocks are obtained. Where i starts from 1, representing the file block sequence number, and XXX refers to the task number (ID).

[0082] For example, suppose there is a group of serial interfaces A, B, and C, and the three interfaces are arranged in sequence to form a group of serial subtasks. The retransmittable parameter file of interface A has 250,000 lines, the non-retransmitted parameter file of interface B has 350,000 lines, and the non-retransmitted parameter file of interface C has 400,000 lines. The preset number of block lines N is set to 100,000 lines, and finally 4 task execution file blocks are generated, among which the number of lines of task execution file blocks XXX-part-1, XXX-part-2, and XXX-part-3 is 100,000 lines, and the number of lines of task execution file block XXX-part-4 is 50,000 lines, totaling 350,000 lines, which is equal to the number of lines of non-retransmitted parameter file of interface B.

[0083] It is worth noting that if the stress testing task does not require file parameter transmission and each interface has a fixed configuration, it is a special case of the repetitive mode, which is equivalent to binding a parameter transmission file with only one line of content to each interface, and can be processed according to the logic of the repetitive mode.

[0084] The file network disk 4 is used to store the parameter files uploaded by the user and the task execution files / task execution file blocks generated by the stress testing platform 2. In addition, the stress testing platform 2 and the stress testing instance can access the files on the file network disk 4.

[0085] The database 6 is used to store data such as configuration information related to the stress testing task. When the user clicks to execute the stress testing task, the stress testing platform 2 reads the task configuration information from the database 6 to generate the task execution file.

[0086] The scheduling center 8 is used to schedule a corresponding number of pressure-generating instances (Pod, one or more containers) from the resource pool 10 according to user pressure requirements, and each of the pressure-generating instances allocates and reads the task execution file according to the strategy corresponding to the parameter transmission mode.

[0087] (1) Repeat mode: When the subtask adopts the repeat mode, each of the compression instances reads the task execution file through a separate thread and consumes the read content alternately through two queues.

[0088] Specifically, each stress test instance starts a separate thread X to read the specified task execution file from the file network disk 4, and maintain two queues A and B. The thread X traverses the task execution file from the beginning, initially reads the C line content and adds it to queue A, and then reads the C line content and adds it to queue B; the stress test execution thread group of the stress test instance first consumes the C line content from queue A, and when queue A is consumed, it switches to queue B for consumption, and at the same time notifies the thread X to continue traversing the stress test execution file, reads the C line content and adds it to queue A, and when it traverses to the end of the file, it traverses again from the beginning, and consumes alternately in this way to execute the subtask. The dual-queue processing method can achieve the purpose of interface caching and make stress test smoother.

[0089] (2) No-repeat mode: When the subtask adopts the no-repeat mode, the scheduling center 8 adds the paths of the multiple task execution file blocks corresponding to the subtask to the designated queue of Redis (Remote Dictionary Server), and each of the pressure-generating instances consumes and reads one task execution file block each time from the designated queue through a separate thread Y.

[0090] Specifically, each of the stress testing instances consumes the path of the task execution file block from the designated queue one at a time through a separate thread Y; reads the corresponding task execution file block from the file network disk 4 according to the path and adds it to queue D; the stress testing execution thread group of the stress testing instance consumes the task execution file block from queue D and executes the corresponding task; when queue D is consumed, it consumes the path of the next task execution file block from the designated queue until the designated queue is consumed. In other words, the corresponding number of scheduled stress testing instances jointly consume the path of the task execution file block in the designated queue, and each stress testing instance consumes the path of the task execution file block one at a time, and this is repeated until the path in the designated queue is consumed. This processing method realizes the dynamic allocation of stress testing files by introducing Redis distributed queues, thereby supporting the parameter transmission without repetition mode of distributed stress testing.

[0091] Embodiment 2

[0092] like Figure 2 As shown, it is a flowchart of a file parameter transfer method proposed in the first embodiment of the present application. It can be understood that the flowchart in the embodiment of the present method is not used to limit the order of executing the steps. As needed, some steps in the flowchart can also be added or deleted. The method is described below with the file parameter transfer system as the execution subject.

[0093] The method comprises the following steps:

[0094] S200, the stress testing platform configures a stress testing task, and generates a task execution file after starting the stress testing task. The stress testing task corresponds to a set of arranged stress testing interfaces, and the arrangement rules support serial and parallel.

[0095] Specifically, the user can create a new stress testing task on the stress testing platform, configure a specific stress testing interface, and if parameter transmission is required, upload the local parameter transmission file through the stress testing platform, bind it to the specified stress testing interface, and select the file parameter transmission mode of the interface. The stress testing platform responds to the user's operation, creates a new stress testing task, configures the stress testing interface corresponding to the stress testing task, uploads the parameter transmission file to the file network disk, binds the parameter transmission file to the specified stress testing interface, and selects the parameter transmission mode of the stress testing interface, wherein the parameter transmission mode includes a repeat mode and a non-repeat mode.

[0096] The stress testing platform saves the configuration information related to the stress testing task to the database. The related configuration information includes the stress testing interface arrangement information of the stress testing task, the information of each stress testing interface, the storage path of the parameter transfer file bound to the stress testing interface (the path where the user uploads it locally and stores it in the file network disk), and the parameter transfer mode of the stress testing interface.

[0097] When the user starts the stress testing task, the stress testing platform generates the task execution file according to the parameter transmission mode and the parameter transmission file bound to the stress testing interface according to the preset rules. At this time, the task execution file is solidified and generated according to the parameter transmission file and the interface configuration information. Each group of serial interfaces corresponds to a subtask and a group of files. Different rules are used to generate task execution files according to different parameter transmission modes.

[0098] (1) Repeating mode: When all the stress testing interfaces in a group of serial interfaces corresponding to the subtask adopt a repeating mode for parameter transmission, the subtask generates a task execution file in a repeating mode. That is, each of the parameter transmission files corresponding to the group of serial interfaces is traversed at the same time, and each time a line is traversed, the read parameter transmission value is spliced ​​with the interface information, and a line of formatted content is output in the order of the interface arrangement, and accumulated into the task execution file. Among them, if the end of the parameter transmission file is traversed, it is traversed again from the beginning until the number of lines required by the task execution file is met and then the traversal is exited. The number of lines required is determined by comparing the maximum number of lines of each of the parameter transmission files corresponding to the group of serial interfaces with the preset default minimum number of lines M, and taking the maximum value of the two.

[0099] The purpose of setting the default minimum number of lines is to prevent the number of lines of the parameter file uploaded by the user from being too small, resulting in the number of lines of the final task execution file being too small, causing the file to be read frequently and affecting the disk IO load.

[0100] For example, suppose there is a group of serial interfaces A, B, and C, and the three interfaces are arranged in sequence to form a group of serial subtasks. Among them, the parameter file of interface A has 10,000 lines, the parameter file of interface B has 20,000 lines, and the parameter file of interface C has 30,000 lines. The system default minimum number of lines M is set to 100,000 lines, so the number of lines in the task execution file finally generated is 100,000 lines.

[0101] (2) Non-repetitive mode: When one or more of the stress measurement interfaces in a group of serial interfaces corresponding to the subtask adopts non-repetitive mode for parameter transmission, the subtask adopts non-repetitive mode to generate multiple task execution file blocks. That is, the parameter transmission files corresponding to the group of serial interfaces are traversed at the same time. After each line is traversed, the read parameter transmission value is spliced ​​with the interface information and a line of formatted content is output according to the interface arrangement order, and accumulated into the task execution file. If the parameter transmission file corresponding to the stress measurement interface using the repetitive mode is traversed to the end, it is traversed again from the beginning until the parameter transmission file corresponding to any stress measurement interface using the non-repetitive mode is traversed to the end, then the traversal is exited. In addition, the default number of task execution file block lines N is pre-set. During the traversal process, when the task execution file XXX-part-[i] is accumulated to N lines, it is switched to the new file XXX-part-[i+1] to continue accumulating, and multiple task execution file blocks are obtained. Where i starts from 1, representing the file block sequence number, and XXX refers to the task number (ID).

[0102] For example, suppose there is a group of serial interfaces A, B, and C, and the three interfaces are arranged in sequence to form a group of serial subtasks. The retransmittable parameter file of interface A has 250,000 lines, the non-retransmitted parameter file of interface B has 350,000 lines, and the non-retransmitted parameter file of interface C has 400,000 lines. The preset number of block lines N is set to 100,000 lines, and finally 4 task execution file blocks are generated, among which the number of lines of task execution file blocks XXX-part-1, XXX-part-2, and XXX-part-3 is 100,000 lines, and the number of lines of task execution file block XXX-part-4 is 50,000 lines, totaling 350,000 lines, which is equal to the number of lines of non-retransmitted parameter file of interface B.

[0103] It is worth noting that if the stress testing task does not require file parameter transmission and each interface has a fixed configuration, it is a special case of the repetitive mode, which is equivalent to binding a parameter transmission file with only one line of content to each interface, and can be processed according to the logic of the repetitive mode.

[0104] The task execution file / task execution file block is saved to the file network disk after being generated. In addition, the stress testing platform and the stress testing instance can access the files on the file network disk.

[0105] S202, the scheduling center schedules a corresponding number of pressure-generating instances according to the user's pressure demand, and each of the pressure-generating instances allocates and reads the task execution file according to the strategy corresponding to the parameter transmission mode.

[0106] (1) Repeat mode: When the subtask adopts the repeat mode, each of the compression instances reads the task execution file through a separate thread and consumes the read content alternately through two queues.

[0107] Specifically, each stress test instance starts a separate thread X to read the specified task execution file from the file network disk 4, and maintain two queues A and B. The thread X traverses the task execution file from the beginning, initially reads the C line content and adds it to queue A, and then reads the C line content and adds it to queue B; the stress test execution thread group of the stress test instance first consumes the C line content from queue A, and when queue A is consumed, it switches to queue B for consumption, and at the same time notifies the thread X to continue traversing the stress test execution file, reads the C line content and adds it to queue A, and when it traverses to the end of the file, it traverses again from the beginning, and consumes alternately in this way to execute the subtask. The dual-queue processing method can achieve the purpose of interface caching and make stress test smoother.

[0108] (2) No-repetition mode: When the subtask adopts the no-repetition mode, the scheduling center 8 adds the paths of the multiple task execution file blocks corresponding to the subtask to the designated queue of Redis, and each of the pressure-generating instances consumes and reads one task execution file block from the designated queue each time through a separate thread Y.

[0109] Specifically, each of the stress testing instances consumes the path of the task execution file block from the designated queue one at a time through a separate thread Y; reads the corresponding task execution file block from the file network disk 4 according to the path and adds it to queue D; the stress testing execution thread group of the stress testing instance consumes the task execution file block from queue D and executes the corresponding task; when queue D is consumed, it consumes the path of the next task execution file block from the designated queue until the designated queue is consumed. In other words, the corresponding number of scheduled stress testing instances jointly consume the path of the task execution file block in the designated queue, and each stress testing instance consumes the path of the task execution file block one at a time, and this is repeated until the path in the designated queue is consumed. This processing method realizes the dynamic allocation of stress testing files by introducing Redis distributed queues, thereby supporting the parameter transmission without repetition mode of distributed stress testing.

[0110] See also Figure 3 As shown in FIG. 1 , it is a flow chart of another form of this embodiment. The process steps in this figure have been Figure 2 The relevant instructions are described in detail and will not be repeated here.

[0111] The file parameter transfer method proposed in this embodiment can be applied to distributed stress testing, and supports two file parameter transfer modes: repeated parameters and non-repeated parameters. Among them, the stress testing platform generates a task execution file corresponding to the task based on the parameter transfer file and the interface configuration information. Each group of serial interfaces corresponds to a subtask and a group of files. Different rules are used for file generation according to different parameter transfer modes. The scheduling center schedules a corresponding number of stress instances according to the user's stress requirements. For different parameter transfer modes of stress testing tasks, different strategies (different queue settings and consumption methods) are used for the allocation and reading of task execution files. Therefore, in the repeated parameter transfer mode, the file reading method is optimized by caching the file content, so that when the parameter transfer file uploaded by the user is a small file, the disk IO will not become a bottleneck; through the dynamic file allocation method, the non-repeated parameter transfer mode of distributed stress testing is supported.

[0112] Embodiment 3

[0113] like Figure 4As shown, it is a flowchart of a file parameter transfer method proposed in the third embodiment of the present application. It can be understood that the flowchart in the embodiment of this method is not used to limit the order of executing steps. As needed, some steps in the flowchart can also be added or deleted. The method is explained below using the pressure measurement platform as the execution subject.

[0114] The method comprises the following steps:

[0115] S300, configuring a stress testing task, where the stress testing task corresponds to a set of orchestrated stress testing interfaces.

[0116] Specifically, the user can create a new stress testing task on the stress testing platform and configure a specific stress testing interface. If parameter transmission is required, the local parameter transmission file is uploaded through the stress testing platform and bound to the specified stress testing interface, and the file parameter transmission mode of the interface is selected. The stress testing platform responds to the user's operation, creates a new stress testing task, configures the stress testing interface corresponding to the stress testing task, uploads the parameter transmission file to the file network disk, binds the parameter transmission file to the specified stress testing interface, and selects the parameter transmission mode of the stress testing interface. Among them, the parameter transmission mode includes a repeated mode and a non-repeated mode. The orchestration rules of the stress testing interface support serial and parallel.

[0117] The stress testing platform saves the configuration information related to the stress testing task to the database. The related configuration information includes the stress testing interface arrangement information of the stress testing task, the information of each stress testing interface, the storage path of the parameter transfer file bound to the stress testing interface (the path where the user uploads it locally and stores it in the file network disk), and the parameter transfer mode of the stress testing interface.

[0118] S302, after starting the stress testing task, generating a task execution file according to a preset rule based on a parameter transfer mode and a parameter transfer file bound to the stress testing interface.

[0119] When the user starts the stress testing task, the stress testing platform generates the task execution file according to the parameter transmission mode and the parameter transmission file bound to the stress testing interface according to the preset rules. At this time, the task execution file is solidified and generated according to the parameter transmission file and the interface configuration information. Each group of serial interfaces corresponds to a subtask and a group of files. Different rules are used to generate task execution files according to different parameter transmission modes.

[0120] (1) Repeating mode: When all the stress testing interfaces in a group of serial interfaces corresponding to the subtask adopt a repeating mode for parameter transmission, the subtask generates a task execution file in a repeating mode. That is, each of the parameter transmission files corresponding to the group of serial interfaces is traversed at the same time, and each time a line is traversed, the read parameter transmission value is spliced ​​with the interface information, and a line of formatted content is output in the order of the interface arrangement, and accumulated into the task execution file. Among them, if the end of the parameter transmission file is traversed, it is traversed again from the beginning until the number of lines required by the task execution file is met and then the traversal is exited. The number of lines required is determined by comparing the maximum number of lines of each of the parameter transmission files corresponding to the group of serial interfaces with the preset default minimum number of lines M, and taking the maximum value of the two.

[0121] The purpose of setting the default minimum number of lines is to prevent the number of lines of the parameter file uploaded by the user from being too small, resulting in the number of lines of the final task execution file being too small, causing the file to be read frequently and affecting the disk IO load.

[0122] For example, suppose there is a group of serial interfaces A, B, and C, and the three interfaces are arranged in sequence to form a group of serial subtasks. Among them, the parameter file of interface A has 10,000 lines, the parameter file of interface B has 20,000 lines, and the parameter file of interface C has 30,000 lines. The system default minimum number of lines M is set to 100,000 lines, so the number of lines in the task execution file finally generated is 100,000 lines.

[0123] (2) Non-repetitive mode: When one or more of the stress measurement interfaces in a group of serial interfaces corresponding to the subtask adopts non-repetitive mode for parameter transmission, the subtask adopts non-repetitive mode to generate multiple task execution file blocks. That is, the parameter transmission files corresponding to the group of serial interfaces are traversed at the same time. After each line is traversed, the read parameter transmission value is spliced ​​with the interface information and a line of formatted content is output according to the interface arrangement order, and accumulated into the task execution file. If the parameter transmission file corresponding to the stress measurement interface using the repetitive mode is traversed to the end, it is traversed again from the beginning until the parameter transmission file corresponding to any stress measurement interface using the non-repetitive mode is traversed to the end, then the traversal is exited. In addition, the default number of task execution file block lines N is pre-set. During the traversal process, when the task execution file XXX-part-[i] is accumulated to N lines, it is switched to the new file XXX-part-[i+1] to continue accumulating, and multiple task execution file blocks are obtained. Where i starts from 1, representing the file block sequence number, and XXX refers to the task number (ID).

[0124] For example, suppose there is a group of serial interfaces A, B, and C, and the three interfaces are arranged in sequence to form a group of serial subtasks. The retransmittable parameter file of interface A has 250,000 lines, the non-retransmitted parameter file of interface B has 350,000 lines, and the non-retransmitted parameter file of interface C has 400,000 lines. The preset number of block lines N is set to 100,000 lines, and finally 4 task execution file blocks are generated, among which the number of lines of task execution file blocks XXX-part-1, XXX-part-2, and XXX-part-3 is 100,000 lines, and the number of lines of task execution file block XXX-part-4 is 50,000 lines, totaling 350,000 lines, which is equal to the number of lines of non-retransmitted parameter file of interface B.

[0125] It is worth noting that if the stress testing task does not require file parameter transmission and each interface has a fixed configuration, it is a special case of the repetitive mode, which is equivalent to binding a parameter transmission file with only one line of content to each interface, and can be processed according to the logic of the repetitive mode.

[0126] The task execution file / task execution file block is saved to the file network disk after being generated. In addition, the stress testing platform and the stress testing instance can access the files on the file network disk.

[0127] Embodiment 4

[0128] like Figure 5 As shown, a module schematic diagram of a file parameter transmission device 60 is proposed in the fourth embodiment of the present application. The file parameter transmission device 60 can be divided into one or more program modules, one or more program modules are stored in a storage medium, and are executed by one or more processors to complete the embodiment of the present application. The program module referred to in the embodiment of the present application refers to a series of computer program instruction segments that can complete a specific function. The following description will specifically introduce the functions of each program module in this embodiment.

[0129] In this embodiment, the file parameter transmission device 60 includes:

[0130] The configuration module 600 is used to configure a stress testing task, where the stress testing task corresponds to a set of arranged stress testing interfaces.

[0131] The generation module 602 is used to generate a task execution file according to a preset rule based on a parameter transfer mode and a parameter transfer file bound to the stress testing interface after starting the stress testing task.

[0132] The specific functions of the above modules are described in the previous embodiment and will not be repeated here.

[0133] Embodiment 5

[0134] like Figure 6As shown, it is a flowchart of a file parameter transmission method proposed in the fifth embodiment of the present application. It can be understood that the flowchart in the embodiment of the present method is not used to limit the order of executing the steps. As needed, some steps in the flowchart can also be added or deleted. The method is described below with the dispatch center as the execution subject.

[0135] The method comprises the following steps:

[0136] S400: Scheduling a corresponding number of pressure-generating instances according to user pressure requirements.

[0137] Each stress test task corresponds to different stress requirements and requires a different number of stress instances. When executing the stress test task, the scheduling center schedules a corresponding number of stress instances from the resource pool according to the stress requirements. The specific correspondence between the stress requirements and the number of stress instances can be determined according to any existing feasible method, which is not limited in this embodiment.

[0138] S402, controlling each of the pressure-generating instances to allocate and read the task execution file according to the strategy corresponding to the parameter transmission mode.

[0139] (1) Repeat mode: When the subtask adopts the repeat mode, each of the compression instances reads the task execution file through a separate thread and consumes the read content alternately through two queues.

[0140] Specifically, each stress testing instance starts a separate thread X to read the specified task execution file from the file network disk, and maintains two queues A and B. The thread X traverses the task execution file from the beginning, initially reads C lines of content and adds it to queue A, and then reads C lines of content and adds it to queue B; the stress testing execution thread group of the stress testing instance first consumes C lines of content from queue A, and when queue A is consumed, switches to queue B for consumption, and notifies the thread X to continue traversing the stress testing execution file, reads C lines of content and adds it to queue A, and traverses again from the beginning when traversing to the end of the file, and consumes alternately in this way to execute the subtask. The dual-queue processing method can achieve the purpose of interface caching and make stress testing smoother.

[0141] (2) No-repeat mode: When the subtask adopts the no-repeat mode, the scheduling center adds the paths of the multiple task execution file blocks corresponding to the subtask to the designated queue of Redis (Remote Dictionary Server), and each of the pressure-generating instances consumes and reads one task execution file block each time from the designated queue through a separate thread Y.

[0142] Specifically, each of the stress testing instances consumes the path of the task execution file block from the designated queue one at a time through a separate thread Y; reads the corresponding task execution file block from the file network disk 4 according to the path and adds it to queue D; the stress testing execution thread group of the stress testing instance consumes the task execution file block from queue D and executes the corresponding task; when queue D is consumed, it consumes the path of the next task execution file block from the designated queue until the designated queue is consumed. In other words, the corresponding number of scheduled stress testing instances jointly consume the path of the task execution file block in the designated queue, and each stress testing instance consumes the path of the task execution file block one at a time, and this is repeated until the path in the designated queue is consumed. This processing method realizes the dynamic allocation of stress testing files by introducing Redis distributed queues, thereby supporting the parameter transmission without repetition mode of distributed stress testing.

[0143] Embodiment 6

[0144] like Figure 7 As shown, a module schematic diagram of a file parameter transmission device 90 is proposed in the sixth embodiment of the present application. The file parameter transmission device 90 can be divided into one or more program modules, one or more program modules are stored in a storage medium, and are executed by one or more processors to complete the embodiment of the present application. The program module referred to in the embodiment of the present application refers to a series of computer program instruction segments that can complete a specific function. The following description will specifically introduce the functions of each program module in this embodiment.

[0145] In this embodiment, the file parameter transmission device 90 includes:

[0146] The scheduling module 900 is used to schedule a corresponding number of pressure generation instances according to user pressure requirements.

[0147] The execution module 902 is used to control each of the pressure-generating instances to allocate and read the task execution file according to the strategy corresponding to the parameter transmission mode.

[0148] The specific functions of the above modules are described in the previous embodiment and will not be repeated here.

[0149] Embodiment 7

[0150] like Figure 8 FIG. 2 is a schematic diagram of the hardware architecture of a computer device 20 according to the seventh embodiment of the present application. In this embodiment, the computer device 20 may include, but is not limited to, a memory 21, a processor 22, and a network interface 23 that can be interconnected through a system bus. It should be noted that Figure 8Only a computer device 20 having components 21-23 is shown, but it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented instead. In this embodiment, the computer device 20 may be a device corresponding to the stress testing platform or the scheduling center, such as a client, a server, a server cluster, etc.

[0151] The memory 21 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 21 can be an internal storage unit of the computer device 20, such as a hard disk or memory of the computer device 20. In other embodiments, the memory 21 can also be an external storage device of the computer device 20, such as a plug-in hard disk equipped on the computer device 20, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory 21 can also include both the internal storage unit of the computer device 20 and its external storage device. In this embodiment, the memory 21 is generally used to store the operating system and various application software installed on the computer device 20, such as the program code of the file parameter transmission device in the embodiment. In addition, the memory 21 can also be used to temporarily store various types of data that have been output or are to be output.

[0152] The processor 22 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 22 is generally used to control the overall operation of the computer device 20. In this embodiment, the processor 22 is used to run the program code stored in the memory 21 or process data.

[0153] The network interface 23 may include a wireless network interface or a wired network interface, and the network interface 23 is generally used to establish a communication connection between the computer device 20 and other electronic devices. For example, the network interface 23 is used to connect the computer device 20 to an external server or terminal through a network, and to establish a data transmission channel and a communication connection between the computer device 20 and the external server or terminal. The network may be a wireless or wired network such as an intranet, the Internet, the Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), 4G network, 5G network, Bluetooth, Wi-Fi, etc.

[0154] In this embodiment, the file parameter transmission device stored in the memory 21 can also be divided into one or more program modules and executed by one or more processors (processor 22 in this embodiment) to complete the present application.

[0155] Embodiment 8

[0156] The present application also provides another implementation, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program can be executed by at least one processor to enable the at least one processor to perform the steps of the file parameter transfer method as described above.

[0157] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0158] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0159] Obviously, those skilled in the art should understand that the modules or steps of the above-mentioned embodiments of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. In this way, the embodiments of the present application are not limited to any specific combination of hardware and software.

[0160] The above are only preferred embodiments of the embodiments of the present application, and are not intended to limit the patent scope of the embodiments of the present application. Any equivalent structure or equivalent process transformation made using the description and drawings of the embodiments of the present application, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the embodiments of the present application.

Claims

1. A method for transferring file parameters during stress testing, characterized in that: The method comprises: The stress testing platform configures a stress testing task and generates a task execution file after starting the stress testing task, wherein the stress testing task corresponds to a set of arranged stress testing interfaces, and the task execution file is generated according to a parameter transmission mode and a parameter transmission file bound to the stress testing interface according to preset rules; The dispatch center dispatches a corresponding number of pressure-generating instances according to the user's pressure requirements, and each of the pressure-generating instances allocates and reads the task execution file according to the strategy corresponding to the parameter transmission mode; Wherein, the parameter transmission mode includes a repeated mode and a non-repeated mode; Each of the pressure-generating instances allocates and reads the task execution file according to the strategy corresponding to the parameter transmission mode, including: When the subtask adopts the repetitive mode, each of the compression instances reads the task execution file through a separate thread, and consumes the read content alternately through two queues; Each of the pressure-generating instances allocates and reads the task execution file according to the strategy corresponding to the parameter transmission mode, and further includes: When the subtask adopts the non-repetitive mode, the scheduling center adds the paths of multiple task execution file blocks to the designated queue, and each of the compression instances consumes and reads one task execution file block from the designated queue each time through a separate thread.

2. The file parameter transfer method according to claim 1, characterized in that: The configuration stress testing tasks include: In response to the user's operation, a new stress testing task is created, the stress testing interface corresponding to the stress testing task is configured, the parameter transfer file is uploaded to the file network disk, and the parameter transfer file is bound to the specified stress testing interface, and the parameter transfer mode of the stress testing interface is selected.

3. The file parameter transfer method according to claim 2, characterized in that: The configuration stress testing task also includes: The configuration information related to the stress testing task is saved to the database, wherein the related configuration information includes the stress testing interface arrangement information of the stress testing task, the information of each of the stress testing interfaces, the storage path of the parameter transfer file bound to the stress testing interface, and the parameter transfer mode of the stress testing interface.

4. The file parameter transmission method according to any one of claims 1 to 3, characterized in that: The arrangement rules of the stress testing interface include serial and parallel, and each group of serial interfaces corresponds to a subtask of the stress testing task.

5. The file parameter transfer method according to claim 4, characterized in that: The generated task execution file includes: When all the stress testing interfaces in a group of serial interfaces corresponding to the subtask adopt a repeated mode to transmit parameters, the subtask generates a task execution file in a repeated mode; When one or more of the stress testing interfaces in a group of serial interfaces corresponding to the subtask adopt a non-re-mode for parameter transmission, the subtask generates a plurality of task execution file blocks in a non-re-mode.

6. The file parameter transfer method according to claim 5, characterized in that: The subtask generates a task execution file in a repetitive mode, including: At the same time, traverse each of the parameter files corresponding to the group of serial interfaces, and each time a line is traversed, concatenate the read parameter value with the interface information, and output a line of formatted content in the order of the interface arrangement, and add it to the task execution file. If traversing to the end of the parameter file, traverse again from the beginning until the line number requirement of the task execution file is met and then exit the traversal. The line number requirement is determined by comparing the maximum number of lines of each parameter file corresponding to the group of serial interfaces with the preset default minimum number of lines, and taking the maximum value of the two.

7. The file parameter transfer method according to claim 5 or 6, characterized in that: The subtask uses a non-repetitive mode to generate multiple task execution file blocks, including: At the same time, each parameter file corresponding to the group of serial interfaces is traversed. After each line is traversed, the read parameter value is spliced ​​with the interface information, and a line of formatted content is output in the order of the interface arrangement, and accumulated into the task execution file. Among them, if the parameter file corresponding to the stress testing interface using the repeated mode is traversed to the end, it is traversed again from the beginning until the parameter file corresponding to any stress testing interface using the non-repetitive mode is traversed to the end and the traversal is exited.

8. The file parameter transfer method according to claim 7, characterized in that: The subtask adopts a non-repetitive mode to generate multiple task execution file blocks, and further comprises: During the traversal process, when the task execution file is accumulated to N lines, it switches to a new file to continue accumulating, and obtains multiple task execution file blocks, where N is a preset number of block lines.

9. The file parameter transfer method according to claim 1, characterized in that: The step of reading the task execution file through a separate thread and consuming the read content alternately through two queues includes: The stress testing instance maintains two queues A and B. The thread traverses the task execution file from the beginning, initially reads C line content and adds it to queue A, and then reads C line content and adds it to queue B; the stress testing execution thread group of the stress testing instance first consumes C line content from queue A, and when queue A is consumed, switches to queue B for consumption, and at the same time notifies the thread to continue traversing the stress testing execution file, reads C line content and adds it to queue A, and traverses again from the beginning when traversing to the end of the file, and consumes alternately in this way to execute the subtask.

10. The file parameter transfer method according to claim 1, characterized in that: Each of the pressure-generating instances consumes and reads one task execution file block from the designated queue through a separate thread each time, including: Each of the stress testing instances consumes the path of one task execution file block from the designated queue each time through a separate thread; reads the corresponding task execution file block from the file network disk according to the path and adds it to queue D; the stress testing execution thread group of the stress testing instance consumes the task execution file block from queue D and executes the corresponding task; when queue D is consumed, the path of the next task execution file block is consumed from the designated queue until the designated queue is consumed.

11. A file parameter transmission system, characterized in that: The system comprises: A stress testing platform, used to configure stress testing tasks and generate task execution files after starting the stress testing tasks, wherein the stress testing tasks correspond to a set of arranged stress testing interfaces, and the task execution files are generated according to preset rules based on the parameter transmission mode and the parameter transmission files bound to the stress testing interfaces; A scheduling center is used to schedule a corresponding number of pressure-generating instances according to user pressure requirements, and each of the pressure-generating instances allocates and reads the task execution file according to a strategy corresponding to the parameter transmission mode; Wherein, the parameter transmission mode includes a repeated mode and a non-repeated mode; The dispatch center is also used to: When the subtask adopts the repetitive mode, each of the compression instances reads the task execution file through a separate thread, and consumes the read content alternately through two queues; When the subtask adopts the non-repetitive mode, the scheduling center adds the paths of multiple task execution file blocks to the designated queue, and each of the compression instances consumes and reads one task execution file block from the designated queue each time through a separate thread.

12. A file parameter transmission method, applied to a dispatching center, characterized in that: The method comprises: Dispatch the corresponding number of pressure-generating instances according to user pressure requirements; Control each of the pressure-generating instances to allocate and read task execution files according to the strategy corresponding to the parameter transmission mode; Each of the pressure-generating instances allocates and reads the task execution file according to the strategy corresponding to the parameter transmission mode, including: When the subtask adopts the repetitive mode, each of the compression instances reads the task execution file through a separate thread, and consumes the read content alternately through two queues; Each of the pressure-generating instances allocates and reads the task execution file according to the strategy corresponding to the parameter transmission mode, and further includes: When the subtask adopts the non-repetitive mode, the scheduling center adds the paths of multiple task execution file blocks to the designated queue, and each of the compression instances consumes and reads one task execution file block from the designated queue each time through a separate thread.

13. A file parameter transmission device, characterized in that: The device comprises: The scheduling module is used to schedule the corresponding number of pressure-generating instances according to the user's pressure requirements; An execution module, used for controlling each of the pressure-generating instances to allocate and read task execution files according to a strategy corresponding to a parameter transmission mode; Wherein, the parameter transmission mode includes a repeated mode and a non-repeated mode; The execution module is also used for: When the subtask adopts the repetitive mode, each of the compression instances reads the task execution file through a separate thread, and consumes the read content alternately through two queues; When the subtask adopts the non-repetitive mode, the execution module adds the paths of multiple task execution file blocks to the specified queue, and each of the compression instances consumes and reads one task execution file block from the specified queue each time through a separate thread.

14. A computer device, characterized in that: The computer device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the file parameter transfer method as described in any one of claims 1 to 10 or 12.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the file parameter transfer method according to any one of claims 1 to 10 or 12 is implemented.