Performance testing mixed business scenarios

It is known that the proportion of interfaces calculated from the production environment is as follows:

interface interface ratio
interface 1 40%
Interface 2 20%
Interface 3 30%
Interface 4 10%

Scenario 1: The above interfaces have no upper and lower dependencies, and a capacity scenario is designed

The interface 1 ratio is as follows:

Interface 2 proportions are as follows:

The ratio of interface 3 is as follows:

The ratio of interface 4 is as follows:

The verification results are as follows:

Scenario 2: The ratio of the above interfaces remains unchanged, and the interface sequence 1, 2, 3, 4 is executed to design a capacity scenario

Interface 1 is set as follows:

Interface 2 is set as follows:

Interface 3 is set as follows:

Interface 4 is set as follows:

The verification results are as follows:

Scenario 3: Service A is executed according to the interface sequence 1, 2, 3, 4, service B is executed according to the interface sequence 1, 2, and service C is executed according to the interface sequence 1, 3. The proportion of each interface remains unchanged, and the capacity scenario is designed

Service A executes interfaces 1, 2, 3, and 4, and only service A executes interface 4, then service A will consume 10% of each interface; after service A consumes 10% of each interface, only interfaces 1 and 2 are left , 3, business B is executed according to interfaces 1 and 2, then each interface of business B will consume 10%, and the remaining interfaces 1 and 3 will only have 20, which satisfies the execution order of business C; when calculating the business ratio, all Interface Computing Appears in Business

Service A is set as follows:

Business B is set as follows:

Business C is set as follows:

The verification results are as follows:

Scenario 4: Add interfaces 5 and 6, and the ratio of interfaces is as follows. Service A is executed in the order of interfaces 1, 2, 3, and 4. Service B is executed in the order of interfaces 1 and 2. Service C is executed in the order of interfaces 1 and 3. Service D Only implement interface 5, business E only implements interface 6, and design a capacity scenario

interface interface ratio
interface 1 25%
Interface 2 20%
Interface 3 30%
Interface 4 10%
Interface 5 10%
Interface 6 5%

analyse as below:

  1. Interface 5 and interface 6 are relatively independent and may not be considered for the time being
  2. Only interface 4 is allocated according to the proportion of interface 4 in service A. After the allocation is completed, continue to be allocated according to service B and service C
  3. Business C executes interface 1 once, and needs to execute interface 3 four times. Therefore, business C needs to use a loop controller. The total share of ABCDE5 businesses is: 10+10+5+10+5=40, and the proportion of each business is 25 , 25, 12.5, 25, 12.5

Service A is set as follows:

Business B is set as follows:

Business C is set as follows:

The loop controller is set up as follows:

Service D is set as follows:

Service E is set as follows:

The verification results are as follows:

 Friends who are studying for the test can click the small card below

Guess you like

Origin blog.csdn.net/m0_68405758/article/details/132007079