Niels Bech Nielsen
Niels Bech Nielsen

Reputation: 4859

Control number of requests in a single jmeter thread when different request have different intervals

Is there a way to control the number of any specific request inside a single jmeter thread, when requests should have different load.

I have a system which is not web based, so it needs to receive data in a single thread. However, it receives different types of request at different intervals. Consider this:

threadgroup-1 (1 user)
|-message-1 (200 per min)
|-message-2 (25 per min)
|-message-3 (100 per min)

If it was in separate threads I would have a constant throughput timer on each, but I wouldnt know how to configure it for a single thread.

For the above I have a threadgroup with 1 message-2, 4 message-3 and 8 message-1, with a constant throughput timer of 325 per min. However, that is impractical when the amount of messages are not so easily related.

Granted, Im no jmeter expert, so is there any advice for me to try to solve this problem?

Upvotes: 3

Views: 699

Answers (1)

timbre timbre
timbre timbre

Reputation: 13970

I would still use constant throughput timer of 325 per min, but in conjunction with Throughput Controller per request, which would control the distribution of the requests within the execution:

enter image description here

That is: message-2 is set to 100% (which means it would only be limited by a 325-per-min throughput); message-3 runs only in half cases, and message-1 in one case out of 4. So in the end you get a fairly precise distribution (within one thread):

enter image description here

Of course this only works if server throughput is >= 325 requests/min

Upvotes: 3

Related Questions