MeasureStart Function

Action

Starts a custom time measure in a transaction or a function with a specified measure name.

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

Include file

Kernel.bdh

Syntax

MeasureStart( in sMeasure : string ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
sMeasure Measure name used to identify the measure when calling additional measure functions and when analyzing the results written to both the results repository and individual result files

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