Disclosure of Invention
The embodiment of the application provides a performance testing method, a performance testing device, network equipment and a computer readable storage medium, which can improve the capability of data diversification processing.
In a first aspect, an embodiment of the present application provides a performance testing method, including:
acquiring a data splitting request, wherein the data splitting request comprises data to be processed and a splitting scheme of the data to be processed;
splitting the data to be processed according to the splitting scheme to obtain N pieces of split data, wherein N is an integer greater than 1;
copying the split data to appointed paths of N load machines respectively;
adjusting a data reference path in the script to be run to the specified path to obtain an adjusted script;
and calling the N load machines, and respectively reading the split data from the designated path according to the adjusted script, so that the N load machines respectively perform performance tests according to the split data.
In some embodiments, the invoking N of the load machines, and reading the split data from the designated path according to the adjusted script respectively includes:
scheduling the adjusted scripts to the N load machines through a scheduling machine;
and calling N load machines, and respectively reading the split data from the specified path according to the adjusted script.
In some embodiments, before the adjusting the data reference path in the script to be executed to the specified path and obtaining the adjusted script, the method further includes:
acquiring a test scene type;
and determining the script to be operated from a preset script database according to the test scene type.
In some embodiments, after the obtaining the data split request, the method further comprises:
determining whether the number of preset load machines is not less than N;
the splitting the data to be processed according to the splitting scheme to obtain N split data, including:
and if the number of the preset load machines is not less than N, splitting the data to be processed according to the splitting scheme to obtain the N pieces of split data.
In some embodiments, after determining whether the preset number of load machines is not less than the number of data splits in the splitting scheme, the method further comprises:
and if the preset number of the load machines is less than N, sending out a reminding signal that the number of the load machines is insufficient.
In some embodiments, the splitting the to-be-processed data according to the splitting scheme to obtain N pieces of split data includes:
splitting the data to be split according to the splitting scheme to obtain N pieces of split data;
the respectively copying the split data to the designated paths of the N load machines includes: copying the split data and the non-split data to appointed paths of N load machines respectively;
the calling N load machines, respectively reading the split data from the designated path according to the adjusted script, so that the N load machines respectively perform performance tests according to the split data, including:
and calling the N load machines, and respectively reading the split data and the non-split data from the designated path according to the adjusted script, so that the N load machines respectively perform performance tests according to the split data and the non-split data.
In some embodiments, after the obtaining the data split request, the method further comprises:
determining whether the data length of the data to be split is larger than the shortest data length corresponding to the splitting scheme;
the splitting the data to be processed according to the splitting scheme includes:
and if the length of the data to be split is larger than the shortest data length, splitting the data to be split according to the splitting scheme.
In a second aspect, an embodiment of the present application further provides a performance testing apparatus, including:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a data splitting request which comprises to-be-processed data and a splitting scheme of the to-be-processed data;
the processing unit is used for splitting the data to be processed according to the splitting scheme to obtain N pieces of split data, wherein N is an integer greater than 1;
the copying unit is used for copying the split data to the appointed paths of the N load machines respectively;
the adjusting unit is used for adjusting the data reference path in the script to be run into the specified path to obtain an adjusted script;
and the reading unit is used for calling the N load machines, and respectively reading the split data from the designated path according to the adjusted script, so that the N load machines respectively perform performance tests according to the split data.
In some embodiments, the reading unit is specifically configured to:
scheduling the adjusted scripts to the N load machines through a scheduling machine;
and calling N load machines, and respectively reading the split data from the specified path according to the adjusted script.
In some embodiments, the adjusting unit is specifically configured to:
acquiring a test scene type;
and determining the script to be operated from a preset script database according to the test scene type.
In some embodiments, the apparatus further comprises:
a first determination unit configured to determine whether a preset number of load machines is not less than N;
at this time, the processing unit is specifically configured to:
and if the number of the preset load machines is not less than N, splitting the data to be processed according to the splitting scheme to obtain the N pieces of split data.
In some embodiments, the processing unit is further specifically configured to:
and if the preset number of the load machines is less than N, sending out a reminding signal that the number of the load machines is insufficient.
In some embodiments, the data to be processed includes data to be split and data to be split-free, and the processing unit is further specifically configured to:
splitting the data to be split according to the splitting scheme to obtain N pieces of split data;
the copy unit is specifically configured to: copying the split data and the non-split data to the designated paths of the load machine respectively;
at this time, the reading unit is specifically configured to:
and calling the N load machines, and respectively reading the split data and the non-split data from the designated path according to the adjusted script, so that the N load machines respectively perform performance tests according to the split data and the non-split data.
In some embodiments, the apparatus further comprises:
a second determining unit, configured to determine whether a data length of the data to be split is greater than a shortest data length corresponding to the splitting scheme;
at this time, the processing unit is specifically configured to:
and if the length of the data to be split is larger than the shortest data length, splitting the data to be split according to the splitting scheme.
In a third aspect, an embodiment of the present application further provides a network device, which includes a memory and a processor, where the memory stores a computer program, and the processor executes, when calling the computer program in the memory, any step in any performance testing method provided in the embodiment of the present application.
In a fourth aspect, the present application further provides a computer-readable storage medium, where the computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to perform the steps in any one of the performance testing methods provided by the present application.
In the embodiment of the application, a performance test device acquires a data splitting request, wherein the data splitting request comprises to-be-processed data and a splitting scheme of the to-be-processed data; then, according to the splitting scheme, splitting the data to be processed to obtain N pieces of split data, wherein N is an integer greater than 1; respectively copying the split data to the appointed paths of N load machines; adjusting a data reference path in the script to be run to the specified path to obtain an adjusted script; and finally, calling the N load machines, and respectively reading the split data from the designated path according to the adjusted script, so that the N load machines respectively perform performance tests according to the split data. The performance testing device in the scheme can split data, and can correctly acquire the split data and perform performance testing by modifying the script to be operated, so that the data diversification processing capacity can be improved.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the description that follows, specific embodiments of the present application will be described with reference to steps and symbols executed by one or more computers, unless otherwise indicated. Accordingly, these steps and operations will be referred to, several times, as being performed by a computer, the computer performing operations involving a processing unit of the computer in electronic signals representing data in a structured form. This operation transforms the data or maintains it at locations in the computer's memory system, which may be reconfigured or otherwise altered in a manner well known to those skilled in the art. The data maintains a data structure that is a physical location of the memory that has particular characteristics defined by the data format. However, while the principles of the application have been described in language specific to above, it is not intended to be limited to the specific form set forth herein, and it will be recognized by those of ordinary skill in the art that various of the steps and operations described below may be implemented in hardware.
The principles of the present application may be employed in numerous other general-purpose or special-purpose computing, communication environments or configurations. Examples of well known computing systems, environments, and configurations that may be suitable for use with the application include, but are not limited to, hand-held telephones, personal computers, servers, multiprocessor systems, microcomputer-based systems, mainframe-based computers, and distributed computing environments that include any of the above systems or devices.
The terms "first", "second", and "third", etc. in this application are used to distinguish between different objects and not to describe a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions.
Referring to fig. 1, fig. 1 is a schematic flow chart illustrating a performance testing method according to an embodiment of the present application. The execution main body of the performance testing method may be the performance testing apparatus provided in the embodiment of the present application, or a network device integrated with the performance testing apparatus, where the performance testing apparatus may be implemented in a hardware or software manner, and the network device may be a server in a performance testing platform, where the performance testing platform includes a server, a scheduler, and a load machine. The script running method can comprise the following steps:
101. the method comprises the steps of obtaining a data splitting request, wherein the data splitting request comprises data to be processed and a splitting scheme of the data to be processed.
In this embodiment, a server in a performance test platform obtains a data splitting request of a user, in some embodiments, the data to be processed includes data to be split, and in other embodiments, the data to be processed includes the data to be split and data to be not split.
In some embodiments, the splitting scheme in this embodiment may also be used to indicate which data in the data to be processed is to be split and which data is to-be-split data.
In some embodiments, the method further includes obtaining a test scenario type input by the user, and after obtaining the test scenario type, the server needs to store the data to be processed in the test scenario type for management, where the test scenario type is used to determine, from a preset scenario database, a type of a scenario to be executed for a subsequent loader to execute. The test scenario type includes a release scenario or a receiving scenario, and the specific type is not limited herein.
In some embodiments, the process of obtaining the data splitting request is specifically that a user uploads data to be processed to a corresponding test scenario type, and then the user sets an execution scheme on the server, where the execution scheme includes a number N of load machines (N is an integer greater than 1) required by the test and the data to be split in the data to be processed, where the number of required load machines corresponds to the number of split copies of the data to be split.
102. And splitting the data to be processed according to the splitting scheme to obtain N pieces of split data.
In this embodiment, after the server receives the splitting scheme and determines the data to be split in the data to be processed, the data to be processed is split according to the splitting scheme to obtain N pieces of split data, specifically, in some embodiments, the splitting scheme indicates that the data to be split is split averagely, at this time, the data lengths of the split data are the same, so that the workload balance of each subsequent running load machine can be ensured.
In some embodiments, after obtaining the data split request, the method further comprises: and determining whether the number of preset load machines is not less than N to determine whether the number of the load machines in the performance test platform is enough, and if so, splitting the data to be processed according to the splitting scheme to obtain the N split data. And if the preset number of the load machines is less than N, sending out a reminding signal that the number of the load machines is insufficient.
When the server needs to determine the load machines to be operated from the preset load machines according to the splitting scheme, the number of the load machines to be operated in this embodiment is N.
In some embodiments, after obtaining the data split request, the method further comprises: determining whether the data length of the data to be split is larger than the shortest data length corresponding to the splitting scheme; at this time, the splitting the to-be-processed data according to the splitting scheme includes: and if the length of the data to be split is larger than the shortest data length, splitting the data to be split according to the splitting scheme.
103. And copying the split data to the appointed paths of the N load machines respectively.
In this embodiment, the server copies the N pieces of split data to the designated paths of the N load machines, and at this time, each load machine stores one piece of split data.
In some embodiments, when the data to be processed includes the data to be split and the non-split data, at this time, in addition to copying the split data to the designated path of the loader, the non-split data needs to be completely copied to the designated path.
104. And adjusting the data reference path in the script to be run into an appointed path to obtain the adjusted script.
In this embodiment, after the split data (including the non-splitting data if the non-splitting data exists) is copied to the designated path of the load machine, in order to enable the subsequent load machine to read the data, the data reference path in the script to be run needs to be adjusted to the designated path of the load machine, so as to obtain the adjusted script. Namely, the server uniformly adjusts the reference path of the data file in the script to be operated into the appointed path of the data file on the load machine.
105. And calling the N load machines, and respectively reading the split data from the designated path according to the adjusted script, so that the N load machines respectively perform performance tests according to the split data.
Specifically, the server starts the proxy service of all the load machines to be operated, then uses the scheduling service of the scheduling machine to distribute the adjusted script to all the load machines to be operated, each load machine to be operated can read the split data and the split-free data from the appointed path of the load machine according to the adjusted script, and at the moment, each load machine to be operated can perform performance test according to the split data.
In some embodiments, the server in the application may further obtain only non-splitting data, then completely copy the non-splitting data to the designated paths of the load machines, modify the data reference path of the script to be executed as the designated path, and distribute the modified script to be executed to each load machine through the scheduling service of the scheduling machine, so that each load machine reads the non-splitting data from the local, and performs a performance test according to the non-splitting data.
In the embodiment of the application, a performance test device acquires a data splitting request, wherein the data splitting request comprises to-be-processed data and a splitting scheme of the to-be-processed data; then, according to the splitting scheme, splitting the data to be processed to obtain N pieces of split data, wherein N is an integer greater than 1; respectively copying the split data to the appointed paths of N load machines; adjusting a data reference path in the script to be run to the specified path to obtain an adjusted script; and finally, calling the N load machines, and respectively reading the split data from the designated path according to the adjusted script, so that the N load machines respectively perform performance tests according to the split data. The performance testing device in the scheme can split data, and can correctly acquire the split data and perform performance testing by modifying the script to be operated, so that the data diversification processing capacity can be improved.
The performance test method described in the above embodiments is further described in detail below.
Referring to fig. 2, fig. 2 is another flow chart of the performance testing method according to the embodiment of the present disclosure. The performance testing method can be applied to a performance testing platform, wherein the performance testing platform comprises a server, a scheduling machine and a load machine.
As shown in fig. 2, the flow of the performance testing method may be as follows:
201. the server acquires a data splitting request, wherein the data splitting request comprises data to be processed and a splitting scheme of the data to be processed.
In some embodiments, the splitting scheme of the data to be processed may be used to indicate which data in the data to be processed is data to be split, which data is data to be split free, and to indicate how many shares the data to be split in the data to be processed is split.
In some embodiments, specifically, the server may obtain the data to be processed first, and then obtain the splitting scheme of the data to be processed.
Referring to fig. 3, fig. 3 is an interface schematic diagram of a splitting scheme set by a user in this embodiment, where the number of load machines in an execution parameter is equal to the number of split copies of data to be split, and a data file is a file to be processed, where a file before "split data" in the file to be processed is the data to be split, and a file that is not hooked is splitting-free data, and when the user clicks a "ok" button, the data is uploaded to a server.
202. The server obtains the test scene type.
In this embodiment, the server may obtain a test scenario type input by the user, where the test scenario type is used to determine a type of a script to be executed for subsequent load machine execution. The test scenario type includes a release scenario or a receiving scenario, and the specific type is not limited herein.
After the server determines the test scenario type, the test data uploads the acquired data file (e.g., data split request) to the environment of the corresponding test scenario type.
As shown in fig. 4, fig. 4 is an interface schematic diagram of the embodiment in which a user determines a test scenario type, and after the user clicks an "execute" button on the interface, the subsequent steps of the present scheme are automatically executed, data to be split is split according to a splitting scheme, and a loader performs performance testing and the like according to the split data.
It should be noted that step 202 may also be executed before step 201, or may also be executed simultaneously with step 201, and the specific execution order is not limited herein.
In some embodiments, after obtaining the data split request, the method further comprises: determining whether the data length of the data to be split is larger than the shortest data length corresponding to the splitting scheme; at this time, the splitting processing is performed on the data to be processed according to the splitting scheme, which includes: and if the length of the data is larger than the shortest data length, splitting the data to be split according to a splitting scheme.
203. And the server determines the script to be run from a preset script database according to the type of the test scene.
In this embodiment, the performance test platform may store a plurality of script data, that is, a preset script database, where a corresponding relationship between the script and the test scenario type is also stored in the script database, and after the server obtains the test scenario type set by the user, the server determines the script to be run from the preset script database according to the test scenario type.
204. The server determines whether the preset number of load machines is not less than N, if not, step 205 is executed, and if not, step 210 is executed.
In this embodiment, each piece of split data needs to be operated by one load machine, so how many load machines need to be operated when data is split, and if it is determined according to the splitting scheme of the data to be processed that the data to be split needs to be split into N pieces, it is determined whether the preset number of load machines is not less than N, where N is an integer greater than 1.
205. And the server splits the data to be split in the data to be processed according to the splitting scheme to obtain N pieces of split data.
When the server determines that the number of the load machines is not less than the number of the data to be split, namely, the number of the load machines in the performance test platform is enough to provide the split data for operation, at this moment, the server performs splitting processing on the data to be split in the data to be processed according to the splitting scheme to obtain N pieces of split data.
In some embodiments, the server performs average splitting on the data to be split according to the splitting scheme indication, and at this time, the data lengths of the split data are the same, so that the workload of each subsequent running load machine can be guaranteed to be balanced.
206. And the server copies the split data and the non-split data to the appointed paths of the N load machines respectively.
The specified path of the load machine, that is, the read path of the data when the load machine needs to operate to read data at the back, may be a preset path or a path allocated to the server, and is not limited herein.
After the data to be split is split into N parts, the N parts of split data are respectively copied to the designated paths of the N load machines, and the non-split data are also respectively copied to the designated paths of the N load machines, at this time, each load machine has one part of split data and one part of complete non-split data, and the diversification of the data is realized.
In some embodiments, the N load machines may be predetermined by the server from the load machines preset by the performance testing platform after the server determines that the number of load machines is not less than the number of the data to be split, or randomly selected from the load machines preset by the performance testing platform when the server copies the data.
207. And the server adjusts the data reference path in the script to be run into an appointed path to obtain the adjusted script.
In order to ensure that the data is successfully quoted from the quote path of the load machine when the load machine quotes the data subsequently, at this time, the script to be run needs to be modified, and the quote path of the data in the script to be run is adjusted to be the designated path, so as to obtain the adjusted script.
208. And the server schedules the adjusted script to the N load machines through the scheduling machine.
In this embodiment, before the load machines need to operate, the server starts the N previously determined load machines, and then distributes the adjusted scripts to the N load machines through the scheduling machine, where each of the N load machines stores the adjusted script.
Specifically, the server sends a scheduling instruction to the scheduling machine, and then the scheduling machine schedules the adjusted script to the N load machines according to the scheduling instruction.
209. And the server calls the N load machines, and reads the split data and the non-split data from the designated path according to the adjusted script, so that the N load machines respectively perform performance tests according to the split data and the non-split data.
In this embodiment, the server sends an operation instruction to the N load machines, and the N load machines respectively read the split data and the non-split data from the designated path according to the adjusted script according to the operation instruction, so that the N load machines respectively perform performance tests according to the split data and the non-split data.
210. The server sends out reminding signals that the number of the load machines is not enough.
When the server determines that the number of the load machines is smaller than the number of the data to be split, the number of the load machines in the performance test platform is insufficient, and the test cannot be supported, so that the server sends out a reminding signal indicating that the number of the load machines is insufficient at the moment to remind a user to change the splitting scheme, or the number of the load machines in the platform is increased, so that the number of the load machines is enough to support the test.
For ease of understanding, a specific operational scenario is illustrated here:
referring to fig. 5, a user uploads two data files to a server, where one is client address data given by a client and the other is standard address data of a system, and the user submits a test execution scheme, i.e., a splitting scheme, to the server, and then the server determines whether the two data files need to be split according to the scheme, and splits the data files that need to be split, and then copies the split data to a specified path of a load machine, and directly and completely copies the data files that do not need to be split to the specified path of the load machine.
In the scenario, the client address data needs to be split, the standard address data does not need to be split, then the server modifies a reference path in a test script (i.e. a script to be run) into the specified path, then the test is executed, the script is distributed to each load machine through the scheduling machine, so that the load machine runs the test by using a local data file (i.e. data copied to the specified path of the load machine before) in the running test, wherein the load machine can detect whether the client address data is correct or not (the client address data matched with the address in the standard address data is correct data, otherwise, the client address data is incorrect data), and the client address data is divided into multiple parts to be distributed to a plurality of load machines for running, so that the working efficiency of the performance test platform can be improved.
In the embodiment of the application, a performance test device acquires a data splitting request, wherein the data splitting request comprises to-be-processed data and a splitting scheme of the to-be-processed data; then, according to the splitting scheme, splitting the data to be processed to obtain N pieces of split data, wherein N is an integer greater than 1; respectively copying the split data to the appointed paths of N load machines; adjusting a data reference path in the script to be run to the specified path to obtain an adjusted script; and finally, calling the N load machines, and respectively reading the split data from the designated path according to the adjusted script, so that the N load machines respectively perform performance tests according to the split data. The performance testing device in the scheme can split data, and can correctly acquire the split data and perform performance testing by modifying the script to be operated, so that the data diversification processing capacity can be improved.
In order to better implement the performance testing method provided by the embodiment of the present application, the embodiment of the present application further provides a device based on the performance testing method. The terms are the same as those in the performance test method, and specific implementation details can be referred to the description in the method embodiment.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a performance testing apparatus according to an embodiment of the present disclosure, in which the performance testing apparatus 600 may include an obtaining unit 601, a processing unit 602, a copying unit 603, an adjusting unit 604, a reading unit 605, and the like. Wherein:
an obtaining unit 601, configured to obtain a data splitting request, where the data splitting request includes to-be-processed data and a splitting scheme of the to-be-processed data;
a processing unit 602, configured to split the to-be-processed data according to the splitting scheme, so as to obtain N pieces of split data, where N is an integer greater than 1;
a copying unit 603, configured to copy the split data to designated paths of N load machines, respectively;
an adjusting unit 604, configured to adjust a data reference path in the script to be run to the specified path, so as to obtain an adjusted script;
a reading unit 605, configured to call the N load machines, and read the split data from the designated path according to the adjusted script, so that the N load machines respectively perform performance tests according to the split data.
In some embodiments, the reading unit 605 is specifically configured to:
scheduling the adjusted scripts to the N load machines through a scheduling machine;
and calling N load machines, and respectively reading the split data from the specified path according to the adjusted script.
In some embodiments, the adjusting unit 604 is specifically configured to:
acquiring a test scene type;
and determining the script to be operated from a preset script database according to the test scene type.
Referring to fig. 7, in some embodiments, the apparatus 600 further includes:
a first determining unit 606 for determining whether the preset number of load machines is not less than N;
at this time, the processing unit 602 is specifically configured to:
and if the number of the preset load machines is not less than N, splitting the data to be processed according to the splitting scheme to obtain the N pieces of split data.
In some embodiments, the processing unit 602 is further specifically configured to:
and if the preset number of the load machines is less than N, sending out a reminding signal that the number of the load machines is insufficient.
In some embodiments, the data to be processed includes data to be split and data to be split-free, and the processing unit 602 is further specifically configured to:
splitting the data to be split according to the splitting scheme to obtain N pieces of split data;
the copy unit is specifically configured to: copying the split data and the non-split data to the designated paths of the load machine respectively;
at this time, the reading unit 605 is specifically configured to:
and calling the N load machines, and respectively reading the split data and the non-split data from the designated path according to the adjusted script, so that the N load machines respectively perform performance tests according to the split data and the non-split data.
In some embodiments, the apparatus 600 further comprises:
a second determining unit 607, configured to determine whether the data length of the data to be split is greater than the shortest data length corresponding to the splitting scheme;
at this time, the processing unit 602 is specifically configured to:
and if the length of the data to be split is larger than the shortest data length, splitting the data to be split according to the splitting scheme.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
In this embodiment of the present application, an obtaining unit 601 obtains a data splitting request, where the data splitting request includes to-be-processed data and a splitting scheme of the to-be-processed data; then, the processing unit 602 performs splitting processing on the data to be processed according to the splitting scheme to obtain N split data, where N is an integer greater than 1; the copying unit 603 copies the split data to the designated paths of the N load machines respectively; the adjusting unit 604 adjusts the data reference path in the script to be run to the specified path to obtain an adjusted script; finally, the reading unit 605 calls the N load machines, and reads the split data from the designated path according to the adjusted script, so that the N load machines respectively perform performance tests according to the split data. The performance testing device in the scheme can split data, and can correctly acquire the split data and perform performance testing by modifying the script to be operated, so that the data diversification processing capacity can be improved.
Referring to fig. 8, embodiments of the present application provide a server 800, which may include one or more processors 801 of a processing core, one or more memories 802 of a computer-readable storage medium, a Radio Frequency (RF) circuit 803, a power source 804, an input unit 805, and a display unit 806. Those skilled in the art will appreciate that the server architecture shown in FIG. 8 is not meant to be limiting, and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the processor 801 is a control center of the server, connects various parts of the entire server using various interfaces and lines, and performs various functions of the server and processes data by running or executing software programs and/or modules stored in the memory 802 and calling data stored in the memory 802, thereby performing overall monitoring of the server. Alternatively, processor 801 may include one or more processing cores; preferably, the processor 801 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 801.
The memory 802 may be used to store software programs and modules, and the processor 801 executes various functional applications and data processing by operating the software programs and modules stored in the memory 802.
The RF circuit 803 may be used for receiving and transmitting signals during transmission and reception of information.
The server also includes a power source 804 (e.g., a battery) for powering the various components, which may preferably be logically connected to the processor 801 via a power management system to manage charging, discharging, and power consumption management functions via the power management system.
The server may also include an input unit 805, the input unit 805 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
The server may also include a display unit 806, and the display unit 806 may be used to display information input by or provided to the user and various graphical user interfaces of the server, which may be made up of graphics, text, icons, video, and any combination thereof. Specifically, in this embodiment, the processor 801 in the server loads the executable file corresponding to the process of one or more application programs into the memory 802 according to the following instructions, and the processor 801 runs the application programs stored in the memory 802, thereby implementing various functions as follows:
acquiring a data splitting request, wherein the data splitting request comprises data to be processed and a splitting scheme of the data to be processed;
splitting the data to be processed according to the splitting scheme to obtain N pieces of split data, wherein N is an integer greater than 1;
copying the split data to appointed paths of N load machines respectively;
adjusting a data reference path in the script to be run to the specified path to obtain an adjusted script;
and calling the N load machines, and respectively reading the split data from the designated path according to the adjusted script, so that the N load machines respectively perform performance tests according to the split data.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and parts that are not described in detail in a certain embodiment may refer to the above detailed description of the performance testing method, and are not described herein again.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, embodiments of the present application provide a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any of the performance testing methods provided by the embodiments of the present application. For example, the instructions may perform the steps of:
acquiring a data splitting request, wherein the data splitting request comprises data to be processed and a splitting scheme of the data to be processed;
splitting the data to be processed according to the splitting scheme to obtain N pieces of split data, wherein N is an integer greater than 1;
copying the split data to appointed paths of N load machines respectively;
adjusting a data reference path in the script to be run to the specified path to obtain an adjusted script;
and calling the N load machines, and respectively reading the split data from the designated path according to the adjusted script, so that the N load machines respectively perform performance tests according to the split data.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the computer-readable storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the computer-readable storage medium can execute the steps in any performance testing method provided in the embodiments of the present application, the beneficial effects that can be achieved by any performance testing method provided in the embodiments of the present application can be achieved, which are detailed in the foregoing embodiments and will not be described again here.
A performance testing method, a performance testing device, a network device, and a computer-readable storage medium provided in the embodiments of the present application are described in detail above, and a specific example is applied in the description to explain the principles and implementations of the present application, and the description of the embodiments is only used to help understand the method and core ideas of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.