Retrieves a specific Silk Performer measure value, for example, the maximum, the minimum or the average value of a specified measure performed during the simulation of the current virtual user, or the standard deviation of the collected measure values.
Using this function, you can do the following:
Retrieve the value of a custom time measurement performed using the MeasureStart and the MeasureStop function.
Retrieve the counter value of a custom counter accessed using the MeasureInc function.
Check how often specific transactions have been executed successfully, and how often given transactions have been canceled.
Retrieve response times and throughput information concerning SQL commands, Web forms, CORBA objects, and TUXEDO services.
Kernel.bdh
MeasureGet( in sName : string, in nClass : number, in nKind : number, out fTime : float, in bAll : boolean 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 retrieve. To retrieve the value of a custom time measure, pass the MEASURE_TIMER_RESPONSETIME parameter to the function. To retrieve the value of a custom counter, pass the MEASURE_COUNTER_CUSTOMCOUNTER parameter to the function. To retrieve 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.
|
nKind |
Specifies the type of measure value to retrieve. The following options are possible:
|
fTime | Variable receiving the measure value |
bAll |
Specifies the time interval used for measurement value calculation (optional).
|
dcluser user TestUser transactions TInit : begin; TMain : 10; TShutdown : end; dcltrans transaction TInit begin // start custom time measurement MeasureStart("TimeMeasure"); end TInit; transaction TMain begin // increment custom counter MeasureInc("TranCounter"); wait 0.3; end TMain; transaction TShutdown var fValue: float; begin // stop custom time measurement MeasureStop("TimeMeasure"); MeasureGet("TimeMeasure", MEASURE_TIMER_RESPONSETIME, MEASURE_KIND_SUM, fValue); write("Transaction execution took "); write(fValue); write(" seconds"); writeln; MeasureGet("TInit", MEASURE_TRANS_TRANSOK, MEASURE_KIND_COUNT, fValue); write("TInit transaction was executed "); write(fValue); write(" times"); writeln; MeasureGet("TranCounter", MEASURE_COUNTER_CUSTOMCOUNTER, MEASURE_KIND_COUNT, fValue); write("TMain transaction was executed "); write(fValue); write(" times"); writeln; end TShutdown;
Measure01.bdf, WebMeasure01.bdf