2
votes

I am performing load test with these parameters :

threads=4

ramp_up_period=90

loop_count=60

So according to above numbers, my assumption is that each one of the four thread will be created in 22.25 seconds and this 4 thread cycle will be repeated 60 times.

Below is the load test summarized report :

enter image description here

According to JMeter manual ramp up period is :

The ramp-up period tells JMeter how long to take to "ramp-up" to the full number of threads chosen. If 10 threads are used, and the ramp-up period is 100 seconds, then JMeter will take 100 seconds to get all 10 threads up and running. Each thread will start 10 (100/10) seconds after the previous thread was begun. If there are 30 threads and a ramp-up period of 120 seconds, then each successive thread will be delayed by 4 seconds.

So according to above scenarios approximate total time for executing load test with mentioned thread group parameters is :

TotalTime = ramp_up_period*loop_count

which in my case evaluates to 90*60 = 5400 seconds, but according to summariser Total Time is coming 74 seconds

JMeter version is 2.11.

Is there is any problem in my understanding or there is some issue with JMeter ?

2

2 Answers

1
votes

Initially JMeter will start 1 thread which will be doing something, which is under your Loop Controller. In 30 seconds second thread will join, in 30 more seconds 3rd thread will start and finally on 90th second 4th thread will start.

Starting from 90 second 4 threads will be doing "what is under your loop controller".

There is no way to determine how long it would take, especially under the load. If you need a load test to last approximately N seconds you can use Duration input under Sheduler in Thread Group.

If you want to forcefully stop the test if certain conditions are met there are 2 more options:

Example Beanshell code (assumed to be run in separate thread group in endless loop with reasonable delay between firing events)

if (currenttime - teststart > Long.parseLong(props.get("test_run_time").toString())) {
    try {
        DatagramSocket socket = new DatagramSocket();
        byte[] buf = "StopTestNow".getBytes("ASCII");
        InetAddress address = InetAddress.getByName("localhost");
        DatagramPacket packet = new DatagramPacket(buf, buf.length, address, 4445);
        socket.send(packet);
        socket.close();
    } catch (Throwable ex) {
    }

}
0
votes

TotalTime would be that if you were working without concurrency. When working in a multi-threaded environment it can happen that thread 1 is already performing its second call when thread 3 is still firing up.