From iMacros
Jump to: navigation, search

Name change: Please use iimGetStopwatch instead. See API enhancements for details.

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


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


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.


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)


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
    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