JMeter思考时间 [英] JMeter Think Time

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

问题描述

如果这个要求与其他要求相似,我深表歉意-我是JMeter的新手,已经搜索了其他相关职位,但找不到任何东西-也许我只是听不懂!

Apologies if this request is similar to others - I am new to JMeter and have searched for other relevants posts but couldn't find anything - or maybe I just didn't understand them!

我正在使用基于Web的应用程序对系统进行性能测试.前端系统将处理通过MQ提交到系统中的记录-前端允许用户从队列中提取记录,验证一些细节,进行更改并提交更改.

I'm performance testing a system with a web based application. The front end system will be processing records submitted into the system via MQ - the front end allows the user to pick up a record from the queue, validate some detail, make changes and submit the changes.

将有20位用户在前端使用此消息进行验证,更新和提交. 每个用户预计需要30秒从队列中选择一条消息,进行更改并重新提交-因此,我们预计1个用户每小时将处理120条记录,因此预计20个用户每小时将处理2400条记录

There will be 20 users using the front end to do this message validation, update and submission. Each user is expected to need 30 seconds to pick a message from queue, make changes and resubmit - so we are expecting 1 user to process 120 records/hour, so 20 users will be expected to process 2400 records/hour

通过3个单独的网页完成队列中记录的提取,更改和提交更改.

The picking up the record off the queue, changing it and submitting the changes will be done via 3 individual web pages.

SO-3页页面上的思考时间已定义为24秒(在30秒的渲染,服务器响应,数据库调用等限制中保留了6秒)
但是我不知道如何在JMeter中指定它.从我的阅读中可以看出,我可以将Timer作为父类添加到采样器中,并且我假设可以将Timer作为父类添加到Recording Controller中? -但是我需要指定24秒的思考时间分布在这3个不同的页面上.

SO - think time across the 3 pages has been defined as 24 seconds (leaving 6 of the 30 second limit for rendering, server responses, db calls etc.)
However I don't know how to specify this within JMeter. From my reading I can see that I can add a Timer in as a parent to a sampler and I assume I can add a Timer in as a parent of the Recording Controller? - but I need to be able to specify that the 24 second think time is spread across those 3 different pages.

我在其他地方读过一篇文章,建议我在添加高斯随机计时器作为测试计划的子项(对其他所有项而言都是父项)后使用代理进行记录,则http代理会将思考时间记录为$ {T }高斯随机计时器中的变量-我尝试了这一点,但没有用(我也不想依赖于此-我想能够理解并进行更改以正确地思考时间,而不是依赖于JMETER为我做.)

I read a post elsewhere suggesting that if I record using the proxy after adding the Gaussian Random Timer in as a child of the Test Plan (parent to everything else) then the http proxy will record the think time as a ${T} variable in the Gaussian Random Timer - I tried this and this didn't work (also I don't want to rely on this - I'd like to be able to understand and make changes to think time properly rather than relying on JMETER to do it for me.)

要重申-20个用户,1个用户完成一个交易需要30秒,TT定义为24秒-我正在努力使用哪个计时器,将其放置在何处,以便将思考时间分布在相等的采样器上到与用户将浏览的3个页面相关联的GETS.

To reiterate - 20 users, 30 seconds for 1 user to complete a transaction, TT defined as 24 seconds - I am struggling what Timer to use, where to put it so that the think-time is spread across the samplers that equate to the GETS associated with the 3 pages the user will navigate through.

对冗长的帖子表示歉意-我只是想简洁明了.

Apologies for the lengthy post - I just wanted to be clear and concise.

在此先感谢

推荐答案

根据JMeter Timers文档

As per JMeter Timers documentation

请注意,在发现范围内的每个采样器之前,要在之前处理定时器;如果同一范围内有多个计时器,则将在每个采样器之前处理所有计时器. 计时器仅与采样器一起处理.与采样器不在同一范围内的计时器将不会被处理.

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.

现在有关使用什么计时器"

Now regarding "what timer to use"

有2种情况:

  1. 面向虚拟用户的场景-尝试模拟N个用户一起工作时
  2. 面向目标的方案-尝试每秒产生N次匹配时.

在方案1的情况下,甚至常量计时器可能就足够了它将提供结果的可重复性.有关将计时器放在何处的信息,请参见上面的报价

In case of scenario 1 even Constant Timer can be quite enough, besides it will provide repeatability of results. See above quote for information on where to put your timer(s)

在情况2中,您需要恒定吞吐量计时器.如果20个用户每小时处理2400条记录,并且每条记录假设有3个网页调用,则意味着一小时内将发出7200个请求,而这又表示每分钟120个请求(这是您应该输入计时器的吞吐量" ")或每秒2个请求.

In case of scenario 2 you'll need Constant Throughput Timer. If 20 users process 2400 records per hour and each record assumes 3 web page calls, it means that 7200 requests will be made in one hour which in its turn stands for 120 requests per minute (this is what you should enter into the timer's "throughput" area) or 2 requests per second.

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

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