MeasureIncFloat Function

Action

Increments the value of a custom counter by a floating-point value. When this function is called for a specified custom counter for the first time, the counter is automatically allocated and initialized. You do not need to call any other measure functions when using a Silk Performer measure for counting purposes.

Include file

Kernel.bdh

Syntax

MeasureIncFloat( in sMeasure : string,
                 in fValue   : float,
                 in sUnit    : string optional,
                 in nUsage   : number optional ):float;

Return value

The value of the custom counter after the increment operation.

Parameter Description
sMeasure Measure name identifying the custom counter to increment.
fValue Increment value. This parameter may be negative or zero.
sUnit String that specifies the measurement unit (optional). The length of this string is limited to 19 characters.
nUsage

Defines the way in which Performance Explorer displays the counter by default (optional). This parameter can be one of the following.

  • MEASURE_USAGE_TIMER. The average value is displayed by default.

  • MEASURE_USAGE_SUM_COUNTER: The sum is displayed by default (default).

  • MEASURE_USAGE_AVG_COUNTER: The average value is displayed by default.

  • MEASURE_USAGE_SUMONLY_COUNTER: The sum is displayed as default. In this case you cannot choose a different data source.

  • MEASURE_USAGE_EVENT_COUNTER: The count value is displayed by default.

  • MEASURE_USAGE_AVGONLY_COUNTER: The average is displayed by default. In this case you cannot choose a different data source.

Example

dcltrans
  transaction TMain
  begin
    ...
    MeasureIncFloat("Custom Counter", 0.5, NULL, MEASURE_USAGE_SUMONLY_COUNTER);
    ...
  end TMain;