Share this page

# lr.stop_transaction

Freezes the reporting of transaction data.

## C#

    void  lr.stop_transaction( string  transaction_name );

## VB.NET

    Sub lr.stop_transaction( ByVal transaction_name As String )

Example: lr.stop_transaction | Transaction Functions

## Arguments

Name | Comments
--- | ---
transaction_name | The name of an open transaction.

This function is retained for backward compatibility. For more general ways of reporting partial transaction durations, see lr.start_sub_transaction and lr.set_transaction.

After a call to lr.stop_transaction, statistics returned by the "get" Transaction Functions reflect only the data up to the call, until lr.resume_transaction is called. The specified transaction must have been opened with lr.start_transaction.

Data collection, however, is not interrupted. After the call to lr.resume_transaction, the "get" functions return all data since the start of the transaction. Furthermore, the final results when the test is analyzed will reflect the total values, including the periods in between the transaction stop and resume.

If lr.resume_transaction is not called, the "get" functions and the final results reflect only the duration from the transaction start to the lr.stop_transaction call. Thus, lr.stop_transaction and lr.resume_transaction can be used conditionally to collect information either about an entire transaction, or only the beginning. To accomplish this, call lr.resume_transaction only if your condition is met.

Note: When data is collected this way, the data in analysis will reflect both the tests where the condition for lr.resume_transaction is met, and the tests where it is not.

If the section you may wish to exclude ends before the end of the transaction, this technique does not apply. If you need to differentiate between occurrences where the lr.resume_transaction condition is met and those where it is not in the analysis data, this technique does not apply.

## Return Values

No value returned.

## Parameterization

All string input arguments can be passed using standard parameterization.

Tips to improve your search results... VuGen Function Reference Version 25.1-25.3 Function Reference 25.1-25.3 All View Local Help Center View Online Help Center Version: