MeasureSetBound Function

Action

Determines the bound value for a specified time measure or the default bound value for a specified time measure type. Result reports list the percentage of all time measure values within the time bound specified. A time bound is commonly set to the amount of time that represents the goal for the completion of, for example, the transaction being tested. An optional severity level value may be specified for a bound exceeding message, which is reported whenever this bound is exceeded by a value.

Ideally, this function is called before a measure is created and/or used.

Include file

Kernel.bdh

Syntax

MeasureSetBound( in sName     : string allownull,
                 in nClass    : number,
                 in nBound    : number,
                 in fValue    : float,
                 in nSeverity : number optional := SEVERITY_ERROR ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
sName Measure name identifying the measure. If this parameter is set to NULL or "" the default bound is set for the provided measure type.
nClass Measure class or measure type, must be one of the following:
  • 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_TIMER_RESPONSETIME

  • MEASURE_COUNTER_CUSTOMCOUNTER

  • 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

nBound

Number of the measure bound specified through the fValue parameter.

If this parameter is set to 1, measure bound 1 will be set to fValue. Otherwise, if this parameter is set to 2, measure bound 2 will be set to fValue

fValue

Bound value for the specified measure (in seconds)

注: If the value for bound 1 is higher than the value for bound 2, the measure is regarded with inverse logic: the higher the measured value the better.

For example: If a measure monitors a resource pool, a healthy value is one above bound 1. If the value falls below bound 1 but still is above bound 2, a warning might be triggered.

As a consequence, always define both bounds to avoid unwanted reporting behavior.

nSeverity Optional: Severity of the error that is raised if the verification fails. Can be one of the following values:
  • SEVERITY_SUCCESS: Success; no error (numerical value: 0)
  • SEVERITY_INFORMATIONAL: Informational; no error (numerical value: 1)
  • SEVERITY_WARNING: Warning; no error (numerical value: 2)
  • SEVERITY_ERROR: (Default) Error; simulation continues (numerical value: 3)
  • SEVERITY_TRANS_EXIT: Error; the active transaction is aborted (numerical value: 4)
  • SEVERITY_PROCESS_EXIT: Error; the simulation is aborted (numerical value: 5)

Example

dcltrans
  transaction TMain
  begin
    MeasureSetBound("Bank/AccountManager",
                    MEASURE_IIOP_ROUNDTRIP, 1, 5.0);
    MeasureSetBound("Bank/AccountManager",
                    MEASURE_IIOP_ROUNDTRIP, 2, 10.0,
                    SEVERITY_WARNING);
    MeasureSetBound("Bank/AccountManager",
                    MEASURE_IIOP_SERVERBUSY, 1, 3.0,
                    SEVERITY_WARNING);
    MeasureSetBound("Bank/AccountManager",
                    MEASURE_IIOP_SERVERBUSY, 2, 5.0,
                    SEVERITY_ERROR);

    ...
  end TMain;

Sample scripts

Measure03.bdf, WebMeasure01.bdf