两个不同的响应时间用哪个
今天测试得出两个响应时间,不知该用那个,请高手指教!先描述下操作:
目标:要测试单个用户的登录响应时间是否不大于5秒。首先录制了登录脚本,并在其中添加了事务,设置了迭代10次:
Action()
{
web_url("192.168.1.177",
"URL=http://apir.webrep.avast.com/v1/rating/192.168.1.177?34CEBC",
"Resource=1",
"RecContentType=application/json",
"Referer=",
"Snapshot=t1.inf",
LAST);
web_url("c",
"URL=http://192.168.1.177/c",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t2.inf",
"Mode=HTML",
EXTRARES,
"Url=/html/themes/classic/css/everything_packed.css?companyId=1&languageId=zh_CN&themeId=classic&colorSchemeId=01&t=1314674305921", "Referer=http://192.168.1.177/web/guest/home", ENDITEM,
"Url=/html/themes/classic/javascript/javascript.js?t=1314674305921", "Referer=http://192.168.1.177/web/guest/home", ENDITEM,
"Url=/html/themes/classic/images/common/body_bg.png", "Referer=http://192.168.1.177/web/guest/home", ENDITEM,
"Url=/html/themes/classic/images/common/banner_bg.jpg", "Referer=http://192.168.1.177/web/guest/home", ENDITEM,
"Url=/image/company_logo?img_id=11926&t=1314842502515", "Referer=http://192.168.1.177/web/guest/home", ENDITEM,
"Url=/html/portlet/login/icon.png", "Referer=http://192.168.1.177/web/guest/home", ENDITEM,
"Url=/html/themes/classic/images/dock/center_bg.png", "Referer=http://192.168.1.177/web/guest/home", ENDITEM,
"Url=/html/themes/classic/images/dock/right_bg.png", "Referer=http://192.168.1.177/web/guest/home", ENDITEM,
"Url=/html/themes/classic/images/dock/left_bg.png", "Referer=http://192.168.1.177/web/guest/home", ENDITEM,
"Url=/html/themes/classic/images/navigation/bullet_selected.png", "Referer=http://192.168.1.177/web/guest/home", ENDITEM,
"Url=/html/themes/classic/images/spacer.png", "Referer=http://192.168.1.177/web/guest/home", ENDITEM,
"Url=/html/themes/classic/images/forms/input_shadow.png", "Referer=http://192.168.1.177/web/guest/home", ENDITEM,
"Url=/html/themes/classic/images/forms/button.png", "Referer=http://192.168.1.177/web/guest/home", ENDITEM,
"Url=/html/themes/classic/images/dock/sign_in.png", "Referer=http://192.168.1.177/web/guest/home", ENDITEM,
LAST);
lr_start_transaction("login");//开始登录事务
web_submit_data("home",
"Action=http://192.168.1.177/web/guest/home?p_p_id=58&p_p_lifecycle=1&p_p_state=normal&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=1&saveLastPath=0&_58_struts_action=%2Flogin%2Fview&_58_cmd=update",
"Method=POST",
"RecContentType=text/html",
"Referer=http://192.168.1.177/web/guest/home",
"Snapshot=t3.inf",
"Mode=HTML",
ITEMDATA,
"Name=_58_redirect", "Value=", ENDITEM,
"Name=_58_login", "Value=test02", ENDITEM,
"Name=_58_password", "Value=1111", ENDITEM,
EXTRARES,
"Url=/html/portlet/journal/icon.png", "Referer=http://192.168.1.177/group/10779/articles", ENDITEM,
"Url=/language/zh_CN/warning-your-session-will-expire/[$SPAN$]/30", "Referer=http://192.168.1.177/group/10779/articles", ENDITEM,
"Url=/language/zh_CN/hide/", "Referer=http://192.168.1.177/group/10779/articles", ENDITEM,
"Url=/language/zh_CN/show/", "Referer=http://192.168.1.177/group/10779/articles", ENDITEM,
"Url=/language/zh_CN/warning-your-session-has-expired/", "Referer=http://192.168.1.177/group/10779/articles", ENDITEM,
"Url=/language/zh_CN/extend/", "Referer=http://192.168.1.177/group/10779/articles", ENDITEM,
"Url=/html/themes/classic/images/dock/sign_out.png", "Referer=http://192.168.1.177/group/10779/articles", ENDITEM,
LAST);
lr_end_transaction("login",LR_AUTO);//结束登录事务
return 0;
}
然后运行脚本,在回放日志中看到了登录事务的响应时间,经计算平均响应时间为2.32613秒。
后来又设置目标场景如下:指定“login”事务,目标响应时间为5秒,虚拟用户为1个,达到目标后运行1分钟。
然后运行,得到结果如下:
login 的平均响应时间为0.242秒,Action_Transaction的平均响应时间为1.565秒。
那么登录系统的平均响应时间是2.32613秒还是0.242秒呢?这两个响应时间有什么不同呢?请高手指教! 0.242! 必须0.242啊 能否解释下原因呢? 细节关注中... 细节关注中...
页:
[1]