Search code examples
jmeterjmeter-pluginsjmeter-5.0

Jmeter how to send a constant number of requests every second


Does JMeter allow me to send a constant number of requests every second, instead of sequentially only when the request has finished? i.e. can I send request 2 after request 1 even if the request 1 is not done responding yet?

I am using Apache JMeter 5.2.1, I'd appreciate if anyone can give me guidance regarding this. The Constant Throughput Timer, seems to focus more on the throughput, however I'd like to simply send X req/s.


Solution

  • The solution I eventually discovered was quite straight forward. If I decide that I need to make a total of 5000 requests, and I want to follow a paradigm of sending 2 requests every second regardless of whether a response has been received or not. I can simply use is to use the ramp up period.

    "Ramp Up" - time taken to bring up all the threads

    So if you want N requests every second, and want to send M total requests, you need to set up your ramp up period as M/N in my case 5000/2 = 2500. Additionally there is no need to have multiple iterations.

    Ofcourse this can mean that you can increase the concurrent threads that the service is processing to a large number if the service is very slow, but that's what we want to test anyway.