GetPacingTime Function

Action

Gets the pacing time.

Include file

Kernel.bdh

Syntax

GetPacingTime( out ePacingMode  : number, 
               out ePacingScope : number optional,
               out fTimeMinSecs : double optional,
               out fTimeMaxSecs : double optional ): boolean;
Parameter Description
ePacingMode
  • OPT_PACING_MODE_OFF (0)
  • OPT_PACING_MODE_PACINGTIME (1)
  • OPT_PACING_MODE_TOTALTIME (2)
ePacingScope
  • OPT_PACING_SCOPE_TRANSACTION (1)
  • OPT_PACING_SCOPE_SESSION (2)
fTimeMinSecs The minimum value of the pacing time in seconds
fTimeMaxSecs The maximum value of the pacing time in seconds

Return value

  • true if successful

  • false otherwise

Example

benchmark BenchmarkName

use "kernel.bdh" 
  
dcluser  
  user
    VUGroup
  transactions
    TmyTrans1       : 1;
                              
dcltrans
  transaction TmyTrans1
  var
    nPacingMode : number;
    nPacingScope : number;
    fTimeMin : float;
    fTimeMax : float;
  begin
    // wait a random time between 5 to 10 seconds after each transaction
    SetPacingTime(OPT_PACING_MODE_PACINGTIME, OPT_PACING_SCOPE_TRANSACTION, 5.0, 10.0);    
    
    // receive Pacing information
    GetPacingTime(nPacingMode, nPacingScope, fTimeMin, fTimeMax);
    Print("Pacing Mode: " + string(nPacingMode) + ", " +
          "Pacing Scope: " + string(nPacingScope) + ", " +
          "Time Min: " + string(fTimeMin) + ", " +
          "Time Max: " + string(fTimeMax));
    
  end TmyTrans1;