JMeter 为儿童功能添加思考时间 [英] JMeter Add Think Time to children feature

查看:14
本文介绍了JMeter 为儿童功能添加思考时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 JMeter 中,当我右键单击 Thread/Controller 我有一个选项:Add Think Time to children 功能,当我点击它时,我会在每个 Sampler Test Action使用 Uniform Random Timer 暂停,随机延迟 100 和恒定延迟 1000.

In JMeter when I right click Thread/Controller I have an option: Add Think Time to children feature , when I click on it I get after every Sampler Test Action Pause with Uniform Random Timer with Random Delay 100 and Constant Delay 1000.

我没有在文档中找到任何对它的引用以及为什么/如何使用它.它是否可配置以及如何配置?它有特殊情况还是应该用于加载最佳实践?

I didn't find in documentation any reference to it and why/how it should be used. Is it configurable and how? is there a special case for it or should it be used for loading best practice ?

您也可以添加几次思考时间,我不确定是不是故意的(请求后添加更多延迟)

Also you can add several times think times I'm not sure is it on purpose (add more delays after request)

编辑

可使用 jmeter.properties 进行配置:

Configurable using jmeter.properties:

# Default implementation that create the Timer structure to add to Test Plan
# Implementation of interface org.apache.jmeter.gui.action.thinktime.ThinkTimeCreator
#think_time_creator.impl=org.apache.jmeter.thinktime.DefaultThinkTimeCreator

# Default Timer GUI class added to Test Plan by DefaultThinkTimeCreator
#think_time_creator.default_timer_implementation=org.apache.jmeter.timers.gui.UniformRandomTimerGui

# Default constant pause of Timer 
#think_time_creator.default_constant_pause=1000

# Default range pause of Timer
#think_time_creator.default_range=100

推荐答案

这个功能是为了简化 Think Times 的添加,它添加 Think Times 的方式会导致每个采样器之间暂停,而如果你只添加一个 Timer 它会范围内,因此在范围内的所有采样器之前应用.

This feature is made to simplify addition of Think Times, the way it adds them to plan lead to pause between every sampler while if you just add a Timer it will be scoped and thus be applied before all samplers in scope.

由于它是一个帮助程序,它添加了默认的 1 秒暂停,可以通过调整您提到的和记录的属性来配置 :-) :

As it's a helper, it adds default Pause of 1 second that are configurable by tuning the properties you have mentioned and which are documented :-) :

您可以调整:

  • 您要创建的计时器类型
  • 恒定和可变的暂停范围

您甚至可以创建自己的类,以不同的方式工作.

You can even create your own class that would work differently.

这篇关于JMeter 为儿童功能添加思考时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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