Highlighted
New Member.
656 views

Is there a way to eliminate time spent of execution of custom code from a transaction in VuGen?

I have wriiten some custom code within a transaction in my VuGen script but want to exclude it from response time calculation. Is there a function/method that can help me exculde time spent on this part of code from the transaction?

The script is something like this..

lr_start_transaction(...)

web_submit_data(...)

<custom code>

web_submit_data(...)

lr_end_transaction

0 Likes
3 Replies
Highlighted
Outstanding Contributor.
Outstanding Contributor.

Re: Is there a way to exclude custom code from a transaction in VuGen?

You can user the lr_stop_transaction and lr_resume_transaction APIs.

0 Likes
Highlighted
New Member.

Re: Is there a way to exclude custom code from a transaction in VuGen?

The time spent in lr_stop_transaction - lr_resume_transaction block is also reported in lr_end_transaction output. It stops the timer only within the block. I want the time spent for execution of the block of code to be eliminated for the transaction.

This is the text on LR function library -

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.

0 Likes
Highlighted
Valued Contributor.
Valued Contributor.

Re: Is there a way to exclude custom code from a transaction in VuGen?

You can look into the concepts of lr_wasted_time() function.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.