Pergunta

I have read the Gaussian Random Timer info in jmeter user manual but it is difficult to understand. any one have idea related to this please explain with example highly appreciated. Thanks in advance.

Foi útil?

Solução

The Gaussian Random Timer has a random deviation (based on Gauss curve distribution) around the constant delay offset.

For example:

  • Deviation: 100 ms
  • Constant Delay Offset: 300 ms

The delay will vary between 200 ms (300 - 100) and 400 ms (300 + 100) based on Gauss distribution for about 68% of the cases.

Outras dicas

I'll try to explain it with one of the examples already posted:

  • Constant delay offset: 1000 ms
  • Deviation: 500 ms

Approximately 68% of the delays will be between [500, 1500] ms (=[1000 - 500, 1000 + 500] ms).

According to the docs (emphasis mine):

The total delay 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

Apache JMeter invokes Random.nextGaussian()*range to calculate the delay. As explained in the Wikipedia, the value ofnextGaussian() will be between [-1,1] only for about 68% of the cases. In theory, it could have any value (though the probability to get values outside of this interval decreases very quickly with the distance to it).

As a proof, I have written a simple JMeter test that launches one thread with a dummy sampler and a Gaussian Random Timer: 3000 ms constant delay, 2000 ms deviation:

Gaussian Timer Configuration

To rule out cpu load issues, I have configured an additional concurrent thread with another dummy sampler and a Constant Timer: 5000 ms:

Constant Timer

The results are quite enlightening:

JMeter test results

Take for instance samples 10 and 12: 9h53'04.449" - 9h52'57.776" = 6.674", that is a deviation of 3.674" in contrast to the 2.000" configured! You can also verify that the constant timer only deviates about 1ms if at all.

I could find a very nice explanation of these gaussian timers in the Gmane jmeter user's list: Timer Question.

Gaussian Random Timer is nearly the same as Uniform Random Timer.

  • In Uniform Random Timer the variation around constant offset has a linear distribution

  • In Gaussian Random Timer, the variation around constant offset has a gaussian curve distribution.

Constant delay offset(mu)=300 ms,deviation(si)=100 ms mu-si=200,mu+si=400,There are 68% chances of the time gap between two threads are in range of[200,400]

mu-2(si)=100,mu+2(si)=500,There are 95% chances of time gap between two threads are in range of[100,500]

mu-3(si)=0,mu+3(si)=300,there are 99.7% chances of the time gap between two consecutive threads are in range of[0,600]

when you go on like this some where you will get 100% probability that time gap between two threads is 100%

I am restricting my self to 3 iterations because mu-4(si) yields a negative value and time elapsed is always a positive value in this universe.

But it will be very unrealistic to depend on gaussian timer as we have constant timer and constant through put timer with no standard deviation(si).

Hope that it helps.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top