SetThinkTimeRandomization Function

Action

Allows for the changing of think time randomization for various functions.

注: This function overrides the setting on the Simulation tab of the Profile Settings - Simulation dialog.

Include file

Kernel.bdh

Syntax

SetThinkTimeRandomization( in eOption    : number,
                           in nDeviation : number optional );
Parameter Description
eOption

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. A deviation factor must be specified with this option (parameter nDeviation).

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

Example

dcltrans
  transaction TMain
  begin
    SetThinkTimeRandomization (OPT_TTR_UNIFORM, 20 /* % */);
    WebUrl("http://standardhost/index.html", 2.1);
    // 2.1 is the mean value of the
    // uniform distributed thinking period
  end TMain;