ThinkTime Function

Action

Simulates thinking periods during user transactions (for example, the time required to enter input data). This function only affects simulation in case of a real load test. Note that during Try Script runs, think times are ignored completely.

Include file

Kernel.bdh

Syntax

ThinkTime( in fTime      : float,
           in nOption    : number optional,
           in nDeviation : number optional ): float;

Return value

Actual thinking time (in seconds).

Parameter Description
fTime Time interval that the simulated user must wait (in seconds).
nOption

Specifies whether or not random values should be generated for think time periods (optional). The following options are available:

  • OPT_THINKTIME_STRESSTEST. Think time is ignored so that the tested system can be stressed using maximum load.

  • OPT_THINKTIME_EXPONENTIAL. Random think time values are generated following an exponential distribution. The fTime parameter specifies the mean value of the distribution.

  • OPT_THINKTIME_UNIFORM. Generates random think time values following a uniform distribution. The deviation factor (3rd parameter) specifies the deviation range above and below the think time value.

  • OPT_THINKTIME_FORCEEXACT. The specified think time is maintained regardless of profile settings.

When this parameter is omitted, the user waits as long as specified.

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

Example

dcltrans
  transaction TMain
  begin
    SetStressTest(false);
    ThinkTime(3.0);
    WebUrl("http://www.MyCompany.com");
    ThinkTime(5.0, OPT_THINKTIME_EXPONENTIAL);
    WebUrl("http://support.MyCompany.com/index.jspa");
    ...
  end TMain;

Sample scripts

RandomLogin.bdf, Measure01.bdf, Measure02.bdf, Measure03.bdf, OraSample.bdf, DBApi01.bdf