Performance Testing @ the Frontline

A hidden world where small things make a big difference

LoadRunner Random Function with Normal (Gaussian) Distribution

Posted by Kim on Friday, July 10, 2015

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!

Gaussian distribution vs. Linear distribution

Gaussian distribution vs. Linear distribution

Image where the differences between the distributions can bee seen. The upper is a Gaussian distribution and the lower a Linear distribution.

 

Advertisements

2 Responses to “LoadRunner Random Function with Normal (Gaussian) Distribution”

  1. Mihail said

    Did you release this DLL somewhere? This is exactly what I’m looking for. Thanks!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: