apache / apache/jmeter

Throughput Controller doesn't work if loop count is infinite

Open
#5,675 0 comments 0 reactions 0 assignees View on GitHub
os: other P2
Dominant language
Java
Stars
9.5k
Forks
2.3k
Avg merge
1d 22h
Merged PRs (30d)
5

Description

**Sergey Danilov** ([Bug 66107](https://bz.apache.org/bugzilla//show_bug.cgi?id=66107&redirect=false)):
Hello Ladies and Gentlemen!

Throughput Controller doesn't work if loop count is set to `infinite`. I added an attachment, where you can reproduce it. It looks like an unexpected behavior.

In test plan from attachment I waited 50 requests, because of first Thread Group is 5 (threads) * 10 (seconds duration) * 0.8 (80% percents with Throughput Controller) = 40 requests, and second Thread Group is 5 (threads) * 10 (seconds duration) * 0.2 (20% percents with Throughput Controller) = 10 requests. But I get 100 requests (50 with first Thread Group and 50 with second Thread Group). Throughput Controller in this case doesn't work.

But if I set `loop_count` parameter in both Thread Groups to 10 (loop count == duration) – it works. Then I get 40 requests from first Thread Group and 10 requests from second Thread Group.

Tell me please, is that a wrong logic or maybe I don't understand the conception of Throughput Controller work? Thanks!

Created attachment [test.jmx](https://apache.github.io/jmeter-bugzilla-attachments/07/66107/38311/test.jmx): test plan to reproduce the behavior

Severity: normal
OS: other

Contributor guide

Open the contributing guide

Research direction

Open the attached test.jmx and reproduce the behavior with Throughput Controller and infinite loop counts. Compare the request distribution between the two Thread Groups with infinite loops and with loop_count set to 10; done means the controller enforces the intended 80%/20% distribution in both cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
performance, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.