Borys Bradel's Blog
Easiest way to profile Java applications
Tags: programming May 9, 2009
The easiest way to profile Java applications, besides printing out the difference between two System.currentTimeMillis() calls, is to use the profiler built in to Sun's JVM.
"java -agentlib:hprof=cpu=samples Abc" runs the Abc program. By default, a java.hprof.txt file is created.
And "java -Xrunhprof:help" shows help.
Copyright © 2009 Borys Bradel. All rights reserved. This post is only my possibly incorrect opinion.