loadrunner12.55:常用函数汇总说明之Information Functions参数函数
函数 常用 参数 说明 汇总 information Functions
2023-09-14 09:01:11 时间
根据使用手册内容可见,LR支持的关于Information Functions包括:
lr_end_timer | Stops a timer. |
lr_get_host_name | Returns the name of the host executing the script. |
lr_get_master_host_name | Returns the name of the machine running the LoadRunner Controller . |
lr_get_vuser_ip | Returns the IP address of the current Vuser. Not applicable for products that do not run Vusers. |
lr_start_timer | Starts a timer. |
lr_user_data_point | Records a user-defined data sample. |
lr_user_data_point_ex | Records a user-defined data sample and enables logging option. |
lr_user_data_point_instance | Records a user-defined data sample and correlates it to a transaction instance. |
lr_user_data_point_instance_ex | Records a user-defined data sample and enables logging option. |
lr_whoami | Returns information about a Vuser executing the script. Not applicable for products that do not run Vusers. |
1、lr_start_timer & lr_end_timer
lr_whoami_Func() { int id, scid; char *vuser_group; //Memory for vuser_group is allocated automatically. Do not alter the string. lr_whoami(&id, &vuser_group, &scid); lr_message( "Group: %s, vuser id: %d, scenario id %d", vuser_group, id, scid); return 0; }
Vugen日志输出:
Controller日志输出:
lr_get_host_name_Func() { char * my_host; my_host = lr_get_host_name( ); lr_output_message("my_host :%s", my_host); return 0; }
Vugen日志输出:
Controller日志输出:
lr_get_master_host_name_Func() { char * controller_host; controller_host = lr_get_master_host_name( ); lr_output_message("controller_host :%s", controller_host); return 0; }
Vugen日志输出:可以看到打印的主机名称为None
Controller日志输出:可以看到成功打印主机名称
lr_get_vuser_ip_Func() { char *ip; ip = lr_get_vuser_ip(); if (ip) lr_output_message("The IP address is %s", ip); else lr_output_message("IP spoofing disabled"); return 0; }
待续......
相关文章
- 散列/散列函数「建议收藏」
- Oracle 正则表达式以及常用正则函数
- ES 常用聚合函数
- 如何用matlab画函数图_matlab常用画图函数
- matlab的fread函数的用法_matlab fread 大小端
- Power Query用自定义函数(筛选前N名)
- socket常用函数_socket是可重入函数吗
- Matlabinf_matlab怎么定义函数
- 50个常用的Numpy函数解释,参数和使用示例
- Matlab函数定义_matlab子函数
- 类型流(TypeFlow)——世俗化的函数式编程和改进的过程式设计
- pjax(InstantClick)常用的重载函数
- Oracle计算时间差常用函数
- gethostbyname()函数:通过域名获取IP地址
- MySQL及其 use函数的应用(mysqluse)
- MySQL中调用存储过程函数的方法(mysql过程调用函数)
- 精通MySQL常用函数(mysql常用函数)
- 定义MySQL中查看函数定义的方法(mysql查看函数)
- MySQL结果集处理:综合调用函数的使用(mysql结果集函数)
- Linux中常用时间函数及应用解析(时间函数linux)
- MySQL之CHAR函数:灵活操作文本形式的数据(mysqlchar)
- MySQL中left函数详解(mysql中left函数)
- MySQL中常用的函数介绍(mysql中包含的函数)
- ASP.NET常用函数(推荐)
- AJAX常用函数
- ASP常用函数:Trace()
- js变量类型转换常用函数与代码[比较全]
- PHP函数常用用法小结
- 用函数模板,写一个简单高效的JSON查询器的方法介绍
- PHP链接MySQL的常用扩展函数
- Laravel框架中扩展函数、扩展自定义类的方法