JMeter: Controllers and Timers

Reading Time: 4 minutes

Logical Controller in JMeter :

  • It helps us to control the flow, the order of processing of samplers in a thread.
  • It can also change the order of requests coming from their child elements.

Types of Logical Controller :

  1. Simple Controller: It is just a container that contains user request.

2. Loop Controller: It provides functionality to run user requests a specific number of times.

We can Add a loop controller to the thread group by using the below steps.

Right click on Thread Group >> Add >> Logic Controller >> Loop Controller

3. Transaction Controller: It is used to group multiple sampler requests into one.

4. Random Controller: It provides functionality to run user requests in random order for each loop i.e. One random user request in each loop.

Add a random controller to the thread group by using the below steps.

Right click on Thread Group >> Add >> Logic Controller >> Random Controller

5. Interleave Controller: It allows us to pick and execute a single child element out of multiple child in each loop iteration.

Add interleave controller to thread group by using the below steps.

Right click on Thread Group >> Add >> Logic Controller >> Interleave Controller

6. Throughput Controller: It is used to control the processing of its child elements in terms of the total number of executions or the percentage of execution specified in its control panel.

7. If controller: Using If Controller, we can specify a condition whether the child element inside it will run or not based on a condition that should evaluate to true or false.

8. While Controller: It is used to run the child elements inside it till the value specified in its control panel is evaluated to false.

Timers in JMeter :

  • Timers allow JMeter to delay between each request which a thread makes. A timer can solve the server overload problem.
  • In real life visitor does not arrive at a website all at the same time, but at different time interval. So Timer will help mimic the real-time behavior.

Types of Timers :

  1. Constant Timer: It delays each user request for the same amount of time.

2. Gaussian Random Timer: It delays each user request for a random amount of time.

3. Uniform Random Timer: It is used to delay each request for a random period of time.

Total amount of delay   =   Random Delay Maximum    +    Constant Delay Offset

4. Synchronizing Timer: It holds the threads until X number of threads have arrived, and then they are all released at once. It adds delays between requests such that all (defined) threads fire at the same time thus creating heavy load bursts on the application. This timer is very useful to make users (threads) to do the simultaneous task.

5. Poisson Random Timer: It is similar to Gaussian Random timer. It provides delay time between the requests for a random interval of time and the total delay in time is the sum of both Lambda (in milliseconds) and Constant Delay offset (in milliseconds). Random number generation is based on Poisson distribution.

That’s it, folks. I hope you enjoyed it and it helped you!! stay connected for next part of JMeter.

References :

Knoldus-blog-footer-image

Written by 

I am curious about to learn new technologies. I have good understanding of performance testing concepts.

Discover more from Knoldus Blogs

Subscribe now to keep reading and get access to the full archive.

Continue reading