If you want a reliable result, use a profiler. I suggest VisualVM, which is easy to install and is bundled with the JDK starting from version 1.6.0_07. It
It is an easy to use visual tool that integrates several commandline JDK tools and lightweight profiling capabilities.