The content of the invention
For this purpose, the present invention provides a kind of distributed computing system of test index, on trying hard to solution or at least alleviate
At least one problem that face is present.
According to an aspect of the invention, there is provided a kind of distributed computing method of test index, the method is suitable to
Perform in loaded server, loaded server is arranged in the distributed computing system of test index, the system also includes scheduling
Server, the first calculation server, the second calculation server, the 3rd calculation server and data server, the method include step
Suddenly:Test assignment ID and test assignment information sent by dispatch server is received, wherein, dispatch server is according to test assignment
Task amount calculate the quantity of process to be launched and judge whether to start the second calculating service according to the quantity of process to be launched
Device, obtain the first judged result, choose further according to the first judged result complete loaded server needed for this test assignment, first
In calculation server, the second calculation server and the 3rd calculation server one or more, send test assignment ID to selected
The above-mentioned server for taking;It is course allocation Virtual User to be launched by pre-defined rule, is tested according to test assignment acquisition of information
Script, unlatching are tested and record test data;If the first judged result indicates that completing this test assignment does not need the second calculating to take
Business device, then send test data to the first calculation server with same test task ID, in real time so as to the first calculating service
Device calculates the first test index;If the first judged result indicates that completing this test assignment needs the second calculation server, in real time
Test data is sent to selected second calculation server, so that the second calculation server calculates the first test index and incites somebody to action
The first test index for calculating sends the first calculation server with same test task ID to;Send in real time test data to
The 3rd calculation server with same test task ID, so that the 3rd calculation server calculates the second test index and is surveying
Second test index is sent to data server after terminating by examination;And the quantity of Virtual User is sent to the first calculating service
The quantity of Virtual User and the first test index are sent to data, services by the first calculation server by device at predetermined time intervals
Device.
Alternatively, in the distributed computing method of test index of the invention, it is to be launched by pre-defined rule
The step of course allocation Virtual User, includes:The preferential maximum number of user allowed according to each process to be launched distributes virtual using
Family.
Alternatively, in the distributed computing method of test index of the invention, if the quantity of process to be launched is not
Higher than first threshold, then the first judged result is to start the second calculation server;And if the quantity of process to be launched
Higher than first threshold, then the first judged result is to need to start the second calculation server.
Alternatively, in the distributed computing method of test index of the invention, first threshold is 13.
Alternatively, in the distributed computing method of test index of the invention, the first test index includes:Click on
Number, error rate, process time, number of transactions per second, input and output speed, transaction time, number of transactions per second, affairs per second are total
Several, per second hits, number of responses per second, http number of responses per second, error number per second, it is per second mistake sum, error rate, it is per second into
Work(number of transactions, failure number of transactions per second, average handling time, minimum treat time, maximum process time, execution total degree, mistake
Lose total degree, successful total degree, alarm number, alarm rate.
Alternatively, in the distributed computing method of test index of the invention, the second test index is statistics class
The test index of type.
According to a further aspect in the invention, there is provided a kind of distributed computing method of test index, the method are suitable to
Perform in dispatch server, dispatch server is arranged in the distributed computing system of test index, the system also includes load
Server, the first calculation server, the second calculation server, the 3rd calculation server and data server, the method include step
Suddenly:The quantity for performing the process to be launched of the test assignment is calculated according to the task amount of test assignment;According to it is to be launched enter
The quantity of journey judges whether to start the second calculation server, obtains the first judged result;When the first judged result indicates to need
When starting the second calculation server, choose from the system and complete loaded server needed for this test assignment, first calculate clothes
Business device, the second calculation server and the 3rd calculation server;When the first judged result indicates to start the second calculating service
During device, choose from the system and complete loaded server needed for this test assignment, the first calculation server and the 3rd and calculate clothes
Business device;And test assignment ID is sent to selected server, and send test assignment information to selected load services
Device, performs this test assignment by loaded server, by test data be sent to the first calculation server, the second calculation server and
One or more in 3rd calculation server, calculate test index by these servers according to test data and are sent to data clothes
Business device.
Alternatively, in the distributed computing method of test index of the invention, system includes multiple load clothes
Business device and multiple second calculation servers, selecting step include:According to occupied resource on multiple loaded servers from high to low
Order choose the loaded server for completing needed for this test assignment;According to occupied resource on multiple second calculation servers from
High to Low order chooses the second calculation server completed needed for this test assignment.
Alternatively, in the distributed computing method of test index of the invention, according to the quantity of process to be launched
The step of judging whether to start the second calculation server, obtain the first judged result includes:If the quantity of process to be launched is not
Higher than first threshold, then the first judged result is to start the second calculation server;And if the quantity of process to be launched
Higher than first threshold, then the first judged result is to need to start the second calculation server.
Alternatively, in the distributed computing method of test index of the invention, first threshold is 13.
Alternatively, in the distributed computing method of test index of the invention, indicate to need in the first judged result
When starting the second calculation server, also include, the step of calculate the quantity of the second calculation server to be chosen:By to be launched
The quantity of process obtains the quantity of the second calculation server to be chosen divided by the first number.
Alternatively, in the distributed computing method of test index of the invention, also including step:Receive the system
The registration request of middle loaded server, the first calculation server, the second calculation server and the 3rd calculation server, records above-mentioned
The server ID of server;And obtain the occupation condition of above-mentioned registered server, and associate with its server ID and deposit
Storage.
Alternatively, in the distributed computing method of test index of the invention, after selecting step, send and survey
Before examination task ID gives selected server step, also including step:Detection is connected with selected above-mentioned server communication
It is whether normal;If the communication connection of any one above-mentioned server is abnormal, error code is returned, terminate test.
According to a further aspect in the invention, there is provided a kind of loaded server, it is arranged in the Distributed Calculation of test index
In system, the system also includes dispatch server, the first calculation server, the second calculation server, the 3rd calculation server, number
According to server, and it is connected with each other between each server, loaded server includes:Interface unit, is suitable to receive by dispatch server
Test assignment ID and test assignment information of transmission, wherein, dispatch server calculates to be launched according to the task amount of test assignment
The quantity of process simultaneously judges whether to start the second calculation server according to the quantity of the process to be launched, obtains first and sentences
Disconnected result, choose further according to the first judged result complete loaded server needed for this test assignment, the first calculation server, the
In two calculation servers and the 3rd calculation server one or more, send test assignment ID to selected above-mentioned service
Device;Control unit, it is course allocation Virtual User to be launched to be suitable to by pre-defined rule;Test cell, is suitable to be appointed according to test
Business acquisition of information test script, unlatching are tested and record test data;Interface unit is further adapted for having indicated in the first judged result
When cost test assignment does not need the second calculation server, test data is sent in real time to same test task ID first
Calculation server, so that the first calculation server calculates the first test index, also, indicates to complete this survey in the first judged result
When trial business needs the second calculation server, test data is sent in real time to selected second calculation server, so as to second
Calculation server calculates the first test index and the first test index for calculating is sent to same test task ID the
One calculation server;Interface unit is further adapted for sending in real time test data to the with same test task ID the 3rd calculating service
Device, so that the 3rd calculation server calculates the second test index and the second test index is sent to data after test terminates
Server;Interface unit is further adapted for sending the quantity of Virtual User to the first calculation server, by the first calculation server every
The quantity of Virtual User and the first test index are sent to data server by the scheduled time.
Alternatively, in loaded server of the invention, control unit is further adapted for preferential to be launched according to each
The maximum number of user that process is allowed distributes Virtual User.
Alternatively, in loaded server of the invention, if the quantity of process to be launched is not higher than first threshold,
First judged result is to start the second calculation server;And if the quantity of process to be launched is higher than first threshold,
First judged result is to need to start the second calculation server.
Alternatively, in loaded server of the invention, first threshold is 13.
Alternatively, in loaded server of the invention, the first test index includes:Hits, error rate, process
Time, number of transactions per second, input and output speed, transaction time, number of transactions per second, affairs per second are total, hits per second,
It is number of responses per second, http number of responses per second, error number per second, mistake sum per second, error rate, successful transaction number per second, per second
Failure number of transactions, average handling time, minimum treat time, maximum process time, execution total degree, failure total degree, success
Total degree, alarm number, alarm rate.
Alternatively, in loaded server of the invention, the second test index is the test index of measurement type.
According to a further aspect in the invention, there is provided a kind of dispatch server, it is arranged in the Distributed Calculation of test index
In system, the system also includes loaded server, the first calculation server, the second calculation server, the 3rd calculation server, number
According to server, and it is connected with each other between each server, dispatch server includes:Computing unit, is suitable to appointing according to test assignment
Business amount calculates the quantity for performing the process to be launched of the test assignment;Judging unit, is suitable to the number according to process to be launched
Amount judges whether to start the second calculation server, obtains the first judged result;Control unit, is suitable to refer in the first judged result
Show when needing to start the second calculation server, choose from the system complete loaded server needed for this test assignment, first
Calculation server, the second calculation server and the 3rd calculation server, and, indicate to start second in the first judged result
During calculation server, choose from the system and complete loaded server needed for this test assignment, the first calculation server and the
Three calculation servers;Interface unit, be suitable to send test assignment ID to selected server, and send test assignment information to
Selected loaded server, performs this test assignment by loaded server, by test data be sent to the first calculation server,
One or more in second calculation server and the 3rd calculation server, are calculated according to test data by these servers and are tested
Index is sent to data server.
Alternatively, in dispatch server of the invention, system includes multiple loaded servers and multiple second
Calculation server, control unit are further adapted for:Choose according to occupied resource order from high to low on multiple loaded servers
Loaded server needed for cost test assignment;According to occupied resource order from high to low on multiple second calculation servers
Selection completes the second calculation server needed for this test assignment.
Alternatively, in dispatch server of the invention, judging unit be further adapted for process to be launched quantity not
During higher than first threshold, the first judged result is obtained for the second calculation server need not be started, in the quantity of process to be launched
During higher than first threshold, the first judged result is obtained for needing to start the second calculation server.
Alternatively, in dispatch server of the invention, first threshold is 13.
Alternatively, in dispatch server of the invention, control unit also includes computation subunit, computation subunit
It is suitable to be calculated the quantity of the second calculation server to be chosen by the quantity of process to be launched divided by the first number.
Alternatively, in dispatch server of the invention, interface unit is further adapted for receiving load services in the system
The registration request of device, the first calculation server, the second calculation server and the 3rd calculation server and it is suitable to obtain and above-mentioned notes
The occupation condition of volume server;Dispatch server also includes memory element, is suitable to store the server ID of above-mentioned server,
And with by the occupation condition associated storage of server ID and the server.
Alternatively, in dispatch server of the invention, control unit is further adapted for detecting and above-mentioned clothes to be allocated
Whether the communication connection of business device is normal, if the communication connection of any one above-mentioned server is abnormal, returns error code, terminates surveying
Examination.
According to a further aspect in the invention, there is provided a kind of distributed computing system of test index, including:As mentioned above
Loaded server;Dispatch server as above;First calculation server, is suitable to be not higher than in the quantity of process to be launched
During first threshold, receive the test data by loaded server transmission and the first test index is calculated according to test data, also fit
When the quantity in process to be launched is higher than first threshold, the first test index calculated by the second calculation server is received, also
It is suitable to receive the quantity of the Virtual User sent by loaded server and at predetermined time intervals by the quantity of Virtual User and first
Test index is sent to data server in the lump;Second calculation server, it is higher than the first threshold to be suitable in the quantity of process to be launched
During value, receive the test data that sent by loaded server and calculate the first test index and send the first calculation server to;
3rd calculation server, is suitable to reception by the test data of loaded server transmission and calculates the second test index, testing
The second test index is sent to into data server after end;And data server, it is suitable to receive by the first calculation server
The first test index for sending and the 3rd test index sent by the 3rd calculation server.
The distributed computing system of test index of the invention, can ad infinitum extend generation according to Virtual User amount
Second calculation server, processes the data of million ranks.Also, calculate to be launched by dispatch server according to test assignment amount
The quantity of process, the service condition in conjunction with resource on each server choose all kinds of services for completing that this test assignment needs
Device, only can just extend the second calculation server when the quantity of process to be launched is more than first threshold, it is to avoid because unlimited
Extend the second calculation server and cause the wasting of resources.
Specific embodiment
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although showing the disclosure in accompanying drawing
Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure and should not be by embodiments set forth here
Limited.On the contrary, there is provided these embodiments are able to be best understood from the disclosure, and can be by the scope of the present disclosure
Complete conveys to those skilled in the art.
Fig. 1 shows the distributed computing system 100 of the test index of illustrative embodiments of the invention
Schematic diagram.The system 100 includes that dispatch server 110, loaded server 120, the first calculation server 130, second are calculated
Server 140, the 3rd calculation server 150 and data server 160.It should be pointed out that the system 100 in Fig. 1 is only exemplary
, in specific practice situation, in system 100, there can be the server of varying number, specifically, varying number can be arranged
Loaded server 120, the first calculation server 130, the second calculation server 140, the 3rd calculation server 150, even
Multiple dispatch servers 110, data server 160, the present invention are not done to the number of various servers included in system 100
Limit.It is also possible to according to practical situation, by configuring the configuration file of the server in system 100, by server configures
Into any of the above server.
According to a kind of embodiment, when stress test is carried out, the pressure for initiating how many magnitudes is grasped by tester, adjust
Degree server 110 receives the test request that tester initiates, and (such as tests selection region according to the task amount of test assignment
Point, test assignment number, Virtual User quantity etc.) and system 100 on each server resource service condition, distribute this survey
All kinds of servers of examination required by task.
After process instance on every loaded server is initialized, and the resource such as storage allocation, CPU, loaded server
The access operation of 120 analog subscribers, initiation pressure test.
First calculation server 130, the second calculation server 140, the 3rd calculation server 150 are respectively used to collect calculating
The test index of stress test.According to one embodiment of present invention, 1 the first calculation server 130 is arranged within system 100
With 1 the 3rd calculation server 150, it is respectively used to calculate the different test indexs of stress test;Meanwhile, arrangement multiple stage second is counted
Server 140 is calculated, as the standby server of the first calculation server 130, when the test assignment amount of stress test is very huge,
1 the first calculation server 130 cannot process so huge data volume, will start the second calculation server of multiple stage 140
The first calculation server 130 is assisted to complete the calculating of test index.
Data server 160 is used for collecting all kinds of test indexs for being calculated, and finally pushes away its (by background server)
Give tester.
System 100 is described in detail below in the interaction flow for carrying out each server when test index is calculated, such as Fig. 2 shows
The interaction figure for carrying out the Distributed Calculation of test index within system 100 according to an embodiment of the invention is gone out.
In step s 201, when loaded server 120, the first calculation server 130, the second calculation server 140 and
During three calculation servers, 150 first time access system 100, registration request is sent to dispatch server 110.
In step S202, dispatch server 110 receives registration request, records the server ID of above-mentioned server.
In step S203, dispatch server 110 (includes according to the resource that registered server ID obtains above-mentioned server
Whole resources, idling-resource, use resource) occupancy situation, and with its server ID associated storage.Appoint test is subsequently completed
In the step of business, dispatch server 110 can choose corresponding server by server ID.
Alternatively, dispatch server 110 records the resource occupation feelings on server by the process ID of labelling server
Condition.
When tester initiates to carry out the instruction of stress test, in step S204, dispatch server 110 is according to test
The task amount (test selection region point, test assignment number, Virtual User quantity etc.) of task is calculated for performing the test
The quantity of the process to be launched of task.Illustrated with a simply example, if tester indicates that Virtual User number is 1000 empty
Intend user, if a process can run 200 Virtual User on loaded server, then, the quantity of process to be launched is exactly 5.
Subsequently in step S205, dispatch server 110 judges whether to start second according to the quantity of process to be launched
Calculation server 140, obtains the first judged result.
According to the embodiment of the present invention, if the quantity of process to be launched is not higher than first threshold, the first judged result
For the second calculation server 140 need not be started;If the quantity of process to be launched is higher than first threshold, the first judged result is
Need to start the second calculation server 140.Wherein, first threshold is 13.That is, when the quantity of process to be launched is in 1-13
Between when, judge that the data volume of this test assignment is not very big, it is not necessary to which extra to start the second calculation server 140 auxiliary
Help calculating test index;Conversely, when the quantity of process to be launched is more than 13, judge that the data volume of this test assignment is very big,
Need to start the second calculation server 140 to aid in calculating test index.
In subsequent step S206, according to the occupation condition on each server in system 100 (see step S201-
Step S203) choose the various servers completed needed for this test assignment.Two kinds of situations are segmented into according to the first judged result
Consider:
When the first judged result indicates to need to start the second calculation server 140, the second calculating clothes to be chosen are calculated
The quantity of business device 140, i.e. the second calculation server to be chosen is obtained divided by the first number by the quantity of process to be launched
Quantity.Alternatively, the first number is 7.The quantity of hypothesis counted process to be launched in step S204 is 26,26 ÷, 7 ≈
3.7, then the quantity of the second calculation server is 4.
Choose from the system 100 complete loaded server 120 needed for this test assignment, the first calculation server 130,
When the second calculation server 140 and three calculation servers 150, embodiments in accordance with the present invention, 130 He of the first calculation server
3rd calculation server 150 directly can be chosen;According to the order choosing from high to low of occupied resource on multiple loaded servers
Take the loaded server 120 needed for cost test assignment;According to occupied resource on multiple second calculation servers from height to
Low order chooses the second calculation server 140 completed needed for this test assignment.
Another kind of situation, when the first judged result indicates to start the second calculation server 140, from the system
Choose in 100 and complete loaded server 120 needed for this test assignment, the first calculation server 130 and the 3rd calculation server
150.Similarly, the first calculation server 130 and the 3rd calculation server 150 directly can be chosen;According to multiple load services
On device, occupied resource order from high to low chooses the loaded server 120 completed needed for this test assignment.
According to a kind of implementation, if there is multiple first calculation servers 130 or the multiple 3rd to calculate service in system 100
Device 150, then the order selection first according to occupied resource on the first calculation server or the 3rd calculation server from high to low
Individual first calculation server 130 or first the 3rd calculation server.
According to a kind of implementation, if tester indicates to initiate concurrent test in Beijing-UNICOM, according to the instruction only
It is ranked up in the respective server for be arranged in Beijing area, chooses server.
Subsequently in step S207, dispatch server 110 sends test assignment ID to selected above-mentioned server, concurrently
Test assignment information is sent to selected loaded server 120.It should be noted that as dispatch server 110 is not necessarily intended to
Test assignment ID is sent to the second calculation server 140, therefore in fig. 2, is represented by dotted lines dispatch server 110 and is calculated to second
Server 140 sends test assignment ID.
Subsequently in step S208, the loaded server 120 of test assignment ID and test assignment information is received by predetermined
Rule be course allocation Virtual User to be launched, alternatively, by pre-defined rule be course allocation Virtual User to be launched just
It is that the preferential maximum number of user allowed according to each process to be launched distributes Virtual User.For example, dispatch server 110 is chosen
3 loaded servers 120, in order sequence are respectively labeled as:Loader0, Loader1, Loader2, wherein, Loader0
Middle idle resource (process) is minimum, then when Virtual User is distributed, first virtual for the course allocation in Loader0 in order
User, it is, the process for distributing Virtual User on the front is all full-load run, last process is according to the individual of Virtual User
Number is possibly fully loaded with or is not full-load run.
After all Virtual User are all distributed, loaded server 120 is opened according to test assignment acquisition of information test script
Open and test and record test data.Alternatively, the access operation of the simulation of loaded server 120 Virtual User, initiates request.
Subsequently in step S209, loaded server 120 is sent to the first calculating service after test data is simply converged
One or more in device 130, the second calculation server 140, the 3rd calculation server 150.
Step S206 is corresponded to, step S209 is also classified into two kinds of situations, as described below:
In step S2092, if completing this test assignment needs the second calculation server 140, loaded server 120 is real
When send test data to selected second calculation server 140.Embodiments in accordance with the present invention, the second calculation server
140 have multiple, and loaded server process only sends test data to a second calculation server process, and one second
Calculation server process can receive the test data of multiple loaded server processes.
Subsequently in step S20922, the second calculation server 140 calculates the first test index according to test data.It is optional
Ground, the first test index include:When hits, error rate, process time, number of transactions per second, input and output speed, issued transaction
Between, number of transactions per second, affairs per second are total, hits per second, number of responses per second, http number of responses per second, error number per second, every
Second wrong sum, error rate, successful transaction number per second, unsuccessfully number of transactions per second, average handling time, minimum treat time, most
Big process time, execution total degree, failure total degree, successful total degree, alarm number, alarm rate.
Subsequently in step S20924, the second calculation server 140 sends the first test index for calculating with phase to
With the first calculation server 130 of test assignment ID.
In the case of another kind, in step S2094, if completing this test assignment does not need the second calculation server 140,
Loaded server 120 sends test data in real time to the first calculation server 130 with same test task ID.
Subsequently in step S20942, the first calculation server 130 calculates the first test index according to test data.
In step S210, loaded server 120 sends test data in real time to the with same test task ID the 3rd
Calculation server 150.
Subsequently in step S211, the 3rd calculation server 150 calculates the second test index according to test data.According to this
Inventive embodiment, the second test index are the test indexs of measurement type.Alternatively, calculated according to various transaction times
The indexs such as 90% transaction time, 99% transaction time, the variance of transaction time.
Subsequently in step S212, loaded server 120 sends the quantity of Virtual User to the first calculation server 130.
Subsequently in step S213, the first calculation server 130 at predetermined time intervals (e.g., 1000ms) by Virtual User
Quantity and the first test index are sent to data server 160.
In step S214, after test terminates, the second test index is sent to data, services by the 3rd calculation server 150
Device 160.
An embodiment of the invention, after above-mentioned steps S206 have been performed, before execution step S207, adjusts
Degree server 110 can first detect to be connected whether normally (e.g., send HTTP connection requests) with selected above-mentioned server communication,
If the communication connection of any one above-mentioned server is abnormal, error code is returned, dispatch server 110 terminates test.
According to foregoing description, the distributed computing system 100 of the test index of the present invention, can according to Virtual User amount without
The extension of limit ground generates the second calculation server 140, processes the data of million ranks.Also, by dispatch server 110 according to survey
The quantity of trial business amount calculating process to be launched, the service condition in conjunction with resource on each server are chosen and complete this test times
All kinds of servers that business needs, only can just extend the second calculation server when the quantity of process to be launched is more than first threshold
140, it is to avoid cause the wasting of resources because of the second calculation server of infinite expanding 140.
Fig. 3 shows the block diagram of loaded server according to an embodiment of the invention 120, as shown in figure 3, load services
Device 120 includes:Interface unit 122, control unit 124 and test cell 126.
Wherein, interface unit 122 is suitable to receive test assignment ID and the test assignment letter sent by dispatch server 110
Breath.The process for completing the loaded server 120 of this test assignment is chosen with regard to dispatch server 110, hereinbefore
Jing is discussed in detail, and is not repeated herein.
It is course allocation Virtual User to be launched that control unit 124 is suitable to by pre-defined rule.Alternatively, control unit
124 are suitable to the preferential maximum number of user allowed according to each process to be launched distributes Virtual User.
Test cell 126 is suitable to according to test assignment acquisition of information test script, and unlatching is tested and records test data.
Interface unit 122 is further adapted for indicating that completing this test assignment does not need the second calculation server in the first judged result
When 140, test data is sent in real time to the first calculation server 130 with same test task ID, so as to the first calculating clothes
Business device 130 calculates the first test index.
Interface unit 122 is further adapted for indicating that completing this test assignment needs the second calculation server in the first judged result
When 140, test data is sent in real time to selected second calculation server 140, so that the second calculation server calculates first
Test index simultaneously to the first test index for calculating is sent the first calculation server 130 with same test task ID.
According to the embodiment of the present invention, if the quantity of process to be launched is not higher than first threshold (in the present embodiment, the
One threshold value is for 13), then the first judged result is to start the second calculation server;And if the quantity of process to be launched is high
In first threshold, then the first judged result is to need to start the second calculation server.
Alternatively, the first test index includes:Hits, error rate, process time, number of transactions per second, input and output speed
Rate, transaction time, number of transactions per second, affairs per second are total, hits per second, number of responses per second, http number of responses per second,
Error number per second, mistake sum per second, error rate, successful transaction number per second, unsuccessfully number of transactions per second, average handling time, most
Little process time, maximum process time, execution total degree, failure total degree, successful total degree, alarm number, alarm rate.
Interface unit 122 is further adapted for sending in real time test data to the 3rd calculation server with same test task ID
150, so that the 3rd calculation server 150 calculates the second test index and after test terminates is sent to the second test index
Data server 160.
Alternatively, the second test index is the test index of measurement type.For example, calculated according to various transaction times
The indexs such as 90% transaction time, 99% transaction time, the variance of transaction time.
Interface unit 122 is further adapted for sending the quantity of Virtual User to the first calculation server 130, is calculated by first and is serviced
The quantity of Virtual User and the first test index are sent to data server to device 130 by (e.g., 1000ms) at predetermined time intervals
160。
Fig. 4 shows the block diagram of dispatch server according to an embodiment of the invention 110, as shown in figure 4, dispatch service
Device 110 includes:Computing unit 112, judging unit 114, control unit 116 and interface unit 118, in certain embodiments, adjust
Server 110 is spent in addition to said units, also including memory element 119.
Computing unit 112 is suitable to calculate the process to be launched for performing the test assignment according to the task amount of test assignment
Quantity.
Judging unit 114 is suitable to judge whether to start the second calculation server according to the quantity of counted process to be launched
140, obtain the first judged result.
Alternatively, judging unit 114 is further adapted for being not higher than first threshold (in the present embodiment in the quantity of process to be launched
In, when 13) first threshold is, the first judged result is obtained for the second calculation server 140 need not be started;In process to be launched
Quantity be higher than first threshold when, obtain the first judged result for need start the second calculation server 140.
Control unit 116 is suitable to when the first judged result indicates to need to start the second calculation server 140, from the system
Middle selection completes loaded server 120 needed for this test assignment, the first calculation server 130,140 and of the second calculation server
3rd calculation server 150.
According to a kind of embodiment, control unit 116 also includes computation subunit 1162, as shown in figure 4, computation subunit
1162 be suitable to by the quantity of process to be launched divided by the first number (in the present embodiment, the first number for 7) be calculated will
The quantity of the second calculation server 140 chosen.
Equally, control unit 116 is further adapted for indicating to start the second calculation server 140 in the first judged result
When, choose from the system and complete loaded server 110 needed for this test assignment, the first calculation server 130 and the 3rd meter
Calculate server 150.
According to a kind of implementation, system 100 includes multiple loaded servers 120 and multiple second calculation servers
140, control unit 116 is suitable to the order selection according to occupied resource on multiple loaded servers 120 from high to low and completes this
Loaded server 120 needed for test assignment, and according to occupied resource on multiple second calculation servers 140 from high to low
Order choose the second calculation server 140 for completing needed for this test assignment.
Interface unit 118 is suitable to send test assignment ID to selected server, and sends test assignment information to institute
The loaded server 120 of selection, performs this test assignment by loaded server 120, and test data is sent to the first calculating clothes
One or more in business device 130, the second calculation server 140 and the 3rd calculation server 150, by these servers according to survey
Examination data calculate test index and are sent to data server 160.
A kind of implementation of the invention, interface unit 118 are further adapted for receiving loaded server in the system 100
120th, the first calculation server 130, the registration request of the second calculation server 140 and the 3rd calculation server 150 and it is suitable to obtain
Take the occupation condition of above-mentioned registered server.
Alternatively, dispatch server 110 also includes memory element 119, is suitable to store the server ID of above-mentioned server, and
With by the occupation condition associated storage of server ID and the server.
According to still another embodiment of the invention, control unit 116 is further adapted for detecting and above-mentioned server communication to be allocated
Whether connection is normal, and for example, control unit 116 indicates that interface unit 118 coupled thereto sends HTTP connection requests to above-mentioned
Server, if the communication connection of any one above-mentioned server is abnormal, returns error code, terminates test.
It should be appreciated that in order to simplify the disclosure and help understand one or more in each inventive aspect, it is right above
The present invention exemplary embodiment description in, the present invention each feature be grouped together into sometimes single embodiment, figure or
In person's descriptions thereof.However, should the method for the disclosure be construed to reflect following intention:I.e. required for protection is sent out
The bright feature more features required than being expressly recited in each claim.More precisely, as the following claims
As book is reflected, inventive aspect is less than all features of single embodiment disclosed above.Therefore, it then follows concrete real
Thus the claims for applying mode are expressly incorporated in the specific embodiment, and wherein each claim itself is used as this
Bright separate embodiments.
Those skilled in the art should be understood the module of the equipment in example disclosed herein or unit or group
Part can be arranged in equipment as depicted in this embodiment, or alternatively can be positioned at and the equipment in the example
In one or more different equipment.Module in aforementioned exemplary can be combined as a module or be segmented in addition multiple
Submodule.
Those skilled in the art are appreciated that can be carried out adaptively to the module in the equipment in embodiment
Change and they are arranged in one or more different from embodiment equipment.Can be the module in embodiment or list
Unit or component are combined into a module or unit or component, and can be divided in addition multiple submodule or subelement or
Sub-component.In addition at least some in such feature and/or process or unit is excluded each other, can adopt any
Combination is disclosed to all features disclosed in this specification (including adjoint claim, summary and accompanying drawing) and so to appoint
Where all processes or unit of method or equipment are combined.Unless expressly stated otherwise, this specification (includes adjoint power
Profit is required, summary and accompanying drawing) disclosed in each feature can it is identical by offers, be equal to or the alternative features of similar purpose carry out generation
Replace.
The invention also discloses:
A4, the method as described in A3, wherein, first threshold is 13.
A5, the method as any one of A1-4, wherein, the first test index includes:Hits, error rate, process
Time, number of transactions per second, input and output speed, transaction time, number of transactions per second, affairs per second are total, hits per second,
It is number of responses per second, http number of responses per second, error number per second, mistake sum per second, error rate, successful transaction number per second, per second
Failure number of transactions, average handling time, minimum treat time, maximum process time, execution total degree, failure total degree, success
Total degree, alarm number, alarm rate.
A6, the method as any one of A1-5, wherein, the second test index is the test index of measurement type.
B9, the method as described in B7 or 8, wherein, judge whether to start the second calculating according to the quantity of process to be launched
Server, include the step of obtain the first judged result:If the quantity of process to be launched is not higher than first threshold, first judges
As a result it is to start the second calculation server;And if the quantity of process to be launched is higher than first threshold, first judges
As a result it is to need to start the second calculation server.
B10, the method as described in B9, wherein first threshold are 13.
B11, the method as any one of B7-10, wherein, indicate to start the second calculating clothes in the first judged result
During business device, also include, the step of calculate the quantity of the second calculation server to be chosen:By the quantity of process to be launched divided by
First number obtains the quantity of the second calculation server to be chosen.
B12, the method as any one of B7-11, also including step:Receive loaded server in the system, first
The registration request of calculation server, the second calculation server and the 3rd calculation server, records the server ID of above-mentioned server;
And obtain the occupation condition of above-mentioned registered server, and with its server ID associated storage.
B13, the method as any one of B7-12, wherein, after selecting step, send test assignment ID to institute
Before the server step of selection, also including step:Whether normal detection is connected with selected above-mentioned server communication;If appointing
The communication connection of one above-mentioned server is abnormal, then return error code, terminates test.
C16, the loaded server as described in C14 or 15, wherein, if the quantity of process to be launched is not higher than first threshold,
Then the first judged result is to start the second calculation server;And if the quantity of process to be launched is higher than first threshold,
Then the first judged result is to need to start the second calculation server.
C17, the loaded server as described in C16, wherein, first threshold is 13.
C18, the loaded server as any one of C14-17, wherein, the first test index includes:Hits, mistake
The rate of mistake, process time, number of transactions per second, input and output speed, transaction time, number of transactions per second, affairs per second are total, every
Second hits, number of responses per second, http number of responses per second, error number per second, mistake sum per second, error rate, successful thing per second
Business number, failure number of transactions per second, average handling time, minimum treat time, maximum process time, execution total degree, failure are total
Number of times, successful total degree, alarm number, alarm rate.
C19, the loaded server as any one of C14-18, wherein the second test index are the tests of measurement type
Index.
D22, the dispatch server as described in D20 or 21, wherein,
The judging unit is further adapted for when the quantity of the process to be launched is not higher than first threshold, obtains the first judgement
As a result for the second calculation server need not be started, when the quantity of process to be launched is higher than first threshold, obtain the first judgement
As a result it is to need to start the second calculation server.
D23, the dispatch server as described in D22, wherein first threshold are 13.
D24, the dispatch server as any one of D20-23, wherein, control unit also includes computation subunit, meter
Operator unit is suitable to be calculated the second calculation server to be chosen by the quantity of process to be launched divided by the first number
Quantity.
D25, the dispatch server as any one of D20-24, wherein, interface unit is further adapted for receiving in the system
The registration request of loaded server, the first calculation server, the second calculation server and the 3rd calculation server and be suitable to obtain
The occupation condition of above-mentioned registered server;Dispatch server also includes memory element, is suitable to store above-mentioned server
Server ID, and with by the occupation condition associated storage of server ID and the server.
D26, the dispatch server as any one of D20-25, wherein, control unit be further adapted for detect with it is to be allocated
The connection of above-mentioned server communication it is whether normal, if the communication connection of any one above-mentioned server is abnormal, return error code,
Terminate test.
Although additionally, it will be appreciated by those of skill in the art that some embodiments described herein include other embodiments
In some included features rather than further feature, but the combination of the feature of different embodiments means in of the invention
Within the scope of and form different embodiments.For example, in the following claims, embodiment required for protection appoint
One of meaning can in any combination mode using.
Additionally, some heres in the embodiment be described as can be by the processor of computer system or by performing
The combination of method or method element that other devices of the function are implemented.Therefore, with for implementing methods described or method
The processor of the necessary instruction of element forms the device for implementing the method or method element.Additionally, device embodiment
Element described in this is the example of following device:The device is used for implementing by order to performed by implementing the element of the purpose of the invention
Function.
As used in this, unless specifically stated so, come using ordinal number " first ", " second ", " the 3rd " etc.
Description plain objects are merely representative of the different instances for being related to similar object, and are not intended to imply that the object being so described must
There must be the given order that the time is upper, spatially, in terms of sequence or in any other manner.
Although the present invention is described according to the embodiment of limited quantity, benefit from above description, the art
It is interior it is clear for the skilled person that in the scope of the present invention for thus describing, it can be envisaged that other embodiments.Additionally, it should be noted that
Language used in this specification primarily to the purpose of readable and teaching and select, rather than in order to explain or limit
Determine subject of the present invention and select.Therefore, in the case of without departing from the scope of the appended claims and spirit, for this
For the those of ordinary skill of technical field, many modifications and changes will be apparent from.For the scope of the present invention, to this
The done disclosure of invention is illustrative and not restrictive, and it is intended that the scope of the present invention be defined by the claims appended hereto.