LR Functions
LR Functions
lr_get_host_name ( )
lr_get_master_host_name ( )
lr_get_vuser_ip( )
lr_start_timer ()
lr_end_timer
www.stctek.com
lr_get_host_name ( )
www.stctek.com
lr_get_master_host_na
me ( )
Returns the name of the machine
running the Controller .
Example
char * controller_host;
controller_host=lr_get_master_host
_name();
www.stctek.com
lr_get_vuser_ip( )
Returns the IP address of the current
Vuser.
Example
char *ip;
ip = lr_get_vuser_ip();
lr_output_message("The IP address
is %s", ip);
www.stctek.com
lr_start_timer () &
lr_end_timer ()
starts and stops a timer that calculates
the passage of time in seconds.
Example
Double timer , time_elapsed
timer = lr_start_timer();
/* script */
time_elapsed = lr_end_timer(timer);
www.stctek.com
Message Functions
lr_message()
lr_error_message()
lr_vuser_status_message()
www.stctek.com
lr_message()
lr_message (“Login
completed”);
www.stctek.com
lr_error_message()
Example
lr_error_message(“Login
Failed”);
www.stctek.com
lr_vuser_status_messag
e()
lr_vuser_status_message
(“Started”);
www.stctek.com
Run-Time Functions
lr_abort( )
lr_rendezvous()
lr_think_time ()
www.stctek.com
lr_abort( )
www.stctek.com
lr_rendezvous()
lr_rendezvous (rendezvous
name);
www.stctek.com
lr_think_time ()
lr_think_time (double
time);
www.stctek.com
String Functions
lr_decrypt ()
lr_save_string()
lr_save_datetime()
www.stctek.com
lr_decrypt ()
www.stctek.com
lr_save_string()
Saves a string to a parameter.
Example
lr_save_string("777", “Id");
Result
www.stctek.com
lr_save_datetime()
www.stctek.com
Transaction Functions
lr_start_transaction()
lr_end_transaction()
lr_get_transaction_status()
lr_get_transaction_duration()
www.stctek.com
lr_start_transaction()
lr_start_transaction("deposit");
www.stctek.com
lr_end_transaction()
Status
www.stctek.com
lr_get_transaction_statu
s()
www.stctek.com
lr_get_transaction_durat
ion()
Returns the duration of a transaction.
Example
double trans_time;
lr_start_transaction ("Flight");
trans_time=lr_get_transaction_durati
on("Flight");
lr_end_transaction("Flight", LR_PASS);
www.stctek.com