ProfileExample -- assessing the speed of some Math class methods, in comparison to each other and to some baseline methods that do very little.
To see this example in action:
  1. Compile the Java source file, ProfileExample.java:
    	javac ProfileExample.java
    
  2. Run the class, using the -prof switch:
    	java -prof ProfileExample
    
  3. Inspect the resulting java.prof file with your favorite text editor.

The source.