By default, JMeter sends request without stopping anywhere between each request.
Generally, user spends lots of time while browsing i.e. before submitting confidential form or reading important document. So, it is a good practice to involve some delay between requests. Here, at very short period of times, JMeter can overwhelm your test server by creating various requests. For example: To test web server, send thousands requests in few seconds and face overload issue.
Using Timers,JMeter delays each request while sending which is made by thread. Because of this reason, Timer resolves the server overload issue.
When you add more than one timer to a Thread Group, JMeter keeps the amount of the timers and pauses for that amount of time before executing the samplers to which the timers apply. Timers can be added as children of samplers or controllers in order to limit the samplers to which they are participated.
Types of Timers
- Constant Timer
- Constant Throughput Timer
- Uniform Random Timer
- Gaussian Random Timer
- BeanShell Timer
- Poisson Random Timer
- BSF Timer
- JSR223 Timer
- Synchronizing Timer
Constant Timer:
To delay every user request for the same amount of time use Constant Timer.
Constant Throughput Timer:
Constant Throughput Timer presents random delays between requests in a manner that a load/stress of necessary throughput is sent to the application. Figure shows, Constant Throughput Timer for 60 requests per minute.
Uniform Random Timer:
To delay every user request for random amount of time use Uniform Random Timer with every time interval having the same possibility of occurring.
In the above figure,
Random Delay Maximum Value: Maximum random number of milliseconds to delay
Constant Delay Offset Value: Additional value
Gaussian Random Timer:
To delay every user request for random amount of time use Gaussian Random Timer with most of the time intervals happening near a specific value.
Gaussian Random means with most of the time intervals arising near a specific value i.e. constant interval & varying between constant interval + deviation.
In the above figure,
Deviations (milliseconds): A parameter of Gaussian Distribution Function
Constant Delay Offset (milliseconds): Additional value
BeanShell Timer:
Between each user request, the BeanShell Timer can be used to create a delay time. (We will see each timer in detailed in upcoming articles with example.)
Poisson Random Timer:
To pause each and every thread request for random amount of time use Poisson Random Timer with most of the time intervals occurring close a specific value.
Sum of Poission Distributed Value and Offset Value generate Total Delay value.
BSF Timer:
Between each user request, the BSF Timer can be used to create a delay time using BSF scripting language.
JSR223 Timer:
Between each user request, the JSR223 Timer can be used to create a delay time using a JSR223 scripting language.
Synchronizing Timer:
Synchronizing Timer is used to synchronize requests of various threads, means; it will increase delays between requests. So that, all threads fire at the same time there for regenerating heavy load bursts on your application. It is same like Rendezvous Point in LoadRunner and create big load at various places in JMeter plan.
Today we have introduction to different Timers in JMeter. In upcoming articles we will see functionality of each and every Timer in detailed with example. In next JMeter tutorial series We will cover the “Assertions in JMeter”. If you are in Performance Testing area, your valuable inputs will help our readers to know more about Performance Testing (Non-Functional Testing). So please share your thoughts and tips on Performance Testing in comments below.
Don’t Miss Another Article
Join over 10,000 people who get FREE and fresh content from this Blog.
We Respect Privacy, You’re Safe! No Spam!
- Elements of JMeter
- JMeter Installation Guide
- Hands on with JMeter GUI
- Tutorial 1: Introduction to Apache JMeter
- Recording using HTTP Proxy Server in JMeter – Performance Testing Tools
- How to do Performance Testing using JMeter? – JMeter Tutorials Series Day 5
- Assertions in JMeter – JMeter Tutorials Series Day 7
- Uses of Processor in JMeter – JMeter Tutorials Series Day 9
- Uses of Controllers in JMeter – JMeter Tutorials Series Day 8
- Big Data: From Testing Perspective
1 thought on “Timers in JMeter – JMeter Tutorials Series Day 6”
I want to use both “Constant Throughput Timer ” and “Gaussian Random Timer”.
Is that possible?