Open topic with navigation
Returns the duration of a transaction.
function lr.get_transaction_duration( transaction )
Function lr.get_transaction_duration( transaction )
|Example: Transaction Duration, set_transaction, and waste time||Transaction Functions|
|transaction||A string indicating the name of a transaction.|
The lr.get_transaction_duration function returns the duration in seconds of the specified transaction to this point. You use this function to determine the total transaction time before the transaction has ended. lr.get_transaction_duration returns values greater than zero only for open transactions.
To determine other transaction statistics, such as think time and wasted time, use the Transaction Functions.
On success, returns the transaction duration 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.
Standard parameterization is not available for this function.