lr.getTransactionThinkTime
Returns the think time of a transaction.
Example | Transaction Functions |
Syntax
lr.getTransactionThinkTime( transaction );
Arguments
Argument | Comments |
---|---|
transaction | The transaction name . |
The lr.getTransactionThinkTime function returns the think time of the specified transaction until this point. It returns values greater than zero only for open transactions.
To determine other transaction statistics, such as think time and wasted time, use the appropriate Transaction Functions.
Return Values
On success, returns the transaction think time in seconds. On failure, returns a negative number. If the transaction already ended or if data is not available for the specified transaction, returns 0.
Parameterization
You cannot use standard parameterization for any arguments in this function.
Example
function Action(){ var thinkTime; lr.startTransaction("Flight"); web.url( { name : 'kalimanjaro', url : 'http://kalimanjaro/', targetFrame : '', resource : 0, recContentType : 'text/html', referer : '', snapshot : 't1.inf', mode : 'HTML' } ); thinkTime=lr.getTransactionThinkTime("Flight"); status = web.url( { name : 'All kind of CGI\'s.', url : 'http://kalimanjaro/cgi_examples/cgi_overview.html', targetFrame : '', resource : 0, recContentType : 'text/html', referer : 'http://kalimanjaro/', snapshot : 't2.inf', mode : 'HTML' } ); /* End transaction with operation result */ if (status == 0) lr.endTransaction("Flight", lr.PASS); else lr.endTransaction("Flight", lr.FAIL); if (thinkTime) lr.outputMessage("The transaction think time is "+thinkTime+" seconds"); else lr.outputMessage("The think time cannot be determined."); return 0; }