Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Lr (2)-"rendezvous point" and "transaction" for script debugging

2025-01-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly introduces the insertion of "transaction" and "rendezvous point" in the script.

Insert assembly point

1. Meaning of rendezvous point

Rendezvous point: also known as concurrency point, Lr achieves true concurrency through the rendezvous point and executes according to the concurrency strategy of the scenario when the script runs to the rendezvous point.

(note that rendezvous points are often used in conjunction with transactions. In addition, rendezvous points can only be inserted into the action section, not in vuser_init and vuser_end.)

2. Set point function

Lr_rendezvous ("rendezvousName") (note that this function usually has a meaningful renaming point before the transaction starts the function)

3. Several methods of inserting assembly points.

1. Insert the rendezvous point before inserting the transaction during recording:

Click the "insert rendezvous point" icon in the recording workbar and enter a name

2. Insert a rendezvous point in code mode

Enter lr_rendezvous ("rendezvousName") directly before the transaction starts the function

3. Add rendezvous points in the tree view

Select start transaction-right-insert before--Rendezvous-- in the list on the left to enter the name (note that although the collection point is set during script generation and debugging, the concurrency policy is enabled and set in Controller)

Insert transaction

1. The meaning of transaction

To measure the performance of the server, we need to define transactions. We can usually define one or more steps as a transaction to measure the user's concurrent response time for this part.

2. The time to insert the transaction

You can insert a transaction during script recording or in code mode or tree view after the recording script ends

3. Three methods of inserting transactions

(note that transactions have a start function (Lr_start_transaction) and must have an end function (Lr_end_transaction).

1. Insert transaction during recording

Before the transaction starts, click the icon of "insert transaction 'start point'" in the "recording work bar" and enter the transaction name (note, it must have some meaning); after the transaction ends, click the "insert transaction 'end point" icon in the "recording work bar", the transaction status is "LR_AUTO", and the name is the most recent transaction name.

(note that the following two methods require the programmer to be very clear about the content of the script.)

2. Insert a transaction into the code

Find the place in the code where the transaction function needs to be inserted, write the transaction start function-Lr_start_transaction ("transactionName") before the transaction, and write the transaction end function-Lr_end_transaction ("transactionName", LR_AUTO) at the end of the transaction.

3. Add transactions in the tree view

Select the business that needs to define the transaction in the list on the left, click the "insert transaction 'start point" icon in the toolbar, enter the transaction name; select the last operation step of the business, click the "insert transaction' end point 'icon in the toolbar, and click" OK "after making sure the information is correct.

Or

Select the business that needs to define the transaction in the list on the left-right-insert before--start transaction-- to enter the name; select the last operation step of the business-- right-insert after--end transaction-- to make sure that the information correctly clicks "ok".

(note that lr_think_time, the function of thinking time, should not appear between the start and end functions of the transaction. If the thinking time is not ignored during playback, it will also be counted as the execution time of the transaction, which will affect the statistics and analysis of the transaction.)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report