Throughput Throughput Controller The controller JMeter

Throughput controller, which is used to control the execution frequency of the controller is the following elements, independent of the function of controlling the throughput. (Note: Constant Throughput Timer can be controlled with certain TPS)

Action: to control its number of child nodes performs a load distribution ratio

Throughput controller has two modes: the Total and Executions The Percent Executions.

Parameters as follows:

  • Total Executions: total number of executions in the entire test program, according to the throughput values ​​to specify the number of executions.
  • Percent Executions: proportion (1% -100%), the percentage of the overall test plan execution. As a percentage of the number of executions execution frequency is calculated
  • Throughput: This value can be any integer, is less than or equal to 0, the time is not executed.
  • Per User: If you check the number of virtual press (threads) user to calculate the number of executions, if not checked press all virtual users to calculate the number of executions.

So how to calculate the number of executions under its throughput controller?

Add the following control cycle, adding to experiment Debug Sampler element at a certain controller:

Experiment 1: number of times the test execution mode Percent Executions

TestCase1: 3 number of threads, the thread 2 cycles, the controller cycles 2 cycles, the throughput value of 50%, check Per User

Test results: View "Aggregate Report" in the Debug Sampler number of executions, Debug Sampler = 6, that is performed six times

TestCase2: 3 number of threads, the thread 2 cycles, the controller cycles 2 cycles, the throughput value of 50%, no check Per User

The test results, see "Aggregate Report" in the Debug Sampler number of executions, Debug Sampler = 6, that is performed six times

TestCase1 and TestCase2 test results comparison table:

Threads

Thread group cycles

The controller cycles

mode

Throughput value

Per User

Executions

3

2

2

Percent Executions

50

Check

6

3

2

2

Percent Executions

50

Uncheck

6

 

 

 

 

 

Thus, it concludes:

Per User regardless of whether the check, according to the number of executions Percent Executions are not subject to Per User mode of impact , the number of executions Percent Executions mode = thread count the number of cycles * * Throughput%.

PS: cycles = thread group cycles cycles cycles * controller.

 

Experiment two: the number of test execution mode by Total Executions

Also, according to a constant initial experimental conditions: 3 number of threads, the thread 2 cycles, the controller cycles 2 cycles, and then change the value of the throughput Per User check whether to do the experiment.

The results of the test in the following table:

Threads

Thread group cycles

The controller cycles

mode

Throughput value

Per User

Executions

3

2

2

Total Executions

13

Check

12

3

2

2

Total Executions

13

Uncheck

12

3

2

2

Total Executions

12

Check

12

3

2

2

Total Executions

12

Uncheck

12

3

2

2

Total Executions

11

Check

12

3

2

2

Total Executions

11

Uncheck

11

3

2

2

Total Executions

10

Check

12

3

2

2

Total Executions

10

Uncheck

10

3

2

2

Total Executions

5

Check

12

3

2

2

Total Executions

5

Uncheck

5

3

2

2

Total Executions

4

Check

12

3

2

2

Total Executions

4

Uncheck

4

3

2

2

Total Executions

3

Check

9

3

2

2

Total Executions

3

Uncheck

3

3

2

2

Total Executions

2

Check

6

3

2

2

Total Executions

2

Uncheck

2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Data analysis, concluded that:

  • When the check Per User:
  1. * Number of execution threads cycles> = the number of * certain thread, Total Executions mode = * a certain number of threads.
  2. When the number of threads of cycles * <* a certain number of threads, the execution times Total Executions mode when the number of threads * = number of cycles.
  • When unchecked Per User:
  1. * Number of execution threads cycles <= a certain time, Total Executions mode cycles * = number of threads.
  2. When the number of threads * cycles> certain execution mode number = Total Executions throughput.

Guess you like

Origin www.cnblogs.com/ajing2018/p/11454951.html