Java Reference
In-Depth Information
}
iif ( request . getParameter ( "long" ) == null
null ) {
// Send back a page with about 4K of data
request . getRequestDispatcher ( "history.jsp" ).
forward ( request , response );
}
else
else {
// Send back a page with about 100K of data
request . getRequestDispatcher ( "longhistory.jsp" ).
forward ( request , response );
}
}
This class can inject different implementations of the history bean (for eager or lazy initializ-
ation, among other things); it will optionally cache the data retrieved from the backend data-
base (or mock entity manager). Those are the common options when dealing with the per-
formance of an enterprise application (in particular, caching data in the middle tier is some-
times considered to be the big performance advantage of an application server). Examples
throughout the topic will examine those trade-offs as well.
SYSTEM UNDER TEST
Even though this topic is primarily focused on software, benchmarks are just as much a measure
of the hardware that they are run on.
For the most part, the examples in this topic were run on my desktop system, which has an AMD
Athlon X4 640 CPU with four cores (four logical CPUs) and 8 GB of physical memory, running
Ubuntu Linux 12.04 LTS.
Understand Throughput, Batching, and Response Time
The second principle in performance testing involves various ways to look at the applica-
tion's performance. Which one to measure depends on which factors are most important to
your application.
Search WWH ::




Custom Search