iimGetLastPerformance

From iMacros

Jump to: navigation, search

Available since v6.85.


Returns the data of the STOPWATCH command. If there is no STOPWATCH command in the macro then iimGetLastPerformance returns only one value ("Total Runtime").

Contents

Syntax

Int ret = iimGetLastPerformance ( int index, string name, string value)

Parameters

in: index: The index of the measurement to get

out: name: The name of the STOPWATCH label

out: value: The performance measurement

The return value is 1 if a value exits for a given index, or -1 if no data is available.

Examples:

iimGetLastPerformance (1, name, value ) - returns 1st measurement, which is always the total runtime

iimGetLastPerformance (2, name, value ) - returns 2nd measurement, if you have a STOPWATCH command in the macro (and so on)

Examples

Display the performance data from a macro (Visual Basic Script example):

 'Get stopwatch values
 Dim name, value,i
 i = 1
 s = "Performance Data"+vbcrlf+vbcrlf
 do 
    iret = iim1.iimGetLastPerformance (i, name, value)
    if iret > 0 then s = s + "Label: "+name + " --> "+ value + " s"+vbcrlf
    i = i+1
 loop while iret > 0

See Also

STOPWATCH, Get-Response-Times.vbs

Personal tools