JMeter Timers

Why Do I Need a Timer in JMeter?

User behavior in load testsarrow-up-right 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, JMeterarrow-up-right 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 performance testingarrow-up-right, this is called “think time”. Testing without a JMeterarrow-up-right 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.

Timer Types

In JMeter, there are 9 different Timer types.

  1. Constant Timer

  2. Uniform Random Timer

  3. Precise Throughput Timer

  4. Constant Throughput Timer

  5. Gaussian Random Timer

  6. JRS223 Timer

  7. Poisson Random Timer

  8. Synchronizing Timer

  9. BeanShell Timer

Each timer has its own behavior. Let’s have a look at some major Timers.

Constant Timer: This is the most basic timer JMeterarrow-up-right provides. All Samplers will wait a constant time interval according to the value you provided. The thread delay is in milliseconds.

Uniform Random Timer: This timer makes the sampler wait for a duration calculated as the constant delay plus a random value between 0 and the specified random delay.

circle-check

Gaussian Random Timer: It follows a normal or Gaussian distribution method. It provides a delay based on a constant and standard deviation.

JRS223 Timer and BeanShell Timers: They both require you to write some scripts by using javascript, groovy or BeanShellarrow-up-right scripting language.

How to Use Timers

We recommend you to use scoping articles that we recently published. Scopes in JMeterarrow-up-right

There are examples that you can look into.

Happy load testingarrow-up-right!

Getting Started with Loadiumchevron-rightJMeter Testchevron-rightPricingchevron-right

If you don't see the answer to your question here, please reach out to usarrow-up-right to let us know! We're always improving our documentation.

Last updated

Was this helpful?