0Xl*eCc
yx0Application Center Test 在测试运行中自动监视 HTTP 性能统计信息,但性能计数器必须在测试运行之前明确进行配置。51Testing软件测试网9B%hLIb#m6_(PSp$y:P
51Testing软件测试网5v'[X)|RmB}}请检查 ACTTrace.log 文件和报告,并确保不存在以下错误:
"Af[:_8YI#ls|:OI*O&f0脚本错误 51Testing软件测试网(xp^R)qj
l
DNS 错误 51Testing软件测试网v2Y]&?J%WA&T:Rr
套接字连接错误 51Testing软件测试网Y7w|k(c
aSJ4a1S
HTTP 错误
v:W8Gh4s4dQ0如有必要,请在重新运行测试之前改正其中的错误。
Y`o `KFZF0
l*a
z$]2hcBV051Testing软件测试网*a3V3Kv z6h+?\,E
dcomcnfg.exe 启动 DCOM 配置工具51Testing软件测试网;}8gw*[8Mt&^5\"h
ekHq-s A OX j051Testing软件测试网0G%g+h_fBg[5u
计算页面性能的公式51Testing软件测试网ufJ"q-uW1b
以下公式通过测量每个请求所需的处理器周期数来量化 Web 应用程序的性能。该公式用所消耗的周期数除以所处理的请求数。
DI&k)D@Lv,rHn
[0
51Testing软件测试网#tVcb'smB(sum of processor speed x processor use)51Testing软件测试网%WC2ezq8J5m
________________________________________ = cost, in cycles/request (or Hz/rps)51Testing软件测试网s0`0k3x7yU
number of requests per second
TP)_TU0例如,在应力测试中,ASP 页面的最大容量可达每秒 800 个请求,同时 Web 服务器的处理器使用率为 85%。如果 Web 服务器的处理器频率为 700 MHz(每秒 700,000,000 周期),可以使用以下公式来计算页面的成本:
InHW7]
y0
JB y['zW
S:v0((4 x 700 000 000 cycles/s) x 0.85) 51Testing软件测试网L-qA Wr}
___________________________________ = 2 975 000 cycles/request51Testing软件测试网X`waa me+H"Fa
800 requests/s
jwo\T'e/XCRM0计算页面性能的 VBScript 代码51Testing软件测试网^4Mz
RX+h
使用以下 VBScript 函数计算成本:51Testing软件测试网w0F&tr)\7SJ;t)e
51Testing软件测试网q3AM8@n-OC0O 51Testing软件测试网}'l,s#})z tz-L)e ]{*i
'''''''''''''''''''''''''''''''''''''''''''''''''''''''
?%X?&o8f'n1}0' Function to return the cost of a page, based on
Jqk"vn-}0' stress test values and Web server/cluster hardware.
W1L cT(X"V0'
T3s3G1a6?$Lg0' Returns: page cost, in millions of cycles per request
zh5c^BgU0'
3c1e#}F
W0Function GetPageCost(iSumOfProcessorSpeeds, _ 51Testing软件测试网c!o)vfeZ_m"a,j
fAverageProcessorUse, iAverageRPS)
8Ja$Ig.y0 Dim iSpentCyclesPerSecond51Testing软件测试网t8r"YS n^^M)x
$V0[xA.N5_,y i0 ' calculate the number of cycles used over the testing period
#zLG)ru'nA@ew!m0 iSpentCyclesPerSecond = iSumOfProcessorSpeeds _ 51Testing软件测试网7L2sNO1cyZa
* fAverageProcessorUse51Testing软件测试网R6g@x+uP%e6h Q Z7d
&P)GD"|
iE7AE,o0 ' calculate the amount of work performed by the Web server
QLVk*S+g4e&OZ0 If (iAverageRPS > 0) Then51Testing软件测试网,F6@.E |)s9LA-pzMs
GetPageCost = iSpentCyclesPerSecond / iAverageRPS
0a0i.Dn*cf0|$So0 Else
Jhv.c)aTMvn0 GetPageCost = 0
&O]1F&`2_R0 End If
i}C~L#d&ud \U;sP0End Function
5wv1c:\m0 51Testing软件测试网)m.n;U(|9S%MN2m
使用页面成本的示例
#z/jY}9t@Ii0了解页面成本有许多用途。
m[+?H)^2}I,A0
51Testing软件测试网I-hx tY4c vbR最显而易见的用途是比较两个不同页面的性能,或者比较同一页面在调整前后的成本。
G)B2hw
f6m
n&YY2H0
51Testing软件测试网1x5Rd&~d
vG8h]j4H特别是当测试对站点中的所有页面进行请求时,可以通过成本初步估计是否需要随着要处理的通信量的增加、CPU 使用率的更改(或者同时处理两者)添加附加硬件。
&^#qKd|S*bS0
51Testing软件测试网GY~0l!i9A Dc在前面的示例中,需要多大的处理器速度才能保证处理两倍的站点通信量,同时使处理器的使用率保持在 40% 左右,以便可以轻松处理至少达到 3200 rp 的临时负载增长?
y$Jre3]]^,m
WB0
5YGi8r1p1VRUl0以下计算表明需要的处理器速度大约为 11900 MHz:
M Ja(^V@0
_!Aa)kE7q;``0 page cost x target RPS51Testing软件测试网;~?6D7\'s9mpX
estimated processor speed = ______________________51Testing软件测试网
LNg CVZa
processor use 51Testing软件测试网?Ht5mFR
W$f:j,? J]?2}RoX0 2 975 000 cycles/request x 1600 requests/s51Testing软件测试网m!T#W_|0U"?qN
estimated processor speed = __________________________________________51Testing软件测试网E/s)Bv@c({7m^
0.40 51Testing软件测试网(N*os
p
a RsGTq
J"G3N7E8XF-K"O0estimated processor speed = 11 900 000 000 cycles/s
m_2Rmhb0
51Testing软件测试网7hjN7m}1Ba9Cnumber of 700 MHz processors needed = 11 900 MHz / 700 MHz = 17
]_^jGP0V0新的性能目标要求 Web 服务器群集中有大约 17 个处理器,而原来只需 4 个。再次强调,这些估计仅当处理器速度是限制 Web 应用程序性能的因素时才有意义。
v#g1vH&H)yj`0
)z9I/r!ob+}
E^0 51Testing软件测试网N&D#V?2`
URiQj8@(as+fs051Testing软件测试网:W Yo*DM:U?/V-O_C1oC0h7h|W9Gh8j0Link URL:
http://www.cnblogs.com/tester2test/archive/2006/07/13/449809.html