不要追求绝对的公平,红尘之中没有公平而言,人活一世,难得糊涂。                                           it is no use doing what you like, you have got to like what you do.

怎样用LR监视tomcat的性能?

上一篇 / 下一篇  2007-06-11 18:41:16 / 个人分类:Mercury LoadRunner

监控分为两方面:
9tY!k%X3dvxV"W*x01.监控指标51Testing软件测试网9mk#QAQ"uU3_
   监控Tomcat主要指标为两个参数:
W]x `4I%c+Kc0   - number of sessions per application51Testing软件测试网2v8YH'jbzl+t,k
  - number of threads in different statuses
)F-O.l4s x3C M,D051Testing软件测试网Dd*t$U,XZu |`
   可以通过下面的链接察看51Testing软件测试网&}8rK7@ EuK[
    http://{ServerNameOrIPaddress}:8080/manager/html  session,
,gzYV,kz'l4DKS0   
'Y:{ |#lU+y9p-S0下边的地址可以通过 web_reg_save_param()参数扑获51Testing软件测试网 Ri| F,M
web_reg_save_param("YuPara_ApplicationAtest_Sessions",51Testing软件测试网3v-Jl9S4\)J%s%BKJ
"LB=path=/ApplicationAtest\">",51Testing软件测试网:B#TEg-vf(S%K
"RB=</a>",
*F5]}`9ti"S|1XY0LAST);51Testing软件测试网Ui-w?vs!dL
如果获得 Thread 代码,输入如下地址
t%~obAe051Testing软件测试网0?{Z%jt&[}@T@
http://{ServerNameOrIPaddress}:8080/manager/status
5}:R4Xm#h0x!h5D i051Testing软件测试网}6d8sO"r
通过如下代码扑火
)d{9M!?LP0web_reg_save_param("YuPara_Threads",51Testing软件测试网 }K,Oe\"P{9z,?
"LB=<tr><td><strong>",51Testing软件测试网#L!\ k y m[
"RB=</strong>",51Testing软件测试网nHI8OO5L!SIi X
"Ord=All", // All occurrences of this parameter are captured
9W5YK-ITM'}0Yf[o!W0LAST);
B-F'ML#f7d0
)t.[k8cO%F7Lc0最后利用
fV,l1M8f9{"_T0lr_user_data_point 函数把获得的数据输入到性能测试图谱中51Testing软件测试网'}X mA o5K

a,tG7gO K-| D0
)GH)iQ7ozJ5Sg051Testing软件测试网i)}Ryp xs
2.监控代码
9XW ba,j\ ww5w&@0  可以利用LoadRunner Diagnostics 监控

TAG: tomcat

引用 删除 congzhong119   /   2009-02-17 11:08:53
5
 

评分:0

我来说两句

Open Toolbar