⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 boss.html

📁 测试工具jmeter可用来进行性能测试
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
-->

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="author" value="Martin Ramshaw">
<meta name="email" value="mramshaw@alumni.concordia.ca">
<title>JMeter - User's Manual: My boss wants me to...</title>
</head>
<body bgcolor="#ffffff" text="#000000" link="#525D76">
<table border="0" cellspacing="0">
<tr>
<td colspan="2">
<a href="http://jakarta.apache.org"><img width="505" height="48" src="../../docs/images/jakarta-logo.gif" align="left" border="0"></a>
</td>
</tr>
</table>
<table border="0" cellspacing="4">
<tr><td>
<hr noshade size="1">
</td></tr>
<tr>
<td align="left" valign="top">
<table>
<tr>
<td bgcolor="#525D76">
<div align="right"><a href="index.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Index</font></a></div>
</td>
<td bgcolor="#525D76">
<div align="right"><a href="component_reference.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Next</font></a></div>
</td>
<td bgcolor="#525D76">
<div align="right"><a href="best-practices.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Prev</font></a></div>
</td>
</tr>
</table>
<br>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#525D76">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="boss"><strong>17. Help! My boss wants me to load test our web app!</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>
This is a fairly open-ended proposition. There are a number of questions to
be asked first, and additionally a number of resources that will be needed. You
will need some hardware to run the benchmarks/load-tests from. A number of
tools will prove useful. There are a number of products to consider.  And finally,
why is Java a good choice to implement a load-testing/Benchmarking product.

</p>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="questions"><strong>17.1 Questions to ask</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>
What is our anticipated average number of users (normal load) ?

</p>
<p>
What is our anticipated peak number of users ?

</p>
<p>
When is a good time to load-test our application (i.e. off-hours or week-ends),
bearing in mind that this may very well crash one or more of our servers ?

</p>
<p>
Does our application have state ? If so, how does our application manage it
(cookies, session-rewriting, or some other method) ?

</p>
<p>
What is the testing intended to achieve?
</p>
</blockquote>
</td></tr>
<tr><td><br></td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="resources"><strong>17.2 Resources</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>
The following resources will prove very helpful. Bear in mind that if you
cannot locate these resources, 
<b>
you
</b>
 will become these resources. As you
already have your work cut out for you, it is worth knowing who the following
people are, so that you can ask them for help if you need it.

</p>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="network"><strong>17.2.1 Network</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>
Who knows our network topology ? If you run into any firewall or
	proxy issues, this will become very important. As well, a private
	testing network (which will therefore have very low network latency)
	would be a very nice thing. Knowing who can set one up for you
	(if you feel that this is necessary) will be very useful. If the
	application doesn't scale as expected, who can add additional
	hardware ?
	
</p>
</blockquote>
</td></tr>
<tr><td><br></td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="application"><strong>17.2.2 Application</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>
Who knows how our application functions ? The normal sequence is
	
<ul>

		
<li>
test (low-volume - can we benchmark our application?)
</li>

		
<li>
benchmark (the average number of users)
</li>

		
<li>
load-test (the maximum number of users)
</li>

		
<li>
test destructively (what is our hard limit?)
</li>

	
</ul>

	The 
<b>
test
</b>
 process may progress from black-box testing to
	white-box testing (the difference is that the first requires
	no knowledge of the application [it is treated as a "black box"]
	while the second requires some knowledge of the application).
	It is not uncommon to discover problems with the application
	during this process, so be prepared to defend your work.
	
</p>
</blockquote>
</td></tr>
<tr><td><br></td></tr>
</table>
</blockquote>
</td></tr>
<tr><td><br></td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="platform"><strong>17.3 What platform should I use to run the benchmarks/load-tests ?</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>
This should be a widely-used piece of hardware, with a standard
(i.e. vanilla) software installation. Remember, if you publish your results,
the first thing your clients will do is hire a graduate student to verify them.
You might as well make it as easy for this person as you possibly can.

</p>
<p>
For Windows, Windows XP Professional should be a minimum (the others
do not multi-thread past 50-60 connections, and you probably anticipate
more users than that).

</p>
<p>
Good free platforms include the linuxes, the BSDs, and Solaris Intel. If
you have a little more money, there are commercial linuxes. If you can justify
it, a commercial Unix (Solaris, etc) is probably the best choice.

</p>
<p>

For non-Windows platforms, investigate "ulimit -n unlimited" with a view to
including it in your user account startup scripts (.bashrc or .cshrc scripts
for the testing account).

</p>
<p>
As you progress to larger-scale benchmarks/load-tests, this platform
will become the limiting factor. So it's worth using the best hardware and
software that you have available. Remember to include the hardware/software
configuration in your published benchmarks.

</p>
<p>
Don't forget JMeter batch mode. This can be useful if you have a powerful server 
that supports Java but perhaps does not have a fast graphics implementation,
or where you need to login remotely.
Batch (non-GUI) mode can reduce the network traffic compared with using a remote display or client-server mode.
The batch log file can then be loaded into JMeter on a workstation for analysis, or you can
use CSV output and import the data into a spreadsheet.
</p>
</blockquote>
</td></tr>
<tr><td><br></td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="tools"><strong>17.4 Tools</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>
The following tools will all prove useful. It is definitely worthwhile to
become familiar with them. This should include trying them out, and reading the
appropriate documentation (man-pages, info-files, application --help messages,
and any supplied documentation).

</p>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="ping"><strong>17.4.1 ping</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>

	This can be used to establish whether or not you can reach your
	target site. Options can be specified so that 'ping' provides the
	same type of route reporting as 'traceroute'.
	
</p>
</blockquote>
</td></tr>
<tr><td><br></td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#828DA6">

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -