I am trying into the BlazeMeter Superior JMeter tutorial
(https://academy.blazemeter.com/programs/advanced-jmeter/)
In lesson 7: Pacing, he makes use of some Groovy code to delay the dummy sampler, which is as follows:
lengthy iterationCount = ${__counter(FALSE,)}
if (iterationCount < 500) {
log.information("Iteration Rely: ${iterationCount}")
}
else
{
lengthy delayVal = Lengthy.parseLong(props.get("delayProp"));
if (delayVal < 400) {
delayVal = delayVal + 1
props.put("delayProp", String.valueOf(delayVal))
log.information("Thread: ${__threadNum} Iteration: ${__iterationNum} Delay worth: ${__P(delayProp,)}")
}
}
Sadly he would not present the right way to combine this code within the JSR223 PostProcessor with the dummy sampler. So my sampler isn’t delaying when the iteration rely goes over 500.
Any thought on how I can apply this code for a delay within the sampler?
Within the venture he has following components:
- Consumer Outlined Variables
- Arrival Threads Group with 3 Dummy Samplers
- Underneath the third dummy sampler, there’s a JSR223 PostProcessor with the
code - Response Instances Over Time listener
- Energetic Threads Over Time listener
- Transactions per Second listener