B8E1e@"O"~_+DR1x
?6b0Application Center Test 在测试运行中自动监视 HTTP 性能统计信息,但性能计数器必须在测试运行之前明确进行配置。
dE9R"q)N
a4hr9h O0
51Testing软件测试网2UkT Cv8Xr9M2u
O请检查 ACTTrace.log 文件和报告,并确保不存在以下错误:
sn;Q3zG4qM]0脚本错误
(rCMT g,wO0DNS 错误 51Testing软件测试网2O;pOajc H7|T^
套接字连接错误 51Testing软件测试网f5EyGm8e
HTTP 错误 51Testing软件测试网dP:R4M.kW_)Sw
如有必要,请在重新运行测试之前改正其中的错误。
?3u,B2`'}
Y Q&\0
6vZ1R}a0
9gp
`L[V6nj/N C#Q0dcomcnfg.exe 启动 DCOM 配置工具51Testing软件测试网[Jd^s)ex
QaO4r9B0^)N051Testing软件测试网#[0oM4E$Z,D H)F
计算页面性能的公式
$@`{2v Y`0以下公式通过测量每个请求所需的处理器周期数来量化 Web 应用程序的性能。该公式用所消耗的周期数除以所处理的请求数。51Testing软件测试网%@4B2AJ
v1x.r&N{d1l
51Testing软件测试网 ?Z;O#do
^+E(sum of processor speed x processor use)51Testing软件测试网\1Q8H7B.?1L'@D
________________________________________ = cost, in cycles/request (or Hz/rps)
YA4O9g$G?:`0 number of requests per second51Testing软件测试网3a$b @y_
y(g#N
例如,在应力测试中,ASP 页面的最大容量可达每秒 800 个请求,同时 Web 服务器的处理器使用率为 85%。如果 Web 服务器的处理器频率为 700 MHz(每秒 700,000,000 周期),可以使用以下公式来计算页面的成本:
"|AY4Yc^$z_0
uZ'lv&M0((4 x 700 000 000 cycles/s) x 0.85) 51Testing软件测试网~!yXu0B W5l~e
___________________________________ = 2 975 000 cycles/request51Testing软件测试网,as*Svw{7er*wG
800 requests/s51Testing软件测试网h%M.yWd,\)w_
计算页面性能的 VBScript 代码
[q"r_'y B6uX+S-r0使用以下 VBScript 函数计算成本:
L6hi0ZsG2WOxb0
51Testing软件测试网 W6bq
Oe
!me]&@i0'''''''''''''''''''''''''''''''''''''''''''''''''''''''
:S^+RMQv0' Function to return the cost of a page, based on 51Testing软件测试网Q-QY FJ#aPyYn
' stress test values and Web server/cluster hardware.
B,{/`N7nG\gah!JM0'51Testing软件测试网Ca}5u'jo
' Returns: page cost, in millions of cycles per request51Testing软件测试网B[\I.R#Zl
'
Z Zu`0e`N0Function GetPageCost(iSumOfProcessorSpeeds, _
$sB%kr'T jn#I0 fAverageProcessorUse, iAverageRPS)51Testing软件测试网9q#o(U u
wT
Dim iSpentCyclesPerSecond
Wnq.s%v/H!~!m1W0
51Testing软件测试网#Z`Op(d ye4I\;f ' calculate the number of cycles used over the testing period51Testing软件测试网T4B(]Y0g5Ui P|
iSpentCyclesPerSecond = iSumOfProcessorSpeeds _ 51Testing软件测试网'T6?5|+g
@h5Bi1[~
* fAverageProcessorUse
"r;Y-}juXR;`0
51Testing软件测试网"@HEqwo ' calculate the amount of work performed by the Web server
+|w1d"V
?1@5|;zx4Rq0 If (iAverageRPS > 0) Then51Testing软件测试网vb+Dp9K I
GetPageCost = iSpentCyclesPerSecond / iAverageRPS
l7n L-_
[)OU(\-IE0 Else51Testing软件测试网#Q jW:JlT
GetPageCost = 051Testing软件测试网,P,U+Sb4p2x!HUt
End If
K5V.VQ uTH#b*U0End Function
#r9Gb3^~C0 51Testing软件测试网)|Z"^ S}!L!q
使用页面成本的示例
5S NGB9|ZfWA7\zs0了解页面成本有许多用途。
ONv^$Es0
-Q3G i*}*BW$M0最显而易见的用途是比较两个不同页面的性能,或者比较同一页面在调整前后的成本。
nNSK)U
X0
51Testing软件测试网@1dMb%|S Y特别是当测试对站点中的所有页面进行请求时,可以通过成本初步估计是否需要随着要处理的通信量的增加、CPU 使用率的更改(或者同时处理两者)添加附加硬件。 51Testing软件测试网g4A*q
e5e
51Testing软件测试网`E3P2O7cZ#O;Iy3t在前面的示例中,需要多大的处理器速度才能保证处理两倍的站点通信量,同时使处理器的使用率保持在 40% 左右,以便可以轻松处理至少达到 3200 rp 的临时负载增长?51Testing软件测试网:y9E
L#J8pkc&D,Y
51Testing软件测试网WL*Oe1r$c0L+t$QNd以下计算表明需要的处理器速度大约为 11900 MHz:
j'I#wmfV,[+R J0
O2[[
qW!@F`0 page cost x target RPS
j$[u)xkQ+c1a ?0estimated processor speed = ______________________51Testing软件测试网Ry[Yh-D3TC'GZ
processor use
7|1fS`VD{
w0
51Testing软件测试网|`z/K3FK&f.J 2 975 000 cycles/request x 1600 requests/s51Testing软件测试网h2exXn(c2J
estimated processor speed = __________________________________________51Testing软件测试网t;r#`UJLu.T
0.40
m.Gq-x7tLafz0
51Testing软件测试网;`QtoY9?_)R
jestimated processor speed = 11 900 000 000 cycles/s
6|/M/ht@0b0
2Ru$Yb#C-C0number of 700 MHz processors needed = 11 900 MHz / 700 MHz = 1751Testing软件测试网 P
l0B T%@ |R7G
新的性能目标要求 Web 服务器群集中有大约 17 个处理器,而原来只需 4 个。再次强调,这些估计仅当处理器速度是限制 Web 应用程序性能的因素时才有意义。51Testing软件测试网^-L3v$?%Z8G
L9{3{5u3nC"S HknbV)Fy0
6i/d4`9@)z
^i#P `0
Q;b&O5Mhj051Testing软件测试网 gR)dV8CM+iW51Testing软件测试网Tllb-d%H;?-mk51Testing软件测试网H"\w8H yYi){0A2TgLink URL:
http://www.cnblogs.com/tester2test/archive/2006/07/13/449809.html