简体   繁体   English

Jmeter:控制一次发生的请求数

[英]Jmeter: control the number of requests happening at one time

I'm doing performance testing on an app that does transactions. 我正在执行交易的应用程序上进行性能测试。 I have 25 threads but only 5 unique IDs. 我有25个线程,但只有5个唯一ID。

Here's my problem: To avoid concurrency issue, I want to limit the number of requests being made during a buy/sell transaction to only 5 (cuz only 5 unique IDs). 这是我的问题:为避免并发问题,我想将在买卖交易期间发出的请求数限制为仅5个(因为仅5个唯一ID)。 How do I achieve this in Jmeter? 如何在Jmeter中实现这一目标?

Please be detailed in answer as i'm a total noobie. 由于我是个完全不懂的人,请在回答中进行详细说明。 Thank you!! 谢谢!!

Use Synchronizing Timer 使用同步计时器

The purpose of the SyncTimer is to block threads until X number of threads have been blocked, and then they are all released at once. SyncTimer的目的是阻塞线程,直到阻塞了X个线程,然后立即将它们全部释放。

With Number of Simultaneous Users to Group by as 5 Number of Simultaneous Users to Group by为5

You can limit the execution rate to the specified number of requests per unit of time using the following test elements: 您可以使用以下测试元素将执行率限制为每单位时间指定的请求数:

All of them are capable of "pausing" JMeter threads to the specified throughput (# of requests per minute/second) 它们都能够“暂停” JMeter线程达到指定的吞吐量(每分钟/秒的请求数量)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM