Returns the duration of a transaction.


double lr.get_transaction_duration( string transaction );


Function lr.get_transaction_duration( ByVal transaction As String ) as Double
Example: lr.get_transaction_durationTransaction Functions


transaction The name of an open transaction.

The lr.get_transaction_duration function returns the duration in seconds of the specified open transaction to this point.

This function returns the duration including Wasted Time. Therefore, the value may be slightly greater than the duration reported for the function when closed with lr.end_transaction.

To determine other transaction statistics, such as think time and wasted time, use the Transaction Functions.

Return Values

The transaction duration in seconds. If the transaction already ended or if data is not available for the specified transaction, the function returns 0. On function failure, returns a negative number.


Standard parameterization is not available for this function.