目录
[Number of Simulated Users to Group](#Number of Simulated Users to Group)
[Timeout in milliseconds](#Timeout in milliseconds)
布局设置说明

参数说明:
Number of Simulated Users to Group
每次释放的线程数量。如果设置为0,等同于设置为线程租中的线程数量。
Timeout in milliseconds
如果设置为0,Timer将会等待线程数达到了"Number of Simultaneous Users to Group"中设置的值才释放。如果大于0,那么如果超过Timeout in milliseconds中设置的最大等待时间(毫秒为单位)后还没达到"Number of Simultaneous Users to Group"中设置的值,Timer将不再等待,释放已到达的线程。默认为0

使用时需要注意的点
- 如果设置Timeout in milliseconds为0,且线程数量无法达到"Number of Simultaneous Users to Group by"中设置的值,那么Test将无限等待,除非手动终止。
- Synchronizing timer 仅作用于同一个JVM中的线程,所以,如果使用并发测试,确保"Number of Simultaneous Users to Group by"中设置的值不大于它所在线程组包含的用户数。
(原文:Synchronizing timer blocks only within one JVM, so if using Distributed testing ensure you never set "Number of Simultaneous Users to Group by" to a value superior to the number of users of its containing Thread group considering 1 injector only)
集合点作用域
- Synchronizing Timer是在每个sampler(采样器)之前执行的,而不是之后,不管这个定时器的位置放在sampler之后,还是之前,如下,执行HTTP请求1和HTTP请求2前都会执行同步定时器

- 作用域:当执行一个sampler之前时,和sampler处于相同作用域的定时器都会被执行;

- 如果希望定时器仅应用于其中一个sampler,则把该定时器作为子节点加入
定时器仅仅对HTTP请求2起作用,即仅在HTTP请求2执行前执行定时器,和HTTP请求1无关
实际运行
如上,添加相关请求,结果树等,进行必要设置后,运行查看效果
通过结果树可以看到,请求是批量执行的,其中有两个请求在集合点超时之后运行

点击右上角的感叹号可以查看运行日志,可以看到集合点等待超时的warning日志


资料获取方法
【留言777】


各位想获取源码等教程资料的朋友请 点赞 + 评论 + 收藏 ,三连!
三连之后我会在评论区挨个私信发给你们~