Jmeter Pre-processors-1 | Loadium

Jmeter Pre-processors-1

Timer is playing one of the most important during load testing on server and if you perform load testing without any delay then server will

Jmeter Pre-processors-1

Timer is playing one of the most important during load testing on server and if you perform load testing without any delay then server will be overloaded and you will not get 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

Constant Timer

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.

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

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.

Gaussian Random Timer

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? Here it is: 200= 400(offset)-200(deviation) and 600=400(offset)+200(deviation)

To find this timer, see these steps,

  • Go to Thread Group
  • Add new Sampler
  • Right-click on Sampler
  • Click on Add
  • Click on Timer
  • Click on Gaussian Random Timer

This timer also has three sections,

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.

Uniform Random Timer

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.

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

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 It 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.

Constant Throughput Timer

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.

How to add this timer to your Sampler, Please 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

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.

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.

Thanks for reading. You can read the rest of the article in following days.

If you have questions please feel free to ask at Contact Us

Happy Load Testing!

Latest articles

All Articles →

Postman Alternatives for Api Testing

Postman Alternatives for Api Testing

How To Use Json Extractor in Jmeter

How To Use Json Extractor in Jmeter

What Is Multi Location Load Testing

What Is Multi Location Load Testing