hbpad 发表于 2009-6-7 11:49:30

LoadRunner响应时间在某个点突然很大

设置了150个用户,在运行了一个多小时后看结果,发现在120个用户的时候响应时间突然很大,之后又正常了,请问这样一般是什么原因造成的啊?是不是系统能容纳的并发最大用户数就是120个了呢?

yzylion 发表于 2009-6-7 12:29:30

120个用户的时候响应时间忽然很大,之后又正常了,这个?你能不能把你的场景策略也说说呢

hbpad 发表于 2009-6-7 14:07:10

回复 2# 的帖子

不能发图片~ 设置了150个用户,每隔20秒启动5个用户,停止的时候是每隔30秒停止5个用户,持续运行时间是1个小时,总共运行了1个小时25分17秒,看它的响应时间,是在35分钟左右的时候有个高峰,虚拟用户为120的时候有个最高峰,其他的都比较平稳

yzylion 发表于 2009-6-7 14:30:10

这样啊?那按这样的话,8分钟的时候就应该有120个用户在跑了啊,你在120个vuser的时候为系统最高峰,但此时过后,应该还是每隔20S启动5个用户啊?但你的情况是后面又比较平稳了,这个,我个人认为,是不能确定的说系统的最大负载是120个人吧

peterz 发表于 2009-6-7 14:55:45

把你的压力脚本贴出来。看看问题出在哪里

hbpad 发表于 2009-6-7 15:36:16

Action()
{


        lr_start_transaction("sy");


        web_url("index.aspx",
                "URL=http://www.mcampus.net:8080/JWProject/wap/index.aspx",
                "Resource=1",
                "RecContentType=text/vnd.wap.wml",
                "Referer=",
                LAST);



        lr_end_transaction("sy", LR_AUTO);



        lr_start_transaction("login");


        web_url("s_login.aspx",
                "URL=http://www.mcampus.net:8080/JWProject/wap/Score/s_login.aspx?identity=2",
                "Resource=1",
                "RecContentType=text/vnd.wap.wml",
                "Referer=",
                LAST);

        web_concurrent_start(NULL);

        web_reg_save_param("sid",
                "LB=sid=",
                "RB=>",
               LAST);
        web_submit_data("login_check.aspx",
                "Action=http://www.mcampus.net:8080/JWProject/wap/Score/login_check.aspx?identity=2",
                "Method=POST",
                "RecContentType=text/vnd.wap.wml",
                "Referer=",
                "Mode=HTTP",
                ITEMDATA,
                "Name=userName", "Value=200836651012", ENDITEM,
                "Name=password", "Value=123456", ENDITEM,
                LAST);
        web_concurrent_end(NULL);

        web_url("stud.aspx",
                "URL=http://www.mcampus.net:8080/JWProject/wap/Score/stud.aspx?sid={sid}&select=1",
                "Resource=1",
                "RecContentType=text/vnd.wap.wml",
                "Referer=",
                LAST);


   lr_output_message("--->%s", lr_eval_string("{sid}"));



        lr_end_transaction("login", LR_AUTO);


        lr_start_transaction("cj");


        web_url("query.aspx",
                "URL=http://www.mcampus.net:8080/JWProject/wap/Score/query.aspx?sid={sid}&select=3",
                "Resource=1",
                "RecContentType=text/vnd.wap.wml",
                "Referer=",
                LAST);



        lr_end_transaction("cj", LR_AUTO);


        web_concurrent_start(NULL);
        web_url("stud.aspx_3",
                "URL=http://www.mcampus.net:8080/JWProject/wap/Score/stud.aspx?sid={sid}&select=3",
                "Resource=1",
                "RecContentType=text/vnd.wap.wml",
                "Referer=",
                LAST);


        lr_start_transaction("xk");

        web_url("xuanke.aspx",
                "URL=http://www.mcampus.net:8080/JWProject/wap/WAP_xuanke/xuanke.aspx?sid={sid}",
                "Resource=1",
                "RecContentType=text/vnd.wap.wml",
                "Referer=",
                LAST);
lr_output_message("====>",lr_eval_string("{sid}"));
        web_url("school_logo.gif",
                "URL=http://www.mcampus.net:8080/JWProject/wap/WAP_xuanke/picture/school_logo.gif",
                "Resource=1",
                "RecContentType=image/gif",
                "Referer=http://www.mcampus.net:8080/JWProject/wap/WAP_xuanke/index.aspx?sid={sid}",
                LAST);
       

        web_url("Xuanke.ico",
                "URL=http://www.mcampus.net:8080/JWProject/wap/WAP_xuanke/picture/Xuanke.ico",
                "Resource=1",
                "RecContentType=image/x-icon",
                "Referer=http://www.mcampus.net:8080/JWProject/wap/WAP_xuanke/index.aspx?sid={sid}",
                LAST);

        web_url("Search.gif",
                "URL=http://www.mcampus.net:8080/JWProject/wap/WAP_xuanke/picture/Search.gif",
                "Resource=1",
                "RecContentType=image/gif",
                "Referer=http://www.mcampus.net:8080/JWProject/wap/WAP_xuanke/index.aspx?sid={sid}",
                LAST);

        web_url("Search.ico",
                "URL=http://www.mcampus.net:8080/JWProject/wap/WAP_xuanke/picture/Search.ico",
                "Resource=1",
                "RecContentType=image/x-icon",
                "Referer=http://www.mcampus.net:8080/JWProject/wap/WAP_xuanke/index.aspx?sid={sid}",
                LAST);

        web_url("tongxuanke.aspx",
                "URL=http://www.mcampus.net:8080/JWProject/wap/WAP_xuanke/tongxuanke.aspx?sid={sid}",
                "Resource=1",
                "RecContentType=text/vnd.wap.wml",
                "Referer=",
                LAST);

        web_url("morelessons.aspx",
                "URL=http://www.mcampus.net:8080/JWProject/wap/WAP_xuanke/morelessons.aspx?c=0&sid={sid}",
                "Resource=1",
                "RecContentType=text/vnd.wap.wml",
                "Referer=",
                LAST);

        web_url("class.aspx",
                "URL=http://www.mcampus.net:8080/JWProject/wap/WAP_xuanke/class.aspx?class_id=000003&sid={sid}",
                "Resource=1",
                "RecContentType=text/vnd.wap.wml",
                "Referer=",
                LAST);

        web_url("lesson_detail.aspx",
                "URL=http://www.mcampus.net:8080/JWProject/wap/WAP_xuanke/lesson_detail.aspx?lesson_id=000003&sid={sid}",
                "Resource=1",
                "RecContentType=text/vnd.wap.wml",
                "Referer=",
                LAST);

        web_url("teacher.aspx",
                "URL=http://www.mcampus.net:8080/JWProject/wap/WAP_xuanke/teacher.aspx?teacher_id=000001&sid={sid}",
                "Resource=1",
                "RecContentType=text/vnd.wap.wml",
                "Referer=",
                LAST);

        web_url("select.aspx",
                "URL=http://www.mcampus.net:8080/JWProject/wap/WAP_xuanke/select.aspx?class_id=000003&sid={sid}",
                "Resource=1",
                "RecContentType=text/vnd.wap.wml",
                "Referer=",
                LAST);

        web_url("stu_infor.aspx",
                "URL=http://www.mcampus.net:8080/JWProject/wap/WAP_xuanke/stu_infor.aspx?sid={sid}",
                "Resource=1",
                "RecContentType=text/vnd.wap.wml",
                "Referer=",
                LAST);

        web_url("tuixuan.aspx",
                "URL=http://www.mcampus.net:8080/JWProject/wap/WAP_xuanke/tuixuan.aspx?class_id=000003&sid={sid}",
                "Resource=1",
                "RecContentType=text/vnd.wap.wml",
                "Referer=",
                LAST);


        lr_end_transaction("xk", LR_AUTO);


        lr_start_transaction("kb");

        web_url("select.aspx_2",
                "URL=http://www.mcampus.net:8080/JWProject/wap/kebiao/select.aspx?sid={sid}",
                "Resource=1",
                "RecContentType=text/vnd.wap.wml",
                "Referer=",
                LAST);

        web_url("displayclass.aspx",
                "URL=http://www.mcampus.net:8080/JWProject/wap/kebiao/displayclass.aspx?sid={sid}",
                "Resource=1",
                "RecContentType=text/vnd.wap.wml",
                "Referer=",
                LAST);
        web_concurrent_end(NULL);


        web_submit_data("displaybj.aspx",
                "Action=http://www.mcampus.net:8080/JWProject/wap/kebiao/displaybj.aspx?pid=0&sid={sid}",
                "Method=POST",
                "RecContentType=text/vnd.wap.wml",
                "Referer=",
                "Mode=HTTP",
                ITEMDATA,
                "Name=cxxq", "Value=08092", ENDITEM,
                "Name=bjbh", "Value=2005cs003", ENDITEM,
                LAST);

        web_url("displayfree.aspx",
                "URL=http://www.mcampus.net:8080/JWProject/wap/kebiao/displayfree.aspx?sid={sid}",
                "Resource=1",
                "RecContentType=text/vnd.wap.wml",
                "Referer=",
                LAST);

        web_submit_data("displaykx.aspx",
                "Action=http://www.mcampus.net:8080/JWProject/wap/kebiao/displaykx.aspx?pid=0&sid={sid}",
                "Method=POST",
                "RecContentType=text/vnd.wap.wml",
                "Referer=",
                "Mode=HTTP",
                ITEMDATA,
                "Name=cxxq", "Value=08092", ENDITEM,
                "Name=jxl", "Value=", ENDITEM,
                "Name=bjf", "Value=gt", ENDITEM,
                "Name=rl", "Value=", ENDITEM,
                "Name=sjd1", "Value=鏄熸湡涓\x80锛\x881锛\x8C2锛\x89", ENDITEM,
                "Name=sjd2", "Value=0", ENDITEM,
                "Name=sjd3", "Value=0", ENDITEM,
                "Name=sjd4", "Value=0", ENDITEM,
                LAST);

        web_url("displaynone.aspx",
                "URL=http://www.mcampus.net:8080/JWProject/wap/kebiao/displaynone.aspx?sid={sid}",
                "Resource=1",
                "RecContentType=text/vnd.wap.wml",
                "Referer=",
                LAST);

        web_submit_data("displayxz.aspx",
                "Action=http://www.mcampus.net:8080/JWProject/wap/kebiao/displayxz.aspx?pid=0&sid={sid}",
                "Method=POST",
                "RecContentType=text/vnd.wap.wml",
                "Referer=",
                "Mode=HTTP",
                ITEMDATA,
                "Name=cxxq", "Value=08092", ENDITEM,
                "Name=jxl", "Value=", ENDITEM,
                "Name=bjf", "Value=gt", ENDITEM,
                "Name=rl", "Value=", ENDITEM,
                LAST);

        web_url("displaytea.aspx",
                "URL=http://www.mcampus.net:8080/JWProject/wap/kebiao/displaytea.aspx?sid={sid}",
                "Resource=1",
                "RecContentType=text/vnd.wap.wml",
                "Referer=",
                LAST);

        web_submit_data("displayjs.aspx",
                "Action=http://www.mcampus.net:8080/JWProject/wap/kebiao/displayjs.aspx?pid=0&sid={sid}",
                "Method=POST",
                "RecContentType=text/vnd.wap.wml",
                "Referer=",
                "Mode=HTTP",
                ITEMDATA,
                "Name=cxxq", "Value=08092", ENDITEM,
                "Name=jsbh", "Value=teacher001", ENDITEM,
                LAST);



        lr_end_transaction("kb", LR_AUTO);


        web_concurrent_start(NULL);
        web_url("index.aspx_2",
                "URL=http://www.mcampus.net:8080/JWProject/wap/index.aspx?sid={sid}",
                "Resource=1",
                "RecContentType=text/vnd.wap.wml",
                "Referer=",
                LAST);

        lr_start_transaction("qt");


        web_url("news.aspx",
                "URL=http://www.mcampus.net:8080/JWProject/wap/news.aspx?id=10&sid={sid}",
                "Resource=1",
                "RecContentType=text/vnd.wap.wml",
                "Referer=",
                LAST);

        web_url("more.aspx",
                "URL=http://www.mcampus.net:8080/JWProject/wap/more.aspx?page=0&sid={sid}",
                "Resource=1",
                "RecContentType=text/vnd.wap.wml",
                "Referer=",
                LAST);

        web_url("index.aspx_3",
                "URL=http://www.mcampus.net:8080/JWProject/wap/index.aspx?sid={sid}",
                "Resource=1",
                "RecContentType=text/vnd.wap.wml",
                "Referer=",
                LAST);

        web_url("help.aspx",
                "URL=http://www.mcampus.net:8080/JWProject/wap/help.aspx?sid={sid}",
                "Resource=1",
                "RecContentType=text/vnd.wap.wml",
                "Referer=",
                LAST);


        lr_end_transaction("qt", LR_AUTO);


        web_concurrent_end(NULL);

        return 0;
}

hbpad 发表于 2009-6-7 15:37:40

执行的时候,发现login事务出错很多,基本就是它在出错

hbpad 发表于 2009-6-7 15:40:08

回复 4# 的帖子

哦,按道理那就不应该是120个是它能容纳的最大用户数,我好多都不懂~

Lotus.L 发表于 2009-6-7 18:50:23

"执行的时候,发现login事务出错很多,基本就是它在出错"

发现Login事务的错误很多的时候,有没有手动去登陆应用检查?

wy3552128 发表于 2009-6-8 10:42:16

"Name=userName", "Value=200836651012", ENDITEM,
"Name=password", "Value=123456", ENDITEM,

你没有对用户名密码参数化呀。

有队列

kuangquanshui 发表于 2009-6-8 11:51:47

而且你的程序支持部支持同一用户同时登陆多个要是不能报错就是对的了
页: [1]
查看完整版本: LoadRunner响应时间在某个点突然很大