JMeter-如何在同一线程组下为不同的采样器实现不同的吞吐量 [英] JMeter - How to achieve different throughputs for different samplers under same thread group

查看:49
本文介绍了JMeter-如何在同一线程组下为不同的采样器实现不同的吞吐量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Ultimate Thread Group(20Threads)中有三个JMeter采样器,它们具有以下吞吐量要求.

I have three JMeter samplers in a Ultimate Thread Group (20Threads), which have the below throughput requirements.

  1. 采样器1-2000次/分钟
  2. 采样器2-250/min
  3. 采样器3-30/min

我在 恒定吞吐量计时器 中提到了相同的值,但执行后,在摘要报告中,所有采样器的吞吐量均相同,大约为30-40/min

And I mentioned the same value in Constant Throughput Timer, but post execution, in the summary report, all the samplers have same throughput around 30-40/min throughput.

如何实现上述情况?

我确实尝试将线程数增加到100(假设没有足够的线程)并运行它,但结果仍然相同.

I did try to increase the number of threads to 100 (assuming there are no sufficient threads) and run it but still same results.

我也尝试将吞吐量计时器更改为 吞吐量调整计时器 ,但不使用.

And also I tried to change the Throughput Timer to Throughput Shaping timer but of not use.

恒定吞吐量计时器 中,我尝试了基于计算吞吐量"下拉菜单的所有可用选项.对于任何选项,吞吐量似乎都在增加或减少,但是所有样本的吞吐量仍然相同,但按照我的要求.

And within the Constant Throughput Timer I tried all the available options of 'Calculate Throughput based on' dropdown. For any option the throughput seems to increase or decrease, but all the samples still have same throughput, but as per my requirement.

推荐答案

您不能.JMeter线程模型假定每个线程(虚拟用户)都希望前一个采样器在开始下一个采样器之前完成.

You cannot. JMeter threads model assumes that each thread (virtual user) expects previous sampler to finish before starting the next one.

因此,如果您将不同的通量应用于不同的采样器,则总通量将最慢​​的,就像任何

So if you have different throughputs applied to different samplers the overall throughput will be the slowest one like any distributed integrated system acting at the speed of its slowest component.

因此,对不同的采样器具有不同吞吐量的唯一方法是将它们置于不同的线程组下.如果需要在线程组之间传递数据,则可以使用 __setProperty() __ P()函数组合或

So the only way of having different throughputs for different samplers is putting them under different Thread Groups. If you need to pass data between thread groups you can use __setProperty() and __P() functions combination or Inter-Thread Communication Plugin

这篇关于JMeter-如何在同一线程组下为不同的采样器实现不同的吞吐量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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