|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.h2.util.Profiler
public class Profiler
A simple CPU profiling tool similar to java -Xrunhprof. It can be used in-process (to profile the current application) or as a standalone program (to profile a different process).
Field Summary | |
---|---|
int |
depth
|
int |
interval
|
boolean |
paused
|
boolean |
sumClasses
|
Constructor Summary | |
---|---|
Profiler()
|
Method Summary | |
---|---|
static java.lang.instrument.Instrumentation |
getInstrumentation()
Get the instrumentation object if started as an agent. |
java.lang.String |
getTop(int count)
Get the top stack traces. |
static void |
main(java.lang.String... args)
Run the command line version of the profiler. |
static void |
premain(java.lang.String agentArgs,
java.lang.instrument.Instrumentation inst)
This method is called when the agent is installed. |
void |
run()
|
Profiler |
startCollecting()
Start collecting profiling data. |
Profiler |
stopCollecting()
Stop collecting. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int interval
public int depth
public boolean paused
public boolean sumClasses
Constructor Detail |
---|
public Profiler()
Method Detail |
---|
public static void premain(java.lang.String agentArgs, java.lang.instrument.Instrumentation inst)
agentArgs
- the agent argumentsinst
- the instrumentation objectpublic static java.lang.instrument.Instrumentation getInstrumentation()
public static void main(java.lang.String... args)
args
- the process id of the process - if not set the java processes
are listedpublic Profiler startCollecting()
public Profiler stopCollecting()
public void run()
run
in interface java.lang.Runnable
public java.lang.String getTop(int count)
count
- the maximum number of stack traces
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |