CN108121660A - Concurrent testing method, device, storage medium and the equipment of flow engine - Google Patents

Concurrent testing method, device, storage medium and the equipment of flow engine Download PDF

Info

Publication number
CN108121660A
CN108121660A CN201711385002.7A CN201711385002A CN108121660A CN 108121660 A CN108121660 A CN 108121660A CN 201711385002 A CN201711385002 A CN 201711385002A CN 108121660 A CN108121660 A CN 108121660A
Authority
CN
China
Prior art keywords
request
logic step
logic
allocation strategy
concurrent
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201711385002.7A
Other languages
Chinese (zh)
Other versions
CN108121660B (en
Inventor
赵振国
刘作坤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Neusoft Corp
Original Assignee
Neusoft Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Neusoft Corp filed Critical Neusoft Corp
Priority to CN201711385002.7A priority Critical patent/CN108121660B/en
Publication of CN108121660A publication Critical patent/CN108121660A/en
Application granted granted Critical
Publication of CN108121660B publication Critical patent/CN108121660B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3644Software debugging by instrumenting at runtime
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals

Abstract

This disclosure relates to a kind of concurrent testing method of flow engine, device, storage medium and equipment, this method include:By the way that when carrying out concurrent test for the first processing logic, the concurrent corresponding logic step of n request is determined according to current allocation strategy;Whenever thering is any request in n request to perform to the corresponding logic step of any request, any request is buffered in the cache pool of the corresponding logic step of any request;When n request is buffered in the buffer pool of corresponding m logic step, the n request in the buffer pool of m logic step performs m logic step, obtains the corresponding concurrent test result of current allocation strategy;And above-mentioned steps are repeated, until the corresponding concurrent test result of all allocation strategies in predetermined allocation strategy set is obtained.It can realize the simulation of the actual conditions to the request of high concurrent flow, so as to find the actual capabilities problem, flow engine is optimized.

Description

Concurrent testing method, device, storage medium and the equipment of flow engine
Technical field
This disclosure relates to electronic technology field, and in particular, to a kind of concurrent testing method of flow engine, device are deposited Storage media and equipment.
Background technology
Flow engine is a complicated task processing and state machine, is related to flow processing operation and the stream of all kinds of complexity Journey handles logic, and usually a large amount of processing logics are in the case of high concurrent, it is easy to cause the blocking of flow engine, and then occur Improper running.Therefore, in the prior art, the test method of flow engine can be used and continues to increase concurrency, increased as far as possible There is the mode of concurrent probability, simulate the flow processing situation of high concurrent as far as possible, but since concurrent pressing machine is sent out The processing logic sent by the inside of network transmission process and flow engine circulation process, can due to network connection not freely with And the various blockings of engine internal, it can cause many logical paths that can not be modeled, also there is can not simulate real height simultaneously The problem of sending out flow request, can not carry out flow engine by concurrent test perfect.
The content of the invention
The purpose of the disclosure is to provide a kind of concurrent testing method of flow engine, device, storage medium and equipment, can Overcoming the problems, such as the flow request of high concurrent can not simulate.
To achieve these goals, the disclosure provides a kind of concurrent testing method of flow engine, the described method includes:
When carrying out concurrent test for the first processing logic, n concurrent request is determined according to current allocation strategy Corresponding logic step, the current allocation strategy are predetermined any distribution plan in allocation strategy set Slightly;
Whenever thering is any request in the n request to perform to the corresponding logic step of any request, by institute Any request is stated to be buffered in the cache pool of the corresponding logic step of any request;
When described n request is buffered in the buffer pool of corresponding m logic step, walked according to the m logic The n request in rapid buffer pool performs the m logic step, and it is corresponding concurrent to obtain the current allocation strategy Test result;
After using next allocation strategy in the allocation strategy set as the current allocation strategy, trigger again N concurrent request, and repeat the current allocation strategy of the basis and determine the concurrent corresponding logic of n request Step to it is described described n request be buffered in the buffer pool of corresponding m logic step when, according to the m logic The step of n request in the buffer pool of step performs the m logic step, until obtaining described predetermined point Until the corresponding concurrent test result of all allocation strategies in strategy set.
Optionally, the current allocation strategy of the basis determines the concurrent corresponding logic step of n request, bag It includes:
When receiving the i-th request in the n request, determine that described i-th please according to the current allocation strategy Corresponding logic step is sought, described i-th asks corresponding logic step as any logic step in the described first processing logic, I is less than or equal to n;
It is identified for the i-th request marks step, the step mark is used to indicate the corresponding logic step of i-th request Suddenly;
When receiving any request in n request again, i=i+1 is made, and is repeated described described when receiving During the i-th request in n request, the corresponding logic step of i-th request is determined most according to the current allocation strategy The i-th request marks step mark, the step mark is used to indicate the corresponding logic step of i-th request, until institute It states n request and has determined that corresponding logic step.
Optionally, it is described whenever there is any request in the n request to perform to the corresponding logic of any request During step, any request is buffered in the cache pool of the corresponding logic step of any request, including:
When the first request in described n request, which is performed, handles i-th of logic step in logic to described first, Determine whether i-th of logic step is the corresponding logic step of first request;
When i-th of logic step is the corresponding logic step of the first request, first request is intercepted, and Described first request is buffered in the buffer pool of i-th of logic step;
When i-th of logic step is not the corresponding logic step of the first request, according to the described first request I-th of logic step is performed, and makes i=i+1, performs performed when first asks to the described first processing logic again In i-th of logic step when, determine i-th of logic step whether be the corresponding logic step of first request step Suddenly, until the described first request is buffered in the buffer pool of corresponding logic step.
Optionally, first request when in described n request is performed to i-th in the described first processing logic During logic step, determine whether i-th of logic step is the corresponding logic step of first request, including:
When the first request in described n request, which is performed, handles i-th of logic step in logic to described first, Determine that i-th of step identifies whether to match with the step of the described first request;
When i-th of step is identified with the step of the described first request to be matched, determine that i-th of logic step is Described first asks corresponding logic step;
When i-th of step is identified with the step of the described first request to be mismatched, i-th of logic step is determined It is not the corresponding logic step of first request.
Optionally, before described n request is sent, the method further includes:
According to the k logic step included in described n request and the described first processing logic, institute is determined using enumerative technique The n all allocation strategies for requesting assignment to the k logic step are stated, and using all allocation strategies as described advance Definite allocation strategy set.
According to the second aspect of the embodiment of the present disclosure, a kind of concurrent test device of flow engine, described device bag are provided It includes:
Step determining module, for for first processing logic carry out concurrent test when, according to current allocation strategy Determine the concurrent corresponding logic step of n request, the current allocation strategy is predetermined allocation strategy collection Any allocation strategy in conjunction;
Request receiver module is performed to any request for any request in having described n to ask and corresponded to Logic step when, any request is buffered in the cache pool of the corresponding logic step of any request;
Execution module, for described n request be buffered in the buffer pool of corresponding m logic step when, according to The n request in the buffer pool of the m logic step performs the m logic step, obtains the current distribution The corresponding concurrent test result of strategy;
Module is repeated, for using next allocation strategy in the allocation strategy set as current point After strategy, n concurrent request is triggered again, and repeats the current allocation strategy of the basis and determines concurrent n Corresponding logic step is asked to be buffered in described in described n request in the buffer pool of corresponding m logic step When, in the buffer pool of the m logic step it is described n request perform the m logic step the step of, until must Until the corresponding concurrent test result of all allocation strategies in the predetermined allocation strategy set.
Optionally, the step determining module, including:
Logic step determination sub-module, for when receiving the i-th request in the n request, according to described current Allocation strategy determine the corresponding logic step of i-th request, the corresponding logic step of i-th request is at described first Any logic step in logic is managed, i is less than or equal to n;
Labeling submodule, for being identified for the i-th request marks step, the step mark is used to indicate described i-th Ask corresponding logic step;
Submodule is repeated, for when receiving any request in n request again, making i=i+1, and is repeated Described in performing when receiving the i-th request in the n request, determine that described i-th please according to the current allocation strategy The most described i-th request marks step mark of corresponding logic step is sought, the step mark is used to indicate i-th request pair The logic step answered, until described n request has determined that corresponding logic step.
Optionally, the request receiver module, including:
Step identifies submodule, is performed for working as the first request in the n request to the described first processing logic In i-th of logic step when, determine whether i-th of logic step is the corresponding logic step of first request;
Ask cache sub-module, for when i-th of logic step be it is described first ask corresponding logic step when, First request is intercepted, and the described first request is buffered in the buffer pool of i-th of logic step;
Submodule is repeated, is not the corresponding logic step of first request for working as i-th of logic step When, i-th of logic step is performed according to the described first request, and i=i+1 is made, it performs performed when first asks again To described first processing logic in i-th of logic step when, determine i-th of logic step whether be described first please The step of seeking corresponding logic step, until the described first request is buffered in the buffer pool of corresponding logic step.
Optionally, the step identification submodule, is used for:
When the first request in described n request, which is performed, handles i-th of logic step in logic to described first, Determine that i-th of step identifies whether to match with the step of the described first request;
When i-th of step is identified with the step of the described first request to be matched, determine that i-th of logic step is Described first asks corresponding logic step;
When i-th of step is identified with the step of the described first request to be mismatched, i-th of logic step is determined It is not the corresponding logic step of first request.
Optionally, described device further includes:
Allocation strategy determining module, for before described n request is sent, being asked and described first according to described n The k logic step included in processing logic determines that the n request assignment to the k logic step using enumerative technique All allocation strategies, and using all allocation strategies as the predetermined allocation strategy set.
The third aspect of the embodiment of the present disclosure provides a kind of computer readable storage medium, is stored thereon with computer journey Sequence, when the computer program is executed by processor the step of any one of realization first aspect the method.
The fourth aspect of the embodiment of the present disclosure, provides a kind of electronic equipment, including:
Computer readable storage medium described in the third aspect;And
One or more processor, for performing the computer program in the computer readable storage medium.
Concurrent testing method, device, storage medium and the equipment for the flow engine that the disclosure provides, by for first When handling logic progress concurrent test, the concurrent corresponding logic step of n request is determined according to current allocation strategy, The current allocation strategy is predetermined any allocation strategy in allocation strategy set;It is asked whenever there is described n In any request perform to it is described it is any request corresponding logic step when, by it is described it is any request be buffered in it is described it is any please In the cache pool for seeking corresponding logic step;It is buffered in described n request in the buffer pool of corresponding m logic step When, the n request in the buffer pool of the m logic step performs the m logic step, obtains described current The corresponding concurrent test result of allocation strategy;Using next allocation strategy in the allocation strategy set as described current Allocation strategy after, trigger concurrent n request again, and repeat the current allocation strategy of the basis determine it is concurrent N is asked corresponding logic step to the buffer pool that corresponding m logic step is buffered in described n request When middle, in the buffer pool of the m logic step it is described n request perform the m logic step the step of, up to Until obtaining the corresponding concurrent test result of all allocation strategies in the predetermined allocation strategy set.Therefore, originally Disclosure treats that n request all reaches it by intercepting and being buffered in the buffer pool of corresponding logic step by n concurrent request During corresponding step, then to this n corresponding logic step of request execution, it can avoid due to cannot caused by network transmission problems The problem of simulating real high concurrent flow request, so as to realize the simulation of the actual conditions to the request of high concurrent flow, So as to find the actual capabilities problem, flow engine is optimized.
Other feature and advantage of the disclosure will be described in detail in subsequent specific embodiment part.
Description of the drawings
Attached drawing is for providing further understanding of the disclosure, and a part for constitution instruction, with following tool Body embodiment is together for explaining the disclosure, but do not form the limitation to the disclosure.In the accompanying drawings:
Fig. 1 is the flow chart according to a kind of concurrent testing method of flow engine shown in an exemplary embodiment;
Fig. 2 is the flow chart according to the concurrent testing method of another flow engine shown in an exemplary embodiment;
Fig. 3 is the flow chart according to the concurrent testing method of another flow engine shown in an exemplary embodiment;
Fig. 4 is the flow chart according to the concurrent testing method of another flow engine shown in an exemplary embodiment;
Fig. 5 is the block diagram according to a kind of concurrent test device of flow engine shown in an exemplary embodiment;
Fig. 6 is the block diagram according to a kind of step determining module shown in an exemplary embodiment;
Fig. 7 is the block diagram according to a kind of request receiver module shown in an exemplary embodiment;
Fig. 8 is the block diagram according to the concurrent test device of another flow engine shown in an exemplary embodiment;
Fig. 9 is the block diagram according to a kind of electronic equipment shown in an exemplary embodiment.
Specific embodiment
The specific embodiment of the disclosure is described in detail below in conjunction with attached drawing.It should be appreciated that this place is retouched The specific embodiment stated is only used for describing and explaining the disclosure, is not limited to the disclosure.
Fig. 1 is according to a kind of flow chart of the concurrent testing method of flow engine shown in an exemplary embodiment, such as Fig. 1 It is shown, comprise the following steps:
Step 101, when carrying out concurrent test for the first processing logic, determined according to current allocation strategy concurrent The corresponding logic step of n request.
Illustratively, any processing logic in flow engine can include multiple steps, and each different processing is patrolled Collecting the multiple steps included can not also be identical, therefore before the test of flow engine is carried out, it is necessary first to surveying First processing logic of examination carries out the analysis of logic and included sub-step, determines wherein included per sub-steps and each Execution sequence relation between sub-steps.In the present embodiment, this n request is that the request of the first processing logic is sent Concurrent request (be simultaneously emitted by n request), that is, the first processing logic is carried out concurrently by n concurrent request Test.In the value of n, larger value, such as 1000 should be selected, so as to fulfill the simulation to actual high concurrent situation.
Wherein, current allocation strategy is predetermined any allocation strategy in allocation strategy set.That is, Predetermined allocation strategy set includes multiple allocation strategies.When once being tested, choose in allocation strategy set Any one allocation strategy n request is allocated, i.e. this n request is respectively allocated in the first processing logic and is wrapped On the logic step contained, when this n request goes to corresponding logic step, it will it is buffered in corresponding buffer pool, Be the equal of that n request is blocked pause to perform when going to corresponding logic step, be buffered in buffer pool In, that is, perform the operation of step 102.
Step 102, whenever thering is any request in n request to perform to the corresponding logic step of any request, will appoint One request is buffered in the cache pool of the corresponding logic step of any request.
Illustratively, when the value of n is 1000, the logic step number corresponding to the first processing logic is 4, and step When current allocation strategy selected by 101 distributes 250 requests for each logic step, this 1000 requests will perform To being cached respectively during corresponding logic step into the corresponding buffer pool of logic step, that is to say, that most patrolled at last each Collect 250 requests of buffering in the buffer pool of step.
Step 103, when n request is buffered in the buffer pool of corresponding m logic step, walked according to m logic N request in rapid buffer pool performs the m logic step, obtains the corresponding concurrent test knot of current allocation strategy Fruit.
Illustratively, after above-mentioned 1000 requests are buffered into corresponding buffer pool, for intercepting this 1000 The engine blocker of request will send messages to engine requests processor, can be with to illustrate that 1000 requests have been completed to cache The test concurrently performed.After engine requests processor receives above-mentioned message, 4 logic steps are buffered in by concurrently performing In 1000 request.
It should be noted that the engine requests blocker opens up when being tested exclusively for flow engine, in normal engine Under logic, which is pent.
Step 104, after using next allocation strategy in allocation strategy set as current allocation strategy, trigger again N concurrent request, and the operation of step 101- steps 103 is repeated, until obtaining predetermined allocation strategy set In the corresponding concurrent test result of all allocation strategies until.
Illustratively, multiple allocation strategies of n request are needed to complete one by one, thus repeat above-mentioned request caching with And the operation of request Concurrency, to obtain the concurrent test under all allocation strategies as a result, so as to according to all allocation strategies Concurrent test as a result, determine may result in the situation that flow engine goes wrong, so for the problem to flow engine into Row optimization.
In conclusion the disclosure provide flow engine concurrent testing method, by for first processing logic into During row concurrent test, the concurrent corresponding logic step of n request is determined according to current allocation strategy, n is a whenever having When any request in request is performed to any request corresponding logic step, it is corresponding that any request is buffered in any request In the cache pool of logic step;When n request is buffered in the buffer pool of corresponding m logic step, according to m logic N request in the buffer pool of step performs m logic step, obtains the corresponding concurrent test result of current allocation strategy; After using next allocation strategy in allocation strategy set as current allocation strategy, n concurrent request is triggered again, and It repeats until the corresponding concurrent test result of all allocation strategies in predetermined allocation strategy set is obtained. Therefore, by intercepting and being buffered in the buffer pool of corresponding logic step by n concurrent request, treat that n request all reaches When it corresponds to step, then to this n corresponding logic step of request execution, can avoid due to caused by network transmission problems not The problem of real high concurrent flow request can be simulated, so as to realize the mould of the actual conditions to the request of high concurrent flow Intend, so as to find the actual capabilities problem, flow engine is optimized.
Fig. 2 is according to the flow chart of the concurrent testing method of another flow engine shown in an exemplary embodiment, such as Shown in Fig. 2, the current allocation strategy of basis described in step 101 determines the concurrent corresponding logic step of n request, bag Include following steps:
Step 1011, when receiving the i-th request in n request, the i-th request pair is determined according to current allocation strategy The logic step answered.
Wherein, the corresponding logic step of the i-th request is any logic step in the first processing logic, and i is less than or equal to n。
Step 1012, identified for the i-th request marks step.
Wherein, step mark is used to indicate the corresponding logic step of the i-th request.
Step 1013, when receiving any request in n request again, i=i+1 is made, and repeats step The operation of 1011- steps 1012, until n request has determined that corresponding logic step.
Illustratively, will 1000 requests be carried out with the mark of counterlogic step successively by above-mentioned steps, so as in step In rapid 102, this 1000 requests are buffered in corresponding buffer pool.
Fig. 3 is according to the flow chart of the concurrent testing method of another flow engine shown in an exemplary embodiment, such as Shown in Fig. 3, described in step 102 whenever have n request in any request perform to it is any request corresponding logic step when, Any request is buffered in the cache pool of the corresponding logic step of any request, comprised the following steps:
Step 1021, when the first request in n request is performed to i-th of logic step in the first processing logic When, determine whether i-th of logic step is the corresponding logic step of the first request.
Illustratively, when the first request in n request, which is performed, handles i-th of logic step in logic to first, Determine that i-th of step identifies whether to match with the step of the first request.
According to the mark of mark the step of progress in above-mentioned steps 101, corresponding logic step matching is judged.When i-th When step is matched with mark the step of the first request, it is the corresponding logic step of the first request to determine i-th of logic step, is continued Perform step 1022;When mark is mismatched when i-th step is with the first request the step of, it is not the to determine i-th of logic step The corresponding logic step of one request, continues to execute step 1023.
When i-th of logic step is the corresponding logic step of the first request, step 1022 is performed, intercepts the first request, And the first request is buffered in the buffer pool of i-th of logic step.
When i-th of logic step is not the corresponding logic step of the first request, step 1023 is performed, according to the first request I-th of logic step is performed, and makes i=i+1, performs the judgement of step 1021 again, until the first request is buffered in correspondence Logic step buffer pool in.
Illustratively, it is assumed that the first request is marked on the 3rd logic step in a step 101, and above-mentioned steps can be: First, i=1, the first request determine that the first request is identified with the step of 1 logic step before the 1st logic step is performed And mismatch, therefore the 1st logic step is not the corresponding logic step of the first request, therefore first carry out the 1st logic step; It completes to make i=i+1 after the 1st logic step, i.e. i is 2, during to the 2nd logic step, determines the 2nd logic step also not It is the corresponding logic step of the first request, therefore performs the 2nd logic step again;It is 3 that i=i+1, i.e. i are made after completing, and is being held Before the 3rd logic step of row, determine that the 3rd logic step is matched with mark the step of the first request, therefore the 3rd logic Step be with the first corresponding logic step of request, therefore intercept first request, be buffered in the slow of the 3rd logic step It rushes in pond, completes this operation.1000 all requests carry out successively all in accordance with aforesaid operations, until this 1000 requests are equal Until in the buffer pool of corresponding logic step.
Fig. 4 is according to the flow chart of the concurrent testing method of another flow engine shown in an exemplary embodiment, such as Shown in Fig. 4, comprise the following steps:
Step 105, according to the k logic step included in n request and the first processing logic, n is determined using enumerative technique A all allocation strategies for requesting assignment to k logic step, and using all allocation strategies as predetermined allocation strategy Set.
Illustratively, step 101 it is concurrent n request before, also need determine allocation strategy combine, may be employed enumerative technique into Row permutation and combination enumerates all possible composite type, is determined as allocation strategy set, real so as to fulfill simulation as far as possible Border situation.
In conclusion the disclosure provide flow engine concurrent testing method, by for first processing logic into During row concurrent test, the concurrent corresponding logic step of n request is determined according to current allocation strategy, n is a whenever having When any request in request is performed to any request corresponding logic step, it is corresponding that any request is buffered in any request In the cache pool of logic step;When n request is buffered in the buffer pool of corresponding m logic step, according to m logic N request in the buffer pool of step performs m logic step, obtains the corresponding concurrent test result of current allocation strategy; After using next allocation strategy in allocation strategy set as current allocation strategy, n concurrent request is triggered again, and It repeats until the corresponding concurrent test result of all allocation strategies in predetermined allocation strategy set is obtained. Therefore, it is possible to realize the simulation of the actual conditions to the request of high concurrent flow, so as to find the actual capabilities problem, convection current Journey engine optimizes.
Fig. 5 is according to a kind of block diagram of the concurrent test device of flow engine shown in an exemplary embodiment, the device 500 can be used for performing any method of above-described embodiment, and referring to Fig. 5, which includes:
Step determining module 510, for for first processing logic carry out concurrent test when, according to current distribution plan Slightly determine the concurrent corresponding logic step of n request, current allocation strategy is predetermined allocation strategy set In any allocation strategy.
Request receiver module 520 performs logic corresponding to any request for any request in having n to ask During step, any request is buffered in the cache pool of the corresponding logic step of any request.
Execution module 530, for n request be buffered in the buffer pool of corresponding m logic step when, according to m N request in the buffer pool of a logic step performs m logic step, obtains the corresponding concurrent test of current allocation strategy As a result.
Module 540 is repeated, for using next allocation strategy in allocation strategy set as current distribution plan After slightly, n concurrent request is triggered again, and repeats and n concurrent request difference is determined according to current allocation strategy Corresponding logic is to when asking to be buffered in the buffer pool of corresponding m logic step for n, according to m logic step The step of n request in buffer pool performs m logic step, until obtaining all in predetermined allocation strategy set Until the corresponding concurrent test result of allocation strategy.
Fig. 6 is according to a kind of block diagram of step determining module shown in an exemplary embodiment, as shown in fig. 6, the step Determining module 510 includes:
Logic step determination sub-module 511, for when receive n request in i-th request when, according to current distribution Strategy determines the corresponding logic step of the i-th request, and the corresponding logic step of the i-th request is any logic in the first processing logic Step, i are less than or equal to n.
Labeling submodule 512, for being identified for the i-th request marks step, it is corresponding that step mark is used to indicate the i-th request Logic step.
Submodule 513 is repeated, for when receiving any request in n request again, making i=i+1, laying equal stress on It is multiple to perform when receiving the i-th request in n request, determine that the corresponding logic of the i-th request walks according to current allocation strategy Rapid most the i-th request marks step mark, step mark are used to indicate the corresponding logic step of the i-th request, until n request is equal Have determined that corresponding logic step.
Fig. 7 is according to a kind of block diagram of request receiver module shown in an exemplary embodiment, as shown in fig. 7, the request Cache module 520 includes:
Step identifies submodule 521, and the first request for working as in n request performs to first handle in logic the During i logic step, determine whether i-th of logic step is the corresponding logic step of the first request.
Cache sub-module 522 is asked, for when i-th of logic step is the corresponding logic step of the first request, intercepting First request, and the first request is buffered in the buffer pool of i-th of logic step.
Submodule 523 is repeated, for when i-th of logic step is not the corresponding logic step of the first request, root I-th of logic step is performed according to the first request, and makes i=i+1, performs performed when first asks to the first processing logic again In i-th of logic step when, the step of whether i-th logic step is the first request corresponding logic step determined, directly It is buffered in the first request in the buffer pool of corresponding logic step.
Optionally, step identification submodule 521, is used for:
When the first request in n request, which is performed, handles i-th of logic step in logic to first, i-th is determined A step identifies whether to match with the step of the first request.
When i-th of step is identified with the step of the first request to be matched, it is that the first request corresponds to determine i-th of logic step Logic step.
When i-th of step is identified with the step of the first request to be mismatched, it is not the first request to determine i-th of logic step Corresponding logic step.
Fig. 8 be according to the block diagram of the concurrent test device of another flow engine shown in an exemplary embodiment, referring to Fig. 8, the device 500 further include:
Allocation strategy determining module 550, for before n request is sent, being handled according to n request and first in logic Comprising k logic step, determine that n requests assignment to all allocation strategies of k logic step using enumerative technique, and by institute There is allocation strategy as predetermined allocation strategy set.
In conclusion the disclosure provide flow engine concurrent test device, by for first processing logic into During row concurrent test, the concurrent corresponding logic step of n request is determined according to current allocation strategy, n is a whenever having When any request in request is performed to any request corresponding logic step, it is corresponding that any request is buffered in any request In the cache pool of logic step;When n request is buffered in the buffer pool of corresponding m logic step, according to m logic N request in the buffer pool of step performs m logic step, obtains the corresponding concurrent test result of current allocation strategy; After using next allocation strategy in allocation strategy set as current allocation strategy, n concurrent request is triggered again, and It repeats until the corresponding concurrent test result of all allocation strategies in predetermined allocation strategy set is obtained. Therefore, it is possible to realize the simulation of the actual conditions to the request of high concurrent flow, so as to find the actual capabilities problem, convection current Journey engine optimizes.
Fig. 9 is the block diagram according to a kind of electronic equipment 900 shown in an exemplary embodiment.As shown in figure 9, the electronics is set Standby 900 can include:Processor 901, memory 902, multimedia component 903, input/output (I/O) interface 904, Yi Jitong Believe component 905.
Wherein, processor 901 is used to control the integrated operation of the electronic equipment 900, above-mentioned based on data to complete All or part of step in distribution method.Memory 902 is used to store various types of data to support in the electronic equipment 900 operation, these data can for example be included for any application program for being operated on the electronic equipment 900 or method Instruction and the relevant data of application program, such as contact data, the message of transmitting-receiving, picture, audio, video etc..This is deposited Reservoir 902 can realize by any kind of volatibility or non-volatile memory device or combination thereof, for example, it is static with Machine access memory (Static Random Access Memory, abbreviation SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, abbreviation EEPROM), erasable programmable Read-only memory (Erasable Programmable Read-Only Memory, abbreviation EPROM), programmable read only memory (Programmable Read-Only Memory, abbreviation PROM), and read-only memory (Read-Only Memory, referred to as ROM), magnetic memory, flash memory, disk or CD.Multimedia component 903 can include screen and audio component.Wherein Screen for example can be touch-screen, and audio component is for output and/or input audio signal.For example, audio component can include One microphone, microphone are used to receive external audio signal.The received audio signal can be further stored in storage Device 902 is sent by communication component 905.Audio component further includes at least one loud speaker, for exports audio signal.I/O Interface 904 provides interface between processor 901 and other interface modules, other above-mentioned interface modules can be keyboard, mouse, Button etc..These buttons can be virtual push button or entity button.Communication component 905 is for the electronic equipment 900 and other Wired or wireless communication is carried out between equipment.Wireless communication, such as Wi-Fi, bluetooth, near-field communication (Near Field Communication, abbreviation NFC), 2G, 3G or 4G or they one or more of combination, therefore corresponding communication Component 905 can include:Wi-Fi module, bluetooth module, NFC module.
In one exemplary embodiment, electronic equipment 900 can be by one or more application application-specific integrated circuit (Application Specific Integrated Circuit, abbreviation ASIC), digital signal processor (Digital Signal Processor, abbreviation DSP), digital signal processing appts (Digital Signal Processing Device, Abbreviation DSPD), programmable logic device (Programmable Logic Device, abbreviation PLD), field programmable gate array (Field Programmable Gate Array, abbreviation FPGA), controller, microcontroller, microprocessor or other electronics member Part is realized, for performing the above-mentioned distribution method based on data.
In a further exemplary embodiment, a kind of computer readable storage medium including program instruction, example are additionally provided Such as include the memory 902 of program instruction, above procedure instruction can be performed by the processor 901 of electronic equipment 900 in completion The distribution method based on data stated.
The preferred embodiment of the disclosure is described in detail above in association with attached drawing, still, the disclosure is not limited to above-mentioned reality The detail in mode is applied, in the range of the technology design of the disclosure, a variety of letters can be carried out to the technical solution of the disclosure Monotropic type, these simple variants belong to the protection domain of the disclosure.
It is further to note that the specific technical features described in the above specific embodiments, in not lance In the case of shield, it can be combined by any suitable means.In order to avoid unnecessary repetition, the disclosure to it is various can The combination of energy no longer separately illustrates.
In addition, it can also be combined between a variety of embodiments of the disclosure, as long as it is without prejudice to originally Disclosed thought should equally be considered as disclosure disclosure of that.

Claims (10)

1. a kind of concurrent testing method of flow engine, which is characterized in that the described method includes:
When carrying out concurrent test for the first processing logic, n concurrent request difference is determined according to current allocation strategy Corresponding logic step, the current allocation strategy are predetermined any allocation strategy in allocation strategy set;
Whenever thering is any request in the n request to perform to the corresponding logic step of any request, described it will appoint One request is buffered in the cache pool of the corresponding logic step of any request;
When described n request is buffered in the buffer pool of corresponding m logic step, according to the m logic step The n request in buffer pool performs the m logic step, obtains the corresponding concurrent test of the current allocation strategy As a result;
After using next allocation strategy in the allocation strategy set as the current allocation strategy, triggering is concurrent again N request, and repeat the current allocation strategy of the basis and determine that concurrent n is asked corresponding logic step To described when described n request is buffered in the buffer pool of corresponding m logic step, according to the m logic step Buffer pool in n request the step of performing the m logic step, up to obtaining the predetermined distribution plan Until the corresponding concurrent test result of all allocation strategies in slightly gathering.
2. according to the method described in claim 1, it is characterized in that, the current allocation strategy of the basis determines concurrent n Corresponding logic step is asked, including:
When receiving the i-th request in the n request, i-th request pair is determined according to the current allocation strategy The logic step answered, described i-th asks corresponding logic step, and for any logic step in the described first processing logic, i is small In or equal to n;
It is identified for the i-th request marks step, the step mark is used to indicate the corresponding logic step of i-th request;
When receiving any request in n request again, i=i+1 is made, and is repeated described a when receiving the n During the i-th request in request, determine that the corresponding logic step of i-th request is most described according to the current allocation strategy I-th request marks step identifies, and the step mark is used to indicate the corresponding logic step of i-th request, until the n Request has determined that corresponding logic step.
3. according to the method described in claim 2, it is characterized in that, any request in having described n to ask is held During row to the corresponding logic step of any request, any request is buffered in the corresponding logic of any request and is walked In rapid cache pool, including:
When the first request in described n request, which is performed, handles i-th of logic step in logic to described first, determine Whether i-th of logic step is the corresponding logic step of first request;
When i-th of logic step be described first ask corresponding logic step when, intercept first request, and by institute The first request is stated to be buffered in the buffer pool of i-th of logic step;
When i-th of logic step is not the corresponding logic step of the first request, performed according to the described first request I-th of logic step, and i=i+1 is made, it performs performed when first asks into the described first processing logic again During i-th of logic step, the step of whether i-th of logic step is the first request corresponding logic step determined, Until the described first request is buffered in the buffer pool of corresponding logic step.
4. according to the method described in claim 3, it is characterized in that, first request when in described n request performs extremely It is described first processing logic in i-th of logic step when, determine i-th of logic step whether be it is described first request Corresponding logic step, including:
When the first request in described n request, which is performed, handles i-th of logic step in logic to described first, determine I-th of step identifies whether to match with the step of the described first request;
When i-th of step is identified with the step of the described first request to be matched, determine that i-th of logic step is described The corresponding logic step of first request;
When i-th of step is identified with the step of the described first request to be mismatched, determine that i-th of logic step is not Described first asks corresponding logic step.
5. according to claim 1-4 any one of them methods, which is characterized in that before described n request is sent, the side Method further includes:
According to the k logic step included in described n request and the described first processing logic, the n is determined using enumerative technique A all allocation strategies for requesting assignment to the k logic step, and using all allocation strategies as described true in advance Fixed allocation strategy set.
6. the concurrent test device of a kind of flow engine, which is characterized in that described device includes:
Step determining module, for when carrying out concurrent test for the first processing logic, being determined according to current allocation strategy The concurrent corresponding logic step of n request, the current allocation strategy are predetermined in allocation strategy set Any allocation strategy;
Request receiver module is performed to any request is corresponding for any request in having described n to ask and patrolled When collecting step, any request is buffered in the cache pool of the corresponding logic step of any request;
Execution module, for described n request be buffered in the buffer pool of corresponding m logic step when, according to the m The n request in the buffer pool of a logic step performs the m logic step, obtains the current allocation strategy pair The concurrent test result answered;
Module is repeated, for using next allocation strategy in the allocation strategy set as the current distribution plan After slightly, n concurrent request is triggered again, and is repeated the current allocation strategy of the basis and determined n concurrent request Corresponding logic step to it is described described n request be buffered in the buffer pool of corresponding m logic step when, root The step of m logic step being performed according to the n request in the buffer pool of the m logic step, until obtaining institute Until stating the corresponding concurrent test result of all allocation strategies in predetermined allocation strategy set.
7. device according to claim 6, which is characterized in that the step determining module, including:
Logic step determination sub-module, for when receiving the i-th request in the n request, being divided according to described current The corresponding logic step of i-th request is determined with strategy, and described i-th asks corresponding logic step to be patrolled for the described first processing Any logic step in volume, i are less than or equal to n;
Labeling submodule, for being identified for the i-th request marks step, the step mark is used to indicate i-th request Corresponding logic step;
Submodule is repeated, for when receiving any request in n request again, making i=i+1, and repeating It is described when receive it is described n request in i-th request when, according to the current allocation strategy determine it is described i-th request pair The most described i-th request marks step mark of the logic step answered, it is corresponding that the step mark is used to indicate i-th request Logic step, until described n request has determined that corresponding logic step.
8. device according to claim 7, which is characterized in that the request receiver module, including:
Step identifies submodule, is performed for working as the first request in the n request into the described first processing logic During i-th of logic step, determine whether i-th of logic step is the corresponding logic step of first request;
Cache sub-module is asked, for when i-th of logic step is the corresponding logic step of the first request, intercepting First request, and the described first request is buffered in the buffer pool of i-th of logic step;
Repeat submodule, for when i-th of logic step be not it is described first ask corresponding logic step when, root I-th of logic step is performed according to the described first request, and makes i=i+1, performs performed when first asks to described again First processing logic in i-th of logic step when, determine i-th of logic step whether be it is described first request correspond to Logic step the step of, until described first request be buffered in the buffer pool of corresponding logic step.
9. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program quilt The step of method any one of claim 1-5 is realized when processor performs.
10. a kind of electronic equipment, which is characterized in that including:
Computer readable storage medium described in claim 9;And
One or more processor, for performing the program in the computer readable storage medium.
CN201711385002.7A 2017-12-20 2017-12-20 Concurrent testing method and device for process engine, storage medium and equipment Active CN108121660B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711385002.7A CN108121660B (en) 2017-12-20 2017-12-20 Concurrent testing method and device for process engine, storage medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711385002.7A CN108121660B (en) 2017-12-20 2017-12-20 Concurrent testing method and device for process engine, storage medium and equipment

Publications (2)

Publication Number Publication Date
CN108121660A true CN108121660A (en) 2018-06-05
CN108121660B CN108121660B (en) 2020-10-02

Family

ID=62230537

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711385002.7A Active CN108121660B (en) 2017-12-20 2017-12-20 Concurrent testing method and device for process engine, storage medium and equipment

Country Status (1)

Country Link
CN (1) CN108121660B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140081902A1 (en) * 2012-09-20 2014-03-20 International Business Machines Corporation Integrating Data Transform Test with Data Transform Tool
CN107102897A (en) * 2016-02-23 2017-08-29 深圳市知穹科技有限公司 A kind of database active defense method of many GPU parallel processings

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140081902A1 (en) * 2012-09-20 2014-03-20 International Business Machines Corporation Integrating Data Transform Test with Data Transform Tool
CN107102897A (en) * 2016-02-23 2017-08-29 深圳市知穹科技有限公司 A kind of database active defense method of many GPU parallel processings

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈涛等: "基于Linux的多线程池并发Web服务器设计", 《电子设计工程》 *

Also Published As

Publication number Publication date
CN108121660B (en) 2020-10-02

Similar Documents

Publication Publication Date Title
CN106294179B (en) Analog detection method and server in process of application development
CN104598257B (en) The method and apparatus of remote application operation
CN104796385B (en) Terminal binding method, apparatus and system
CN109523017A (en) Compression method, device, equipment and the storage medium of deep neural network
CN108304921A (en) The training method and image processing method of convolutional neural networks, device
CN103928038B (en) The test recording of electronic equipment and back method
CN107807841B (en) Server simulation method, device, equipment and readable storage medium
CN108228444A (en) A kind of test method and device
US8527921B2 (en) Constrained random simulation coverage closure guided by a cover property
CN108347356A (en) A kind of multi-protocols unit test method, device, electronic equipment and storage medium
CN106034112A (en) Access control, policy obtaining, attribute obtaining methods and correlated device
WO2019075994A1 (en) Method, device and system for mock data at ios end, and storage medium
CN107222331A (en) Monitoring method, device, storage medium and the equipment of distribution application system performance
CN110046088A (en) A kind of interface test method, device and equipment
CN104702592A (en) Method and device for downloading stream media
CN107357728A (en) The method and electronic equipment of test software
CN109657539A (en) Face value evaluation method and device, readable storage medium and electronic equipment
CN110135512A (en) Recognition methods, equipment, storage medium and the device of picture
CN109948632A (en) Data training method, apparatus and system, computer equipment
CN105957133B (en) A kind of method and apparatus for loading textures
CN110019444A (en) A kind of operation requests processing method, device, equipment and system
CN110908908A (en) Method and device for testing micro-service Dubbo interface
CN108228197A (en) A kind of method and apparatus for installing software in the cluster
CN109918275A (en) It is a kind of to realize the method, apparatus and system that pressure test is carried out to server performance
CN108121660A (en) Concurrent testing method, device, storage medium and the equipment of flow engine

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant