lr.get_transaction_duration

Returns the duration of a transaction.

JavaScript

function lr.get_transaction_duration(  transaction  )

VBScript

Function lr.get_transaction_duration(  transaction  )
Example: Transaction Duration, set_transaction, and waste timeTransaction Functions

Arguments

NameComments
transactionA 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.

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

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.

Parameterization

Standard parameterization is not available for this function.