标签:exec tca 等于 sam str cell 整数 order 测试
Throughput Contoller,直译是吞吐量控制器,它是用来控制该控制器下面元件的执行次数,与控制吞吐量的功能无关。(注:用Constant Throughput Timer可以控制吞吐量。)
Throughput Contoller有两种模式:Total Executions 和Percent Executions。
参数说明如下:
那么如何计算Throughput Controller其下的执行次数?
下面添加循环控制器,在Throughput Controller下添加Debug Sampler元件来做实验:
实验一:测试按Percent Executions模式执行次数
TestCase1:线程数3,线程循环次数2,循环控制器循环次数2,吞吐量值50%,勾选Per User
测试结果:查看“聚合报告”里Debug Sampler执行次数,Debug Sampler=6,即执行了6次,如图:
TestCase2:线程数3,线程循环次数2,循环控制器循环次数2,吞吐量值50%,不勾选Per User
测试结果,查看“聚合报告”里Debug Sampler执行次数,Debug Sampler=6,即执行了6次,如图:
TestCase1与TestCase2测试结果对比表:
线程数 |
线程组循环次数 |
控制器循环次数 |
模式 |
吞吐量值 |
Per User |
执行次数 |
3 |
2 |
2 |
Percent Executions |
50 |
勾选 |
6 |
3 |
2 |
2 |
Percent Executions |
50 |
不勾选 |
6 |
由此,得出结论:
无论Per User是否勾选,按Percent Executions模式的执行次数都不受Per User影响,Percent Executions模式的执行次数=线程数*循环次数*吞吐量%。
PS:循环次数=线程组循环次数*循环控制器循环次数。
实验二:测试按Total Executions模式执行次数
同样,按照实验一的初始条件不变:线程数3,线程循环次数2,循环控制器循环次数2,然后改变吞吐量值和是否勾选Per User来做实验。
测试的实验结果如下表:
线程数 |
线程组循环次数 |
控制器循环次数 |
模式 |
吞吐量值 |
Per User |
执行次数 |
3 |
2 |
2 |
Total Executions |
13 |
勾选 |
12 |
3 |
2 |
2 |
Total Executions |
13 |
不勾选 |
12 |
3 |
2 |
2 |
Total Executions |
12 |
勾选 |
12 |
3 |
2 |
2 |
Total Executions |
12 |
不勾选 |
12 |
3 |
2 |
2 |
Total Executions |
11 |
勾选 |
12 |
3 |
2 |
2 |
Total Executions |
11 |
不勾选 |
11 |
3 |
2 |
2 |
Total Executions |
10 |
勾选 |
12 |
3 |
2 |
2 |
Total Executions |
10 |
不勾选 |
10 |
3 |
2 |
2 |
Total Executions |
5 |
勾选 |
12 |
3 |
2 |
2 |
Total Executions |
5 |
不勾选 |
5 |
3 |
2 |
2 |
Total Executions |
4 |
勾选 |
12 |
3 |
2 |
2 |
Total Executions |
4 |
不勾选 |
4 |
3 |
2 |
2 |
Total Executions |
3 |
勾选 |
9 |
3 |
2 |
2 |
Total Executions |
3 |
不勾选 |
3 |
3 |
2 |
2 |
Total Executions |
2 |
勾选 |
6 |
3 |
2 |
2 |
Total Executions |
2 |
不勾选 |
2 |
分析数据,得出结论:
JMeter之Throughput Controller详解(实验)
标签:exec tca 等于 sam str cell 整数 order 测试
原文地址:http://www.cnblogs.com/luihengk/p/7407186.html