MeasureStop Function

Action

Stops a custom time measure started with the MeasureStart function and returns the value of the time measure. It waits for all running threads (WebThreadWait) and stops the page timer.

The results of the measurements are reported in the result files and the result database of Silk Performer. You need not define measures for SQL commands, Web forms, entire transactions, or wait statements because Silk Performer automatically measures the time for these statements.

Include file

Kernel.bdh

Syntax

MeasureStop( in sMeasure       :string
             in bIgnoreOnError : boolean optional ): number;

Return value

Final value of the custom time measure in 1/1000 secs.

Parameter Description
sMeasure Measure name identifying the custom time measure to stop
bIgnoreOnError When enabled, measured time is included in calculations if no error has occurred since the timer started (optional). The default value is false.

Example

dcltrans
  transaction TMain
  var
    fValue : float;
    nTime : number;
  begin
    MeasureStart("TimeMeasure");
    wait 1.0;
    MeasurePause("TimeMeasure");
    wait 2.0;
    MeasureResume("TimeMeasure");
    wait 3.0;
    nTime := MeasureStop("TimeMeasure");
    MeasureGet("TimeMeasure", MEASURE_TIMER_RESPONSETIME,
    MEASURE_KIND_SUM, fValue);
    write("time = "); write(nTime); writeln;
    write("value = "); write(fValue); writeln;
  end TMain;

Sample scripts

Measure01.bdf, Measure02.bdf, Measure03.bdf, OraArrayFetch.bdf, OraSample.bdf, DBApi01.bdf, Trans.bdf, MutexLogin.bdf, WebMeasure01.bdf, WebTimer01.bdf