Book Image

JMeter Cookbook

By : Bayo Erinle
Book Image

JMeter Cookbook

By: Bayo Erinle

Overview of this book

Table of Contents (16 chapters)
JMeter Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Monitoring servers while executing tests (using VisualVM)


When executing test scripts, it is important to monitor the server resources where the tested application is being hosted. Resources such as CPU, memory, thread count and thread pool, I/O resources, and so on are integral to the performance of an application. Monitoring these resources helps give crucial insights into where the bottlenecks lie in the tested application or hosted environment.

How to do it…

In this recipe, we will show you how to monitor application resources using VisualVM, a tool that comes bundled with standard JDK installation files. Perform the following steps:

  1. Install Maven, Git, and JDK 7 as described in the Appendix.

    Note

    The examples have been tested with JDK 7 only. At the time of writing this, they haven't been updated to work with JDK 8.

  2. Create a directory to keep the sample code. We will refer to this as CODE_SAMPLES.

  3. Open a terminal or DOS prompt and change the CODE_SAMPLES directory.

  4. Clone the application using...