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.
Kernel.bdh
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;
true if successful
false otherwise
Parameter | Description |
---|---|
sName |
Name of the object concerned with the measurement. Must be one of the following:
|
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.
|
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. |
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;