JMeter Timers
Last updated
Last updated
User behavior in depends on many factors. Those factors can be “ramp-up time”, “user count on the system in a specific time interval”, etc. and most of them rely on timing. The time between user actions defines the realism of the scenario. That’s why JMeter offers various Timer for you to use in your performance test projects.
By default, executes all samplers one after another. There is no delay between sampler’s execution. This makes our tests non-realistic because no user goes into a page and clicks to a link, then does another request. A user thinks, reads, writes in a web or mobile app. So all those times are the key characteristic of your scenario. In , this is called “think time”. Testing without a timer can create irregular test results because the simulated requests will come in a different pattern than what is seen in a real-world situation.
In JMeter, there are 9 different Timer types.
Constant Timer
Uniform Random Timer
Precise Throughput Timer
Constant Throughput Timer
Gaussian Random Timer
JRS223 Timer
Poisson Random Timer
Synchronizing Timer
BeanShell Timer
Each timer has its own behavior. Let’s have a look at some major Timers.
Uniform Random Timer: This timer lets your Samplers wait in a specific time interval according to the given values. You should provide two values. First one is the constant delay, the second one is the random delay.
Example
Constant Time: 500ms
Random Delay: 100ms
Our samplers will wait x amount of milliseconds between 400ms and 600ms.
Gaussian Random Timer: It follows a normal or Gaussian distribution method. It provides a delay based on a constant and standard deviation.
There are examples that you can look into.
Constant Timer: This is the most basic timer provides. All Samplers will wait a constant time interval according to the value you provided. The thread delay is in milliseconds.
JRS223 Timer and BeanShell Timers: They both require you to write some scripts by using javascript, groovy or scripting language.
We recommend you to use scoping articles that we recently published.
Happy !
If you don't see the answer to your question here, please to let us know! We're always improving our documentation.