Increasing the number of threads in JMeter at run time

I have a performance test in JMeter and would like to test it with maximum performance / bandwidth. Therefore, the number of active threads should be increased, for example, while the error rate is less than 2%. I found the Constant Throughput Timer , put it in the Thread Group , but it only paused or slowed the threads. I tried to define it as follows, with the property: ${__P(throughput,)} , but not sure what should be the correct value for this property. I do not see how JMeter can measure maximum system performance.

+5
source share
2 answers

There are no such functions in vanilla JMeter, since this is possible with plugins, check:

They can be interconnected via a feedback loop , so the Concurrency Thread Group will add more threads if necessary to achieve the desired number of requests per second.

You can install both plugins (and keep them up to date) using JMeter Plugins Manager

+1
source

There is no out of the box solution with JMeter 3.3, see this extension request:

However, you can dynamically add threads with JMeter 3.2 (see https://bz.apache.org/bugzilla/show_bug.cgi?id=60530 ) in the JSR223 test element using JMeterContext :

ctx.getThreadGroup (). addNewThread (delay, ctx.getEngine ());

So, based on this, you can check in the JSR223 test element (Pre / Post Processor or Sampler) to check for the presence of a file in a folder of your choice with the name:

NUMBER_OF_THREAD_TO_ADD.txt

If present, use its name to calculate the number of threads and call this method.

+3
source

Source: https://habr.com/ru/post/1273629/


All Articles