SetRandomThinkTime Function


Enables randomization for the thinktime periods specified in several functions. If randomization is enabled you can choose between exponential distribution and uniform distribution (parameter eOption). The seed value of the random number generator may be set using the RndSeed function.

Note: This function overrides the setting specified in the Simulation tab of the Profile Settings - Simulation dialog.

Include file



SetRandomThinkTime( in bRandom    : boolean
                    in eOption    : number optional,
                    in nDeviation : number optional );
Parameter Description
bRandom If this parameter is set to true, randomization for thinktime periods is enabled

Can be either:

  • OPT_THINKTIME_EXPONENTIAL : For exponential distribution (default).

  • OPT_THINKTIME_UNIFORM : For uniform distribution. You have to specify also the deviation factor (3rd parameter) that has to be a value between 1 and 100%.

nDeviation The deviation factor used if OPT_THINKTIME_UNIFORM is set (in %).


  transaction TMain
    SetRandomThinkTime(true, OPT_THINKTIME_EXPONENTIAL);
    WebUrl("http://standardhost/index.html", 2.1);
    // 2.1 is the mean value of the
    // exponential distributed thinking period
  end TMain;