Example: lr.think_time
In the following segment, lr.think_time instructs the script to pause for 1 second before printing the Vuser ID string.
In this example lr.get_transaction_duration, checks the duration of part of a transaction, and sends it to the Output window.
int status; lr.start_transaction ("Flight");
web.url("home;sz=234x60;tile=1;ord=977672495775323400", "URL=http://ad.doubleclick.net/...ord=977672495775323400", new String[] { //... "Mode=URL", web.LAST}); // Get transaction time to this point think_time=lr.get_transaction_think_time("Flight"); status = web.submit_data("flight", "Action=http://www.Web-tours.com/cgi-bin/tours?ITN_RESPONSE+", new String[] { "Method=POST", "TargetFrame=", //... web.LAST}, new String[] { "MY DATA", //... web.LAST});
/* End transaction with operation result - pass or fail */ if (status == 0) lr.end_transaction("Flight", lr.PASS); else lr.end_transaction("Flight", lr.FAIL); if (think_time > 0) lr.output_message("The transaction think time is" + think_time + "seconds."); else lr.output_message("The think time cannot be determined.");