关于登录的tps值
想問一下大家,我用loadrunner测试用户登录,为甚麽tps值才3.2左右,网络和服务器方面都ok。我测试首页,没有登录,tps达到了13.8.为甚麽登录就少那么多?流程很简单,就用户登录然后页面呈现,我在脚本里面把图片的代码也都注释掉了。并发用户数为200,加载策略是15s增加20个用户。持续运行5分钟,登陆具体代码
Action(){
web_url("login.php",
"URL=http://ncku-pim.saleproduct.com/bin/login.php?Url=..%2Fbin%2Findex.php%3FPlugin%3Dpim%26Action%3Dindex",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTTP",
LAST);
web_concurrent_start(NULL);
web_url("combine-zh-tw.css",
"URL=http://ncku-pim.saleproduct.com/ezfiles/0/1000/static/combine-zh-tw.css",
"Resource=1",
"RecContentType=text/css",
"Referer=http://ncku-pim.saleproduct.com/bin/login.php?Url=..%2Fbin%2Findex.php%3FPlugin%3Dpim%26Action%3Dindex",
"Snapshot=t2.inf",
LAST);
web_url("20100831.php",
"URL=http://ncku-pim.saleproduct.com/js/20100831.php",
"Resource=1",
"RecContentType=text/javascript",
"Referer=http://ncku-pim.saleproduct.com/bin/login.php?Url=..%2Fbin%2Findex.php%3FPlugin%3Dpim%26Action%3Dindex",
"Snapshot=t4.inf",
LAST);
web_url("scw.zh-tw.js",
"URL=http://ncku-pim.saleproduct.com/lib/js/calendar/scw.zh-tw.js",
"Resource=1",
"RecContentType=application/x-javascript",
"Referer=http://ncku-pim.saleproduct.com/bin/login.php?Url=..%2Fbin%2Findex.php%3FPlugin%3Dpim%26Action%3Dindex",
"Snapshot=t5.inf",
LAST);
web_url("scw.js",
"URL=http://ncku-pim.saleproduct.com/lib/js/calendar/scw.js",
"Resource=1",
"RecContentType=application/x-javascript",
"Referer=http://ncku-pim.saleproduct.com/bin/login.php?Url=..%2Fbin%2Findex.php%3FPlugin%3Dpim%26Action%3Dindex",
"Snapshot=t6.inf",
LAST);
web_url("jquery.js",
"URL=http://ncku-pim.saleproduct.com/lib/js/jquery.js",
"Resource=1",
"RecContentType=application/x-javascript",
"Referer=http://ncku-pim.saleproduct.com/bin/login.php?Url=..%2Fbin%2Findex.php%3FPlugin%3Dpim%26Action%3Dindex",
"Snapshot=t9.inf",
LAST);
web_concurrent_end(NULL);
web_url("combine-zh-tw.css_2",
"URL=http://ncku-pim.saleproduct.com/ezfiles/0/1000/static/combine-zh-tw.css",
"Resource=1",
"RecContentType=text/css",
"Referer=http://ncku-pim.saleproduct.com/bin/login.php?Url=..%2Fbin%2Findex.php%3FPlugin%3Dpim%26Action%3Dindex",
"Snapshot=t3.inf",
LAST);
lr_start_transaction("login");
web_custom_request("login.php_2",
"URL=http://ncku-pim.saleproduct.com/bin/login.php",
"Method=POST",
"Resource=0",
"RecContentType=text/html",
"Referer=http://ncku-pim.saleproduct.com/bin/login.php?Url=..%2Fbin%2Findex.php%3FPlugin%3Dpim%26Action%3Dindex",
"Snapshot=t23.inf",
"Mode=HTTP",
"Body=rs=sajaxSubmit&rsargs[]=%3CInput%3E%3CF%3E%3CK%3EAccount%3C/K%3E%3CV%3Estudent%3C/V%3E%3C/F%3E%3CF%3E%3CK%3EPasswd%3C/K%3E%3CV%3E1%3C/V%3E%3C/F%3E%3CF%3E%3CK%3EJshidden%3C/K%3E%3CV%3E%3C/V%3E%3C/F%3E%3CF%3E%3CK%3ELogin%3C/K%3E%3CV%3E%25E7%2599%25BB%25E5%2585%25A5%3C/V%3E%3C/F%3E%3CF%3E%3CK%3ETagId%3C/K%3E%3CV%3Ememlogin%3C/V%3E%3C/F%3E%3CF%3E%3CK%3ETagName%3C/K%3E%3CV%3Ememlogin%3C/V%3E%3C/F%3E%3C/Input%3E",
LAST);
lr_end_transaction("login", LR_AUTO);
web_url("index.php",
"URL=http://ncku-pim.saleproduct.com/bin/index.php?Plugin=pim&Action=index",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t24.inf",
"Mode=HTTP",
LAST);
接上面的代码
web_concurrent_start(NULL);web_url("strutil.js",
"URL=http://ncku-pim.saleproduct.com/lib/js/strutil.js",
"Resource=1",
"RecContentType=application/x-javascript",
"Referer=http://ncku-pim.saleproduct.com/bin/index.php?Plugin=pim&Action=index",
"Snapshot=t25.inf",
LAST);
web_url("base.css",
"URL=http://ncku-pim.saleproduct.com/plugin/pim/style/base.css",
"Resource=1",
"RecContentType=text/css",
"Referer=http://ncku-pim.saleproduct.com/bin/index.php?Plugin=pim&Action=index",
"Snapshot=t26.inf",
LAST);
web_url("skin.css",
"URL=http://ncku-pim.saleproduct.com/plugin/o_ncku/pim/style/53/5000/skin.css",
"Resource=1",
"RecContentType=text/css",
"Referer=http://ncku-pim.saleproduct.com/bin/index.php?Plugin=pim&Action=index",
"Snapshot=t27.inf",
LAST);
web_url("cookie.js",
"URL=http://ncku-pim.saleproduct.com/lib/js/cookie.js",
"Resource=1",
"RecContentType=application/x-javascript",
"Referer=http://ncku-pim.saleproduct.com/bin/index.php?Plugin=pim&Action=index",
"Snapshot=t28.inf",
LAST);
web_url("hashutil.js",
"URL=http://ncku-pim.saleproduct.com/lib/js/hashutil.js",
"Resource=1",
"RecContentType=application/x-javascript",
"Referer=http://ncku-pim.saleproduct.com/bin/index.php?Plugin=pim&Action=index",
"Snapshot=t29.inf",
LAST);
web_url("divos.js",
"URL=http://ncku-pim.saleproduct.com/lib/js/divos.js",
"Resource=1",
"RecContentType=application/x-javascript",
"Referer=http://ncku-pim.saleproduct.com/bin/index.php?Plugin=pim&Action=index",
"Snapshot=t30.inf",
LAST);
web_url("common.js",
"URL=http://ncku-pim.saleproduct.com/lib/js/common.js",
"Resource=1",
"RecContentType=application/x-javascript",
"Referer=http://ncku-pim.saleproduct.com/bin/index.php?Plugin=pim&Action=index",
"Snapshot=t31.inf",
LAST);
web_url("datacheck.js",
"URL=http://ncku-pim.saleproduct.com/lib/js/datacheck.js",
"Resource=1",
"RecContentType=application/x-javascript",
"Referer=http://ncku-pim.saleproduct.com/bin/index.php?Plugin=pim&Action=index",
"Snapshot=t32.inf",
LAST);
web_url("date.js",
"URL=http://ncku-pim.saleproduct.com/lib/js/date.js",
"Resource=1",
"RecContentType=application/x-javascript",
"Referer=http://ncku-pim.saleproduct.com/bin/index.php?Plugin=pim&Action=index",
"Snapshot=t33.inf",
LAST);
web_url("xmlsax.js",
"URL=http://ncku-pim.saleproduct.com/lib/js/xml/xmlsax.js",
"Resource=1",
"RecContentType=application/x-javascript",
"Referer=http://ncku-pim.saleproduct.com/bin/index.php?Plugin=pim&Action=index",
"Snapshot=t34.inf",
LAST);
web_url("xmlw3cdom.js",
"URL=http://ncku-pim.saleproduct.com/lib/js/xml/xmlw3cdom.js",
"Resource=1",
"RecContentType=application/x-javascript",
"Referer=http://ncku-pim.saleproduct.com/bin/index.php?Plugin=pim&Action=index",
"Snapshot=t35.inf",
LAST);
web_url("dragdrop.js",
"URL=http://ncku-pim.saleproduct.com/lib/js/dragdrop.js",
"Resource=1",
"RecContentType=application/x-javascript",
"Referer=http://ncku-pim.saleproduct.com/bin/index.php?Plugin=pim&Action=index",
"Snapshot=t36.inf",
LAST);
web_url("popdrag.js",
"URL=http://ncku-pim.saleproduct.com/lib/js/popdrag.js",
"Resource=1",
"RecContentType=application/x-javascript",
"Referer=http://ncku-pim.saleproduct.com/bin/index.php?Plugin=pim&Action=index",
"Snapshot=t37.inf",
LAST);
web_url("x.js",
"URL=http://ncku-pim.saleproduct.com/lib/sajax/js/x.js",
"Resource=1",
"RecContentType=application/x-javascript",
"Referer=http://ncku-pim.saleproduct.com/bin/index.php?Plugin=pim&Action=index",
"Snapshot=t38.inf",
LAST);
web_url("sajaxIO.js",
"URL=http://ncku-pim.saleproduct.com/lib/sajax/js/sajaxIO.js",
"Resource=1",
"RecContentType=application/x-javascript",
"Referer=http://ncku-pim.saleproduct.com/bin/index.php?Plugin=pim&Action=index",
"Snapshot=t39.inf",
LAST);
web_url("ajaxedit.js",
"URL=http://ncku-pim.saleproduct.com/lib/sajax/js/ajaxedit.js",
"Resource=1",
"RecContentType=application/x-javascript",
"Referer=http://ncku-pim.saleproduct.com/bin/index.php?Plugin=pim&Action=index",
"Snapshot=t40.inf",
LAST);
web_url("fckeditor.js",
"URL=http://ncku-pim.saleproduct.com/lib/FCKeditor/fckeditor.js",
"Resource=1",
"RecContentType=application/x-javascript",
"Referer=http://ncku-pim.saleproduct.com/bin/index.php?Plugin=pim&Action=index",
"Snapshot=t41.inf",
LAST);
web_url("util.js",
"URL=http://ncku-pim.saleproduct.com/js/util.js",
"Resource=1",
"RecContentType=application/x-javascript",
"Referer=http://ncku-pim.saleproduct.com/bin/index.php?Plugin=pim&Action=index",
"Snapshot=t42.inf",
LAST);
web_url("drag.js",
"URL=http://ncku-pim.saleproduct.com/js/drag.js",
"Resource=1",
"RecContentType=application/x-javascript",
"Referer=http://ncku-pim.saleproduct.com/bin/index.php?Plugin=pim&Action=index",
"Snapshot=t43.inf",
LAST);
web_url("admin.js",
"URL=http://ncku-pim.saleproduct.com/js/admin.js",
"Resource=1",
"RecContentType=application/x-javascript",
"Referer=http://ncku-pim.saleproduct.com/bin/index.php?Plugin=pim&Action=index",
"Snapshot=t44.inf",
LAST);
web_concurrent_end(NULL);
web_custom_request("showwidget.php",
"URL=http://ncku-pim.saleproduct.com/plugin/pim/bin/showwidget.php?seq=10000&id=1000&theme=5000&TagName=widget_0_1_0&DivId=widget_0_1_0",
"Method=POST",
"Resource=0",
"RecContentType=text/html",
"Referer=http://ncku-pim.saleproduct.com/bin/index.php?Plugin=pim&Action=index",
"Snapshot=t58.inf",
"Mode=HTTP",
"Body=rs=sajaxSubmit&rsargs[]=%3CInput%3E%3CF%3E%3CK%3E%3C/K%3E%3CV%3Eundefined%3C/V%3E%3C/F%3E%3C/Input%3E",
LAST);
web_url("showiframe.php",
"URL=http://ncku-pim.saleproduct.com/plugin/pim/bin/showiframe.php?seq=10000&DivId=widget_0_1_0&id=1000&theme=5000",
"Resource=0",
"RecContentType=text/html",
"Referer=http://ncku-pim.saleproduct.com/bin/index.php?Plugin=pim&Action=index",
"Snapshot=t63.inf",
"Mode=HTTP",
LAST);
web_custom_request("logout.php",
"URL=http://ncku-pim.saleproduct.com/bin/logout.php?TagName=&DivId=",
"Method=POST",
"Resource=0",
"RecContentType=text/html",
"Referer=http://ncku-pim.saleproduct.com/bin/index.php?Plugin=pim&Action=index",
"Snapshot=t64.inf",
"Mode=HTTP",
"Body=rs=sajaxSubmit&rsargs[]=%3CInput%3E%3CF%3E%3CK%3E%3C/K%3E%3CV%3Eundefined%3C/V%3E%3C/F%3E%3C/Input%3E",
LAST);
web_url("index.php_2",
"URL=http://ncku-pim.saleproduct.com/bin/index.php?Plugin=pim&Action=index",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t65.inf",
"Mode=HTTP",
LAST);
return 0;
} 楼主所指“我测试首页,没有登录,tps达到了13.8.为甚麽登录就少那么多”是指的哪个操作的tps?在图里看不出来啊。tps跟事务响应时间成反比,响应时间越长,tps就越小。tps也跟并发用户的数量、事务的定义等有关系。
关于登录的tps值
可是我从一个用户开始测试人数慢慢增加,tps值都上不去。我没有用并发的用在线的测试,也是这样。tps值上不了。关于登录的tps值
我对首页进行压测从10、20、30.。。。。一直压下去,tps值慢慢达到最高值,然后就稳定了。为甚麽我对登录进行压,tps就一直在3.5左右。就是上不去。 平均一次登录需要15秒,登录事务后还有其他的操作也需要时间最好贴图看看TPS的变化曲线图
页:
[1]