插入事务的位置
我知道在loadrunner中事务的开始放在submit前面,那结束点放在哪里呢,谢谢!如果插入集合点是放在事务的前面就可以了,能不能放在事务的后面呢,为什么! 事务是用来统计一个操作的相应时间的,所以事务放在请求前开始,请求后结束
集合点必须要放在事务前,否则集合点会导致事务的时间错误,参考跑100米,都是先集合再鸣枪起跑的,如果先起跑计时再集合起跑点,就混乱了 恩,事务主要的用途是衡量完成某个操作完成的时间,所以结束的地方应该就是你这个操作结束的地方 觉得还是在树目录下看比较明显,如果是代码视图,不是很清晰的额。。
回复 1# 的帖子
你可以在录制过程中,进行事务的填加,然后看看脚本就知道具体的位置了 呵呵根据你的需求
你需要测量哪些动作的性能,就把对应的动作定义为事务。前提:你要知道事务是怎么回事,说简单一点就是一个记时器;
你要知道哪些代码代表哪些动作。
比如这样
谢谢大家,云层说得太形象了那比如下面这段,我将事务插入到这里就是正确的是吧,test_begin,test_end
test_begin
web_submit_data("UserLogin.aspx",
"Action=http://passport.csdn.net/UserLogin.aspx",
"Method=POST",
"RecContentType=text/html",
"Referer=http://passport.csdn.net/UserLogin.aspx",
"Snapshot=t3.inf",
"Mode=HTML",
ITEMDATA,
"Name=__EVENTTARGET", "Value=", ENDITEM,
"Name=__EVENTARGUMENT", "Value=", ENDITEM,
"Name=__VIEWSTATE", "Value={Siebel_Analytic_ViewState2}", ENDITEM,
"Name=ctl00$CPH_Content$tb_LoginNameOrLoginEmail", "Value=wwwql", ENDITEM,
"Name=ctl00$CPH_Content$tb_Password", "Value=592111", ENDITEM,
"Name=ctl00$CPH_Content$tb_ExPwd", "Value=bqedh", ENDITEM,
"Name=ClientKey", "Value=84435d2c-577d-453f-80e9-276e6909df93", ENDITEM,
"Name=from", "Value=http://hi.csdn.net/my.html", ENDITEM,
"Name=MailParameters", "Value=", ENDITEM,
"Name=PrePage", "Value=http://www.csdn.net/", ENDITEM,
"Name=MailParameters", "Value=", ENDITEM,
"Name=ctl00$CPH_Content$Image_Login.x", "Value=41", ENDITEM,
"Name=ctl00$CPH_Content$Image_Login.y", "Value=14", ENDITEM,
EXTRARES,
"Url=http://hi.images.csdn.net/css/images/body_bg_repeat.gif", "Referer=http://hi.csdn.net/my.html", ENDITEM,
"Url=http://hi.images.csdn.net/css/images/announcements.gif", "Referer=http://hi.csdn.net/my.html", ENDITEM,
"Url=http://profile.csdn.net/hellowuheng/picture/2.jpg", "Referer=http://hi.csdn.net/my.html", ENDITEM,
"Url=http://profile.csdn.net/willli/picture/2.jpg", "Referer=http://hi.csdn.net/my.html", ENDITEM,
"Url=http://profile.csdn.net/f3690/picture/2.jpg", "Referer=http://hi.csdn.net/my.html", ENDITEM,
LAST);
test_end
这样插入事务对吗
谢谢大家,云层的解释太形象了,那下面这段代码,我加入事务的位置是正确的吧,test_begin,test_end
test_begin
web_submit_data("UserLogin.aspx",
"Action=http://passport.csdn.net/UserLogin.aspx",
"Method=POST",
"RecContentType=text/html",
"Referer=http://passport.csdn.net/UserLogin.aspx",
"Snapshot=t3.inf",
"Mode=HTML",
ITEMDATA,
"Name=__EVENTTARGET", "Value=", ENDITEM,
"Name=__EVENTARGUMENT", "Value=", ENDITEM,
"Name=__VIEWSTATE", "Value={Siebel_Analytic_ViewState2}", ENDITEM,
"Name=ctl00$CPH_Content$tb_LoginNameOrLoginEmail", "Value=wwwql", ENDITEM,
"Name=ctl00$CPH_Content$tb_Password", "Value=592111", ENDITEM,
"Name=ctl00$CPH_Content$tb_ExPwd", "Value=bqedh", ENDITEM,
"Name=ClientKey", "Value=84435d2c-577d-453f-80e9-276e6909df93", ENDITEM,
"Name=from", "Value=http://hi.csdn.net/my.html", ENDITEM,
"Name=MailParameters", "Value=", ENDITEM,
"Name=PrePage", "Value=http://www.csdn.net/", ENDITEM,
"Name=MailParameters", "Value=", ENDITEM,
"Name=ctl00$CPH_Content$Image_Login.x", "Value=41", ENDITEM,
"Name=ctl00$CPH_Content$Image_Login.y", "Value=14", ENDITEM,
EXTRARES,
"Url=http://hi.images.csdn.net/css/images/body_bg_repeat.gif", "Referer=http://hi.csdn.net/my.html", ENDITEM,
"Url=http://hi.images.csdn.net/css/images/announcements.gif", "Referer=http://hi.csdn.net/my.html", ENDITEM,
"Url=http://profile.csdn.net/hellowuheng/picture/2.jpg", "Referer=http://hi.csdn.net/my.html", ENDITEM,
"Url=http://profile.csdn.net/willli/picture/2.jpg", "Referer=http://hi.csdn.net/my.html", ENDITEM,
"Url=http://profile.csdn.net/f3690/picture/2.jpg", "Referer=http://hi.csdn.net/my.html", ENDITEM,
LAST);
test_end
页:
[1]