Perform memory and CPU profiling using your Selenium test cases in conjunction with JConsole. JConsole uses the extensive instrumentation of the Java Virtual Machine (Java VM) to provide information about the performance and resource consumption of your application while being exercised by your Selenium tests.
The JConsole tool is a JMX-compliant graphical tool for monitoring a Java virtual machine. It can monitor both local and remote JVMs. It can also monitor and manage an application.