JMeter – Gaussian Random Timer

As the name suggested, JMeter Gaussian Random Timer is used to generate and add the random delay before the execution of a sampler. This timer is based on the Normal or Gaussian Distribution Function. The delay (think) time is the sum of the Gaussian distributed value (with mean 0.0 and standard deviation 1.0) times the deviation value you specify and the offset value.

How to add ‘Gaussian Random Timer’?

Follow the below steps to add the Gaussian Random Timer in the script:

  1. Select any appropriate element from the below list where you want to add the timer
    1. Test Plan
    2. Thread Group
    3. Controller
    4. Sampler
  2. Right-click on the element
  3. Hover the mouse on ‘Add’
  4. Hover the mouse on ‘Timers’
  5. Click ‘Gaussian Random Timer’

What are the input fields ‘Gaussian Random Timer’?

‘Gaussian Random Timer’ has the following input fields:

  1. Name: To provide the name of the timer
  2. Comments: To provide arbitrary comments (if any)
  3. Deviation (in milliseconds): The number shows how much the delay can deviate from the given offset towards the higher and lower range. 
  4. Constant Delay Offset (in milliseconds): The number shows a constant delay which will be added in a random number generated by the Gaussian Function in the range of the given deviation value.
Figure 01: Gaussian Random Timer

Example:

If Constant Delay Offset is 1000 and the deviation is 200 then Gaussian Random Timer will generate the random number in the range of 800 to 1200 milliseconds:

Gaussian Random Timer Delay = 1000 + GF*200  

where GF value could be from -1 to 1

Additional Information:

  • The probability of satisfying the deviation range is around 68%.
  • The Gaussian Random timer is processed before each sampler in the scope in which it is found; if there are several timers in the same scope, all the timers will be processed before each sampler.
  • Timers are only processed in conjunction with a sampler. A timer which is not in the same scope as a sampler will not be processed at all.
  • To apply the timer to a single sampler, add the Gaussian Random Timer as a child element of the sampler.
  • To apply the timer after a sampler, either add the Gaussian Random Timer as a child element of the next sampler or as a child element of Flow Control Action.

You may be interested:


Leave a Comment