Measure Function

Action

Specifies whether to perform measurements. This function turns the generation of results that are written to report files and the result repository on or off. Calling this function is only successful if neither a warm-up time nor a measurement time is specified in the workload settings.
注: This function does not affect the creation of time series data files.

Include file

Kernel.bdh

Syntax

Measure( in nStatus: number ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
nStatus

Specifies whether to enable or disable measurements. This parameter must contain one of the following flags:

  • MEASURE_ON. Enables measurements

  • MEASURE_OFF. Disables measurements

Example

dclrand
  rWait: RndUniF(0.0 .. 1.0);

dcltrans
  transaction TInit
  begin
    Measure(MEASURE_OFF);
  end TInit;

  transaction TMain
  var
    nCount: number init 0;
  begin
    nCount := nCount + 1;
    if nCount = 10 then Measure(MEASURE_ON) end;
    if nCount = 20 then Measure(MEASURE_OFF) end;
  end TMain;