MeasureSetRaw Function

Action

Sets the raw values of a counter/timer identified by sName and nClass. When this function is called for a specified counter/timer for the first time, the counter/timer is automatically allocated and initialised.

Predefined measures are using following units:

  • for timers: milliseconds.

  • for capacities: bytes.

Include file

Kernel.bdh

Syntax

MeasureSetRaw( in sName        : string,
               in nClass       : number,
               in nCount       : number,
               in fSum         : float,
               in fSqSum       : float,
               in fMin         : float,
               in fMax         : float,
               in nBelowBound1 : number optional,
               in nBelowBound2 : number optional ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
sName

Name of the object concerned with the measurement. Must be one of the following:

  • Custom time measure.

  • Custom counter.

  • Transaction. Specify the transaction name as declared in the load testing script.

  • SQL command. Make sure to specify the SQL command identifier (defined in the dclsql section of the test script) in capital letters.

  • Web form. Make sure that the specified Web form identifier (defined in the dclform section of the test script) is in capital letters.

  • CORBA object

  • TUXEDO service

nClass

Specifies the type of measure to set.

To set the value of a custom time measure, pass the MEASURE_TIMER_RESPONSETIME parameter to the function.

To set the value of a custom counter, pass the MEASURE_COUNTER_CUSTOMCOUNTER parameter to the function.

To set the value of an average counter, pass the MEASURE_COUNTER_AVERAGE parameter to the function.

In any other case, pass any of the following parameters to the function, depending on the type of information you are interested in.

  • MEASURE_PAGE_PAGETIME (for protocol-level load testing)

  • MEASURE_PAGE_ACTIONTIME (for browser-driven load testing)

  • MEASURE_PAGE_PAGEBYTES

  • MEASURE_PAGE_EMBEDDEDBYTES

  • MEASURE_PAGE_DOCDOWNLOAD

  • MEASURE_PAGE_SERVERBUSY

  • MEASURE_IIOP_ROUNDTRIP

  • MEASURE_IIOP_SERVERBUSY

  • MEASURE_SQL_SQLPARSE

  • MEASURE_SQL_SQLEXEC

  • MEASURE_SQL_SQLEXECDIRECT

  • MEASURE_TRANS_TRANSOK

  • MEASURE_TRANS_TRANSERR

  • MEASURE_TRANS_TRANSCA

  • MEASURE_FORM_BYTESSENT

  • MEASURE_FORM_BYTESRECEIVED

  • MEASURE_FORM_HITSOK

  • MEASURE_FORM_HITSERR

  • MEASURE_FORM_ROUNDTRIP

  • MEASURE_FORM_SERVERBUSY

  • MEASURE_TUXEDO_BYTESSENT

  • MEASURE_TUXEDO_BYTESRECEIVED

  • MEASURE_TUXEDO_RESPONSETIME

nCount Number of values for this measure that are set with this call.
fSum Sum of the measure values.
fSqSum Sqare sum of the measure values.
fMin The minimum measure value.
fMax The maximum measure value.
nBelowBound1 Number of values for this measure that are below the time bound 1.
nBelowBound2 Number of values for this measure that are below the time bound 2.

Example

transaction TMeasure
var
  fValue : float;
begin
  MeasureSetRaw("measure1", MEASURE_COUNTER_CUSTOMCOUNTER,
                10, 100.0, 1000.0, 9.0, 10.0);
  ...
  MeasureSetRaw("measure1", MEASURE_COUNTER_CUSTOMCOUNTER,
                2, 6.0, 12.0, 1.0, 4.0);
  ...
  MeasureGet("measure1", MEASURE_COUNTER_CUSTOMCOUNTER, MEASURE_KIND_COUNT, fValue);
  // expected value: 12
  Print("Measure Count: " + string(fValue));
  MeasureGet("measure1", MEASURE_COUNTER_CUSTOMCOUNTER, MEASURE_KIND_SUM, fValue);
  // expected value: 106
  Print("Sum of all measures: " + string(fValue));
  MeasureGet("measure1", MEASURE_COUNTER_CUSTOMCOUNTER, MEASURE_KIND_MIN, fValue);
  // expected value: 1
  Print("Minimum value of all measures: " + string(fValue));
end TMeasure;