Many times when performance tests are designed, the think-time between actions of the actual users is simulated with an approximation of the actual time it takes for a user to do their task. Unfortunately LoadRunner only offers a linear random distribution to an average wait time via the Runtime settings.
|I’ve created a DLL with an easy to use function called lrc_Rand_Gaussian() that returns a value between a Min and a Max, with a random spread according to the Gaussian (normal) distribution.The definition of the function is as follows:
long lrc_Rand_Gaussian( long Min, long Max );
To use the function in a think-time statement you would do this:
// Random think-time between 5 and 15 seconds, with Gaussian distribution lr_think_time( lrc_Rand_Gaussian(5,15) );
Note: Remember to disable the 50% to 150% randomization of think-times in the RunTime Settings!
I will release the DLL in due time. It contains many more interesting functions, such as hash functions for SHA1, SHA2, MD4, MD5 and many many more…
Comments are always welcome!
Image where the differences between the distributions can bee seen. The upper is a Gaussian distribution and the lower a Linear distribution.