|
5#
楼主 |
发表于 2012-5-31 10:29:48
|
只看该作者
本帖最后由 Donly 于 2012-5-31 15:57 编辑
回复 4# 云层
//点击登录按钮,开始整个登录事务
lr_start_transaction("LoginIn_Tran");
//开始提交登录请求子事务
lr_start_sub_transaction("LoginSubmit_subTran","LoginIn_Tran");
web_reg_find(
"Text={Loadtext}",
"SaveCount=LoginLoad_cnt",
LAST);
web_submit_data(......,
LAST);
//登录请求子事务结束
if (atoi(lr_eval_string ("{LoginLoad_cnt}")) > 0)
{
lr_end_sub_transaction("LoginSubmit_subTran", LR_PASS);
}
else
{
lr_end_sub_transaction("LoginSubmit_subTran", LR_FAIL);
//return(-1);
}
//加载进度条子事务
lr_start_sub_transaction("LoginLoad_subTran","LoginIn_Tran");
web_reg_find(
"Text=ticket",
"SaveCount=ticket_cnt",
"Search=ALL",
LAST);
web_url("..... LAST);
//进度条显示子事务结束
if (atoi(lr_eval_string ("{ticket_cnt}")) > 0)
{
lr_end_sub_transaction("LoginLoad_subTran", LR_PASS);
}
else
{
lr_end_sub_transaction("LoginLoad_subTran", LR_FAIL);
//return(-1);
}
//加载完毕,开始显示首页子事务
lr_start_sub_transaction("ShowHomePage_subTran","LoginIn_Tran");
web_reg_find(
"Text={Portaltext}",
"SaveCount=Homepage_cnt",
LAST);
web_reg_find(
"Text={loginouttext}",
"SaveCount=LoginoutButt_cnt",
LAST);
web_reg_find(
"Text={MyPendtext}",
"SaveCount=MyPend_cnt",
LAST);
web_reg_find(
"Text={Morebutttext}",
"SaveCount=Morebutt_cnt",
LAST);
web_url(".....
LAST);
//首页加载完毕,结束首页加载子事务
if ((atoi(lr_eval_string ("{Homepage_cnt}")) > 0) &&
(atoi(lr_eval_string ("{LoginoutButt_cnt}")) > 0) &&
(atoi(lr_eval_string ("{MyPend_cnt}")) > 0) &&
(atoi(lr_eval_string ("{Morebutt_cnt}")) > 0))
{
lr_end_sub_transaction("ShowHomePage_subTran", LR_PASS);
}
else
{
lr_end_sub_transaction("ShowHomePage_subTran", LR_FAIL);
//return(-1);
}
//结束父事务
if ((atoi(lr_eval_string ("{LoginLoad_cnt}")) > 0) &&
(atoi(lr_eval_string ("{ticket_cnt}")) > 0) &&
(atoi(lr_eval_string ("{Homepage_cnt}")) > 0) &&
(atoi(lr_eval_string ("{LoginoutButt_cnt}")) > 0) &&
(atoi(lr_eval_string ("{MyPend_cnt}")) > 0) &&
(atoi(lr_eval_string ("{Morebutt_cnt}")) > 0))
{
lr_end_transaction("LoginIn_Tran", LR_PASS);
}
else
{
lr_end_transaction("LoginIn_Tran", LR_FAIL);
}
平均事务响应图:
|
|