LR基础学习_脚本信息函数
2015-02-04 14:11
204 查看
Action()
{
//脚本信息函数。
//lr_whoami:返回Vuser的ID,组名称,场景ID信息。
/*
int id,scid;
char *vuser_group;
lr_whoami(&id,&vuser_group,&scid);
lr_error_message("Group:%s,vuser id:%d,scenario id
%d",vuser_group,id,scid);
*/
//lr_get_host_name:返回运行脚本的Generator的主机名称。
/*
char
*my_host;
my_host =
lr_get_host_name();
lr_output_message("my_host:%s",my_host);
*/
//lr_get_master_host_name:返回运行脚本的Controller的主机名称。
/*
char
*controller_host;
controller_host =
lr_get_master_host_name();
lr_output_message("controller_host:%s",controller_host);
*/
//lr_get_vuser_id:使用Ip
spoofing之后,可以用lr_get_vuser_ip来返回当前的Vuser的Ip。如果未使用Ip spoofing功能,则返回null。
//lr_start_timer与lr_end_timer:必须组合使用,前者用来启动一个计时器,同时返回计时器的句柄,后来用来使指定的计时器停止计时,并返回计时结果。
//语法如下:
//merc_timer_handle_t
lr_start_timer();
//double lr_end_timer(merc_timer_handle_t
timer);
return 0;
}
{
//脚本信息函数。
//lr_whoami:返回Vuser的ID,组名称,场景ID信息。
/*
int id,scid;
char *vuser_group;
lr_whoami(&id,&vuser_group,&scid);
lr_error_message("Group:%s,vuser id:%d,scenario id
%d",vuser_group,id,scid);
*/
//lr_get_host_name:返回运行脚本的Generator的主机名称。
/*
char
*my_host;
my_host =
lr_get_host_name();
lr_output_message("my_host:%s",my_host);
*/
//lr_get_master_host_name:返回运行脚本的Controller的主机名称。
/*
char
*controller_host;
controller_host =
lr_get_master_host_name();
lr_output_message("controller_host:%s",controller_host);
*/
//lr_get_vuser_id:使用Ip
spoofing之后,可以用lr_get_vuser_ip来返回当前的Vuser的Ip。如果未使用Ip spoofing功能,则返回null。
//lr_start_timer与lr_end_timer:必须组合使用,前者用来启动一个计时器,同时返回计时器的句柄,后来用来使指定的计时器停止计时,并返回计时结果。
//语法如下:
//merc_timer_handle_t
lr_start_timer();
//double lr_end_timer(merc_timer_handle_t
timer);
return 0;
}
相关文章推荐
- LR基础学习_脚本信息函数
- Linux shell脚本基础学习
- 详细介绍Linux shell脚本基础学习(三)
- Python基础语法学习---备份脚本(1)
- linux shell 脚本基础知识学习
- Javascript ==== 因特网上最流行的脚本快速学习---Javascript基础
- js脚本学习 比较实用的基础
- Linux shell脚本基础学习(上)
- 第十二章 学习 shell脚本之前的基础知识
- Linux shell脚本基础学习
- 详细介绍Linux shell脚本基础学习
- 详细介绍Linux shell脚本基础学习(四)
- linux基础学习-shell脚本学习(鸟哥私房菜)
- [网摘学习]Shell脚本编程学习入门:Shell编程基础
- 详细介绍Linux shell脚本基础学习
- LR学习笔记六 之 脚本编写实践过程
- 脚本命令行基础学习小笔记(一)
- linux 基础学习之五:shell脚本学习(2)——基本语法
- 学习 shell脚本之前的基础知识
- 详细介绍Linux shell脚本基础学习(实例)