org.h2.util
Class Profiler

java.lang.Object
  extended by org.h2.util.Profiler
All Implemented Interfaces:
java.lang.Runnable

public class Profiler
extends java.lang.Object
implements java.lang.Runnable

A simple CPU profiling tool similar to java -Xrunhprof.


Field Summary
 int depth
           
 int interval
           
 
Constructor Summary
Profiler()
           
 
Method Summary
 java.lang.String getTop(int count)
          Get the top stack traces.
 void run()
           
 void startCollecting()
          Start collecting profiling data.
 void stopCollecting()
          Stop collecting.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

interval

public int interval

depth

public int depth
Constructor Detail

Profiler

public Profiler()
Method Detail

startCollecting

public void startCollecting()
Start collecting profiling data.


stopCollecting

public void stopCollecting()
Stop collecting.


run

public void run()
Specified by:
run in interface java.lang.Runnable

getTop

public java.lang.String getTop(int count)
Get the top stack traces.

Parameters:
count - the maximum number of stack traces
Returns:
the stack traces.