loadrunner 将执行脚本 写到vuser_init函数中问题

压力测试时 发现Hits per Second 无法提升,被测试的服务器毫无压力,反倒是安装了LoadRunner的服务器快承受不了了。

后发现 执行脚本 写到vuser_init函数中了。

vuser_init()
{

"TestTLVRequest.aspx_2", 

"URL=http://192.168.10.13/Web/Test.aspx?TestType=0x106", 

"Resource=0",   "RecContentType=text/html",   "Referer=",   "Snapshot=t9.inf",   "Mode=HTML",   LAST);


 return 0;
}

后将 vuser_init 脚本 移动到

Action() {

 web_url(

"TestTLVRequest.aspx_2",  

 "URL=http://192.168.10.13/Web/Test.aspx?TestType=0x106",  

 "Resource=0",   "RecContentType=text/html",   "Referer=",   "Snapshot=t9.inf",   "Mode=HTML",   LAST);

 return 0;

}

就可以了。

另外我在测试时将 simulate a new user on each iteration 取消勾选:

(详细参见:http://www.cnblogs.com/candle806/archive/2011/01/06/1928969.html

ok,可以测试了。

(2) 测试站点分析和抓取错误

查看当前站点用户等待数:netstat -aes 1 | find "Cur"

查看站点进程:iisapp

如测试站点进程ID为:20992

抓取信息:D:\adplus\adplus.vbs -hang -p 20992

(adplus工具脚本路径D:\adplus\adplus.vbs)

查看抓取错误信息命令:

.load sos

!threads

~[id]s

!clrstack

原文地址:https://www.cnblogs.com/shouwu/p/3030742.html