I’m looking into the BlazeMeter Advanced JMeter tutorial
(https://academy.blazemeter.com/courses/advanced-jmeter/)
In lesson 7: Pacing, he uses some Groovy code to delay the dummy sampler, which is as follows:
long iterationCount = ${__counter(FALSE,)}
if (iterationCount < 500) {
log.info(“Iteration Count: ${iterationCount}”)
}
else
{
long delayVal = Long.parseLong(props.get(“delayProp”));
if (delayVal < 400) {
delayVal = delayVal + 1
props.put(“delayProp”, String.valueOf(delayVal))
log.info(“Thread: ${__threadNum} Iteration: ${__iterationNum} Delay value: ${__P(delayProp,)}”)
}
}
Unfortunately he doesn’t show how to integrate this code in the JSR223 PostProcessor with the dummy sampler. So my sampler is not delaying when the iteration count goes over 500.
Any idea on how I can apply this code for a delay in the sampler?
In the project he has following elements:
User Defined Variables
Arrival Threads Group with 3 Dummy Samplers
Under the 3rd dummy sampler, there is a JSR223 PostProcessor with the
code
Response Times Over Time listener
Active Threads Over Time listener
Transactions per Second listener