GetThinkTimeRandomization Function

Action

Returns the state of randomization for the think time periods specified in functions.

Include file

Kernel.bdh

Syntax

GetThinkTimeRandomization( out nDeviation : number optional ) : number;

Return value

Can be either:

  • OPT_TTR_EXACT: Specified think time periods are used as-is. However if think time adjustment is enabled, think time values can be adjusted as required.

  • OPT_TTR_FORCEEXACT: Specified think time periods are used without further adjustment.

  • OPT_TTR_EXPONENTIAL: Specified think time periods are randomized following an exponential distribution.

  • OPT_TTR_UNIFORM: Specified think time periods are randomized following a uniform distribution. The deviation factor nDeviation is also set.

Parameter Description
nDeviation The deviation factor used if OPT_TTR_UNIFORM is set. Must be a value between 1 and 100 (%).

Example

dcltrans
  transaction TMain
  var
    nTTR, nDev : number;
  begin
    nTTR := GetThinkTimeRandomization(nDev);
    if nTTR = OPT_TTR_EXACT then
      write("exact");
    elseif nTTR = OPT_TTR_FORCEEXACT then
      write("forceexact");
    elseif nTTR = OPT_THINKTIME_EXPONENTIAL then
      write("exponential");
    elseif nTTR = OPT_TTR_UNIFORM  then
      write("uniform: ");
      write(string(nDev));
      write("%");
    else
      write("not possible");
    end;
  end TMain;