jMeter 计时器 - 循环延迟 [英] jMeter timers - loop delays

查看:22
本文介绍了jMeter 计时器 - 循环延迟的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 jMeter 中模拟了以下场景:
100 个用户登录一次,每 30 秒进行一次搜索,思考时间为 5 秒.
我该如何实施?

I have the following scenario to emulate in jMeter:
100 users logging in once and doing search every 30 secs, with think time 5 secs.
How do I implement this?

现在我有这样的事情:

ThreadGroup(100usrs)
+-- OnceOnlyController(LogIn)
+-- LoopControler(Search)
+-- Timer(5s)

但我不知道如何在 Search 实例之间实现 30 秒的延迟.
甚至有可能还是我必须使用一些解决方法?
任何帮助表示赞赏.

But I have no idea how to do the 30 secs delay between the Search instances.
Is it even possible or do I have to use some workaround?
Any help appreciated.

推荐答案

如果您想在搜索样本之间有固定的延迟,无论样本的响应时间是多少,那么 Orkito 解决方案都不是正确的解决方案.

If you want to have a fixed delay between the search samples whatever response time of the Sample is then Orkito solution is not the right one.

他的解决方案会在搜索样本之前增加 30 秒的延迟,因此如果搜索花费的时间比预期的多,您的请求将每 30 秒 + 搜索样本所用的时间运行一次.

His solution will add a 30 s delay before the search sample, so if search takes more time than expected your request will run each 30s + Time taken by search sample.

如果你想在搜索样本之间有一个固定的延迟,无论样本的响应时间如何,那么这里描述的解决方案:

If you want to have a fixed delay between the search samples whatever response time of the Sample then solution is described here:

它是法语,但有截图,翻译服务应该可以完成这项工作.

It's in french but there are screenshots and translation service should do the job.

另一个需要注意的重点:

Another important point to note:

请注意,定时器在它们被发现的范围内的每个采样器之前被处理;如果同一范围内有多个定时器,则在每个采样器之前处理所有定时器.计时器仅与采样器一起处理.与采样器不在同一范围内的计时器将根本不会被处理.要将计时器应用于单个采样器,请将计时器添加为采样器的子元素.计时器将在执行采样器之前应用.要在采样器之后应用计时器,请将其添加到下一个采样器,或将其添加为测试操作采样器的子代.

Note that timers are processed before each sampler in the scope in which they are found; if there are several timers in the same scope, all the timers will be processed before each sampler. Timers are only processed in conjunction with a sampler. A timer which is not in the same scope as a sampler will not be processed at all. To apply a timer to a single sampler, add the timer as a child element of the sampler. The timer will be applied before the sampler is executed. To apply a timer after a sampler, either add it to the next sampler, or add it as the child of a Test Action Sampler.

这篇关于jMeter 计时器 - 循环延迟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆