## org.h2.util
Class Profiler

    java.lang.Object
      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.

Constructor Summary
`Profiler()`

Method Summary
`int` `getDepth()`
`int` `getInterval()`
`java.lang.String` `getTop(int max)` Get the top stack traces.
`void` `run()`
`void` `setDepth(int depth)`
`void` `setInterval(int interval)`
`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`

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 max)

  Get the top stack traces.

  Parameters:
    `max` - the maximum number of results
  Returns:
    the stack traces.

### getInterval

    public int getInterval()

### setInterval

    public void setInterval(int interval)

### getDepth

    public int getDepth()

### setDepth

    public void setDepth(int depth)