Sets the value 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 is automatically allocated and initialised.
Predefined measures are using following units:
for timers: milliseconds.
for capacities: bytes.
Kernel.bdh
MeasureSet(in sName :string, in nClass : number, in nValue : number): 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.
|
nValue |
Value to set. Predefined measures are using following units:
|
dcltrans transaction TMain var fValue : float; begin MeasureSet("measure2", MEASURE_COUNTER_CUSTOMCOUNTER, 22); ... MeasureSet("measure2", MEASURE_COUNTER_CUSTOMCOUNTER, 22); ... MeasureGet("measure2", MEASURE_COUNTER_CUSTOMCOUNTER, MEASURE_KIND_SUM, fValue); Print("Val: " + string(fValue)); // expected value: 44 end TMain;