MeasureSetOption Function

Action

Set different options for a measure or measure group. You can enable or disable raw measure data or time series data collection. In addition, you can enable and configure the generation of quantile data, and you can enable real-time data collection so that you can see the measures in Performance Explorer during a test in real-time.

Include file

Kernel.bdh

Syntax

MeasureSetOption( in sName   : string,
                  in eClass  : number,
                  in eOption : number,
                  in uValue  : union): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
sName Measure name that identifies the measure. When this parameter is set to NULL or "", the option is set for all measures of the provided measure type.
eClass Specifies the type of measure type.
  • 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
  • MEASURE_COUNTER_AVERAGE
  • MEASURE_PAGE_PAGETIME (for protocol-level load testing)
  • MEASURE_PAGE_DOCDOWNLOAD
  • MEASURE_PAGE_SERVERBUSY
  • MEASURE_PAGE_PAGEBYTES
  • MEASURE_PAGE_EMBEDDEDBYTES
  • MEASURE_PAGE_ACTIONTIME (for browser-driven load testing)
  • MEASURE_TRANS_TRANSBUSYOK
  • MEASURE_TRANS_TRANSBUSYERR
  • MEASURE_TRANS_TRANSBUSYCA
eOption Specifies the option which a value is set for.
  • MEASURE_OPT_REALTIME: Set the uValue parameter to true or false to enable or disable the collection of measure data for real-time view in Performance Explorer. The real-time measure data collection is disabled for all measures by default.
    注: To enable real-time measure data in general, make sure to check the Enable real-time measures check box on the Workload Configuration dialog.
  • MEASURE_OPT_PERCENTILES: Set the uValue parameter to true or false to enable or disable percentile reporting for the specified measure or measure group.
  • MEASURE_OPT_PERCENTILES_GRANULARITY: Set the uValue parameter to the percentile granularity for the specified measure or measure group. The default value is OPT_PERCENTILES_GRANULARITY_10_PER_MIL. For a full list of granularity values see the topic MeasureCalculateRawPercentiles Function.
  • MEASURE_OPT_TIMESERIES: Set the uValue parameter to true or false to enable or disable time series data collection for the specified measure or measure group. The default value is defined by the corresponding profile setting.
  • MEASURE_OPT_RAWDATA: Set the uValue parameter to true or false to enable or disable raw data collection for the specified measure or measure group. The default value is defined by the corresponding profile setting.
uValue

The value related to the selected option. See the description of the eOption parameter for valid values.

Example

dcltrans
  transaction TMain
  var
    fValue :  float;
  begin
      MeasureSetOption("Measure1", MEASURE_PAGE_PAGETIME, MEASURE_OPT_REALTIME, true);

      MeasureSetOption("", MEASURE_PAGE_PAGETIME, MEASURE_OPT_RAWDATA, true);

      MeasureSetOption("", MEASURE_ALL, MEASURE_OPT_TIMESERIES, false);

      MeasureSetOption("Measure1", MEASURE_COUNTER_CUSTOMCOUNTER, MEASURE_OPT_PERCENTILES, true);
      MeasureSetOption("Measure1", MEASURE_COUNTER_CUSTOMCOUNTER, MEASURE_OPT_PERCENTILES_GRANULARITY, OPT_PERCENTILES_GRANULARITY_1_PER_MIL);

  end TMain;