0
votes

Im using JMeter for stress testing. Im sending requests in a continuous loop. Actually Latency / Elapsed time shows only 10 ms., but JMeter is not executing the next sampler for another 100 - 120 ms., which is resulting in a delay.
I really wonder if each sampler takes so much time for preparing to be executed. Also, generally pre and post processor dont get logged into results csv., so the sample elapsed time included their execution time as well?
Appreciate the help

Test Plan

TestPlan

Setup Thread Group Thread Group 1

Random Variable
User Defined vars
Loop1

Http Request1

Header Manager
Post Processor (My Own, it really improved performance compared to BeanShell / JSR223)

Http Request2

Header Manager

Constant Time wait (50ms)

Loop2

Http Request1

Header Manager
Post Processor (My Own)

Http Request2

Header Manager
Constant Time wait (10ms)

Thread Group 2 #not used at the moment
Thread Group 3 #not used at the moment
Teardown Thread Group

In the Above plan., there is no sleep or anything between HTTP Request 1 & 2., still it is taking 115ms Thought there is a wait after HTTP Request2 in each loop it is just 10 ms, here it is taking 125 ms.

Thanks, Rao

1
can you share you .jmx file here?Bhuwan Gautam
@BhuwanGautam: Updated the Problem description with the Test Plan stepsRao
I can see there is a 50ms delay in Loop1 and 10ms delay in Loop2. I had a guess that you have that constant delay there which is causing the problem. Just remove those and try again.Bhuwan Gautam

1 Answers

0
votes

Timers are not well understood by JMeter users because they have an odd behavior as stated by the documentation:

Note that timers are processed before each sampler in the scope in which they are found; if there are several timers in the same scope, all the timers will be processed before each sampler.

I suggest you to use the Test Action to simulate delays as its behavior is easier to understand. Define its duration as the delay you want to simulate and you are set.