lr_wasted_time函数的使用

上一篇 / 下一篇  2010-04-28 15:26:42 / 天气: 晴朗 / 心情: 高兴 / 个人分类:lr

51Testing软件测试网G(D1Gq~0yr xs

有时候在transaction中有些操作的时间我们不想记录,使用如下代码,lr将不统计for循环操作所产生的时间

y$OV.g/S*HY:Ar051Testing软件测试网,C&xUjo ?0c8IUA

Action()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\+Hz YUGx0 int m,n;51Testing软件测试网Z/Vu ZY-`;j

,b9y3nP1c,C)dC{0  lr_start_transaction("test");

+~IL5W,v051Testing软件测试网6O?j)Z B3a

51Testing软件测试网-t%?*A0iCZX
 timer=lr_start_timer();51Testing软件测试网Htw/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软件测试网n3OT h0{: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(|P Xf4}0

TAG:

 

评分:0

我来说两句

我的栏目

日历

« 2024-04-02  
 123456
78910111213
14151617181920
21222324252627
282930    

数据统计

  • 访问量: 3543
  • 日志数: 4
  • 建立时间: 2010-03-23
  • 更新时间: 2010-04-28

RSS订阅

Open Toolbar