Big news! The community will be moving to a new platform April 21. Read more.
Big news! The community will be moving to a new platform April 21. Read more.
Cadet 1st Class
Cadet 1st Class
481 views

Not getting wasted time using lr_get_transaction_wasted_time function

Jump to solution
Hi Guys,
I am using lr_get_transaction_wasted_time function and have put this function within the transaction to get the transaction wasted time but it returns 0. But from vuser log I can see values for the wasted time. 
This script is created  in TruClient-web protocol.
Any leads on this ?
0 Likes
1 Solution

Accepted Solutions
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

Hi,

In TruClient, the wasted time is reported upon transaction end. You can get it from the output of end transaction.

If you need to get the value, a workaround is:

    lr_start_transaction("Trans1");

    lr_start_transaction("Transaction Foo");

   .... (your script)

   lr_end_transaction("Transaction Foo",0);

    lr_get_transaction_wasted_time("Trans1")

    lr_end_transaction("Trans1",0);

 

Transaction Foo is used to force LR to calculate the wasted time for Trans1

View solution in original post

2 Replies
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

Hi,

In TruClient, the wasted time is reported upon transaction end. You can get it from the output of end transaction.

If you need to get the value, a workaround is:

    lr_start_transaction("Trans1");

    lr_start_transaction("Transaction Foo");

   .... (your script)

   lr_end_transaction("Transaction Foo",0);

    lr_get_transaction_wasted_time("Trans1")

    lr_end_transaction("Trans1",0);

 

Transaction Foo is used to force LR to calculate the wasted time for Trans1

View solution in original post

Cadet 1st Class
Cadet 1st Class

Hi Fei,

 

Thanks, this solution works and now I am able to get the transaction wasted time.

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.