In this article you will get familiar with following timers:
Constant Timer
Gaussian Random Timer
Uniform Random Timer
Constant Throughput Timer
Precise Throughput Timer
Synchronizing Timer
BeanShell Timer
JSR223 Timer
Poisson Random Timer
2. Timer
1
Timer is playing one of the most important
roles during load testing on server and if you
perform load testing without any delay then
server will be overloaded and you will not
get a realistic result. And timer is the only
solution for this problem.
In this article you will get familiar with
following timers:
• Constant Timer
• Gaussian Random Timer
• Uniform Random Timer
• Constant Throughput Timer
• Precise Throughput Timer
• Synchronizing Timer
• BeanShell Timer
• JSR223 Timer
• Poisson Random Timer
3. Constant Timer
2
When a user wants to pause the threads
between HTTP requests, the constant timer
is for this purpose. It pauses the threads with
the same amount of time for each request.
For example, after login into the website,
when the user wants to navigate to the other
pages in the website and wants the same
amount of pause between the page
switching then the constant timer is used.
4. Constant Timer
3
If you want to add this timer, follow these
steps;
• Go to Thread Group
• Add new Sampler
• Right-click on Sampler
• Click on Add
• Click on Timer
• Click on Constant Timer
6. 5
There are basically three fields in Constant
Timer:
Name: This is just a name for the timer
which will display in the result.
Comments: User can comment in this
section whatever he/she wants to display
with this timer.
Thread Delay: User can fill the time for
pausing the threads in milliseconds.
8. Gaussian Random
Timer
7
The timer itself pauses for each thread
request, mostly it pauses when a particular
value occurs nearly. It works according to
Gaussian curve distribution.
For instance, If you want to calculate the
delay while sending a request to
Loadium.com, and you have specified
Gaussian Timer as 200 milliseconds
deviation and 400 milliseconds constant
delay offset. Now you can find that 68% of
delays is between (200, 600) milliseconds
according to Gaussian curve distribution.
And how will you calculate these delay time
interval?
9. Gaussian Random
Timer
8
Here it is:
200= 400(offset)-200(deviation) and
600= 400(offset)+200(deviation)
To find this timer, follow these steps,
• Go to Thread Group
• Add new Sampler
• Right-click on Sampler
• Click on Add
• Click on Timer
• Click on Gaussian Random Timer
11. Gaussian Random
Timer
10
Name: This is just a name for the timer
which will display in the result.
Comments: User can comment in this
section whatever he/she wants to display
with this timer.
Thread delay properties: It has two fields,
Deviation: This field has deviation time in
milliseconds.
Constant delay off: This time is to pause
in addition to the random delay in
milliseconds.
12. Uniform Random Timer
11
Uniform Random Timer pauses with a
random amount of time with each thread
request and pauses having the same
probability of occurring. The thread delay
time is the sum of random and offset value.
For example, after adding the product into
the cart, when the user wants to buy and
checkout for that product then here we can
use this timer for the random pauses with
the same probability.
13. Uniform Random Timer
12
For adding this Timer to your sampler, here
you go;
• Go to Thread Group
• Add new Sampler
• Right-click on Sampler
• Click on Add
• Click on Timer
• Click on Uniform Random Timer
15. Uniform Random Timer
14
This timer displays three fields as well
*Name: This is just a name for the timer
which will display in the result.
*Comments: User can comment in this
section whatever he/she wants to display
with this timer.
*Thread delay properties which has two
fields,
>Random Delay Maximum- This field has
maximum random delay time in
milliseconds.
>Constant delay off- This time is to pause
in addition to the random delay in
milliseconds.
17. Constant Throughput
Timer
16
This timer is not having any fixed amount of
pause, it has variable pauses and calculated
the throughput as close as possible to the
given number. Although it has a constant
word in the name itself, still throughput does
not need to be constant.
For instance, If the user wants to pause with
different times for switching different pages
in the website then this throughput timer is
used with different options of constant delay
offset.
18. Constant Throughput
Timer
17
To add this timer to your Sampler, you can
follow these steps,
• Go to Thread Group
• Add new Sampler
• Right-click on Sampler
• Click on Add
• Click on Timer
• Click on Constant Throughput Timer
20. Constant Throughput
Timer
19
This timer has the following fields,
Name: This is just a name for the timer
which will display in the result.
Comments: User can comment in this
section whatever he/she wants to display
with this timer.
Delay before each affected sampler
Target throughput: How much user wants to
the timer to generate the throughput.
21. Constant Throughput
Timer
20
Calculate throughput based
This thread only: In this, each thread will try to maintain the target throughput.
All active threads: In this case, the target throughput is divided among all the threads.
All active threads in current thread group: The throughput is divided among all the threads in the
current thread group.
All active threads (Shared): In this option throughput also divided among all the threads but each
thread is delayed as per any thread the last run.
All active threads in current thread group (Shared): In this option throughput also divided among all
the threads in the current thread group but each thread is delayed as per any thread the last run in the
current thread group.