Measure application performance

Measure your application's size in memory and its execution speed.

Measuring performance throughout construction can help to identify major performance problems as quickly as possible, which is almost always beneficial. If a major problem becomes apparent, then some immediate redesign will likely be necessary. If no major problem is apparent, then, if needed, minor optimizations can be performed later, when construction is nearly complete. (Many would argue that worrying about minor optimizations during construction is not advisable, since optimizations can sometimes make code more obscure.)

The excellent JConsole tool comes with JSE 6, and can be used to manage and monitor a local or remote Java Virtual Machine.

The Visual VM tool is also available with modern JDK's. It's full-featured, and very helpful for finding memory leaks. Another tool that now comes with the JDK is Java Mission Control.

If the above tools aren't available, then you are stuck with more primitive means of measuring an application's size in memory. They depend on your platform. For example:

As well, the JDK itself comes with basic profiling tools. For example:

Other tools include vmstat for Unix hosts, and perfmon for Windows hosts.
See Also :
Get size of object in memory
Time execution speed
Measure web app performance
Would you use this technique?
Yes   No   Undecided   
© 2017 Hirondelle Systems | Source Code | Contact | License | RSS
Individual code snippets can be used under this BSD license - Last updated on September 21, 2013.
Over 2,000,000 unique IPs last year - Built with WEB4J.
- In Memoriam : Bill Dirani -