The renewal maintenance has officially ended for Progress iMacros effective November 30, 2023.
This Wiki site will also no longer be moderated from the Progress side.
Thank you again for your business and support.
Sincerely, The Progress Team
Difference between revisions of "Get-Response-Times.vbs"
Jump to navigation
Jump to search
(Some more words in the description) |
|||
Line 1: | Line 1: | ||
Script runs [[Demo-Stopwatch]] macro to measure a web site's response times and then displays the results. | Script runs [[Demo-Stopwatch]] macro to measure a web site's response times and then displays the results. | ||
− | + | set iim1= CreateObject ("imacros") | |
− | + | iret = iim1.iimInit ("") | |
− | + | iret = iim1.iimDisplay("Get Response Times Example") | |
− | + | iplay = iim1.iimPlay("demo-stopwatch") | |
− | + | data = iim1.iimGetLastExtract() | |
− | + | errortext = iim1.iimGetLastError() | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | If iplay < 0 Then | |
− | + | s = "The following error occurred: " + vbCrLf + vbCrLf + errortext | |
− | + | MsgBox s | |
− | + | MsgBox "Now trying to analyze extracted values that we collected before the error occurred" | |
− | + | End If | |
− | + | ||
− | + | 'Get and display extracted values (= response times!) | |
− | + | s =s+ "Intial page load time: " + iim1.iimGetLastExtract(1) + " Seconds (ID Firstpage)" +vbcrlf +vbcrlf | |
− | + | s =s+ "Form 1 submit time: " + iim1.iimGetLastExtract(2) + " Seconds (ID SubmitData)" +vbcrlf +vbcrlf | |
− | + | s =s+ "Online store form load time: " + iim1.iimGetLastExtract(3) + " Seconds (ID Store1)" +vbcrlf +vbcrlf | |
− | + | s =s+ "Overall macro run time: " + iim1.iimGetLastExtract(4) + " Seconds (ID total)" | |
− | + | MsgBox s | |
− | + | ||
− | + | iret = iim1.iimExit | |
− | + | WScript.Quit(0) | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 09:34, 5 February 2008
Script runs Demo-Stopwatch macro to measure a web site's response times and then displays the results.
set iim1= CreateObject ("imacros") iret = iim1.iimInit ("") iret = iim1.iimDisplay("Get Response Times Example") iplay = iim1.iimPlay("demo-stopwatch") data = iim1.iimGetLastExtract() errortext = iim1.iimGetLastError() If iplay < 0 Then s = "The following error occurred: " + vbCrLf + vbCrLf + errortext MsgBox s MsgBox "Now trying to analyze extracted values that we collected before the error occurred" End If
'Get and display extracted values (= response times!)
s =s+ "Intial page load time: " + iim1.iimGetLastExtract(1) + " Seconds (ID Firstpage)" +vbcrlf +vbcrlf s =s+ "Form 1 submit time: " + iim1.iimGetLastExtract(2) + " Seconds (ID SubmitData)" +vbcrlf +vbcrlf s =s+ "Online store form load time: " + iim1.iimGetLastExtract(3) + " Seconds (ID Store1)" +vbcrlf +vbcrlf s =s+ "Overall macro run time: " + iim1.iimGetLastExtract(4) + " Seconds (ID total)" MsgBox s iret = iim1.iimExit WScript.Quit(0)