lr_wasted_time函数的使用
上一篇 /
下一篇 2010-04-28 15:26:42 / 天气: 晴朗
/ 心情: 高兴
/ 个人分类:lr
51Testing软件测试网G(D1Gq~0yrxs有时候在transaction中有些操作的时间我们不想记录,使用如下代码,lr将不统计for循环操作所产生的时间
y$OV.g/S*HY:Ar051Testing软件测试网,C&xUjo ?0c8IUAAction()51Testing软件测试网H:u5vf'Ik#Y7g
{
Ci%| lK4Ki-d"d.iJ#O&]0 double time_elapsed, duration, waste;
2^V;g1t
|l0 merc_timer_handle_t timer;
:YW\+H zYUGx0 int m,n;51Testing软件测试网Z/Vu
ZY-`;j
,b9y3nP1c,C)dC{0 lr_start_transaction("test");
+~IL5W,v051Testing软件测试网6O?j)ZB3a51Testing软件测试网-t%?*A0iCZX
timer=lr_start_timer();51Testing软件测试网H tw/W*C![ X(m[
// 不想记录到transaction时间的操作
5u-@0]-g2d051Testing软件测试网L6@(l7N6eo for (m=1;m<50000;m++)51Testing软件测试网1I1@5RP(I:V
lr_output_message ("%d",m);51Testing软件测试网n3OTh0{:kL^
time_elapsed = lr_end_timer(timer);
Ed/i^iq0 waste = time_elapsed * 1000;
\t+Vx!~,`0 lr_wasted_time(waste);
iC/F[w d@Q1?0 lr_end_transaction("test", LR_AUTO);
k.RDO/n+D.o7d0 return 0;51Testing软件测试网X9PQZ6Ad
}
c%L(|PXf4}0
收藏
举报
TAG: