public class Profiler
extends java.lang.Object
implements java.lang.Runnable
| Modifier and Type | Field and Description |
|---|---|
int |
depth |
int |
interval |
boolean |
paused |
boolean |
sumClasses |
boolean |
sumMethods |
| Constructor and Description |
|---|
Profiler() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
public int interval
public int depth
public boolean paused
public boolean sumClasses
public boolean sumMethods
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.Runnablepublic java.lang.String getTop(int count)
count - the maximum number of stack tracesCopyright © 2010 - 2023 Adobe. All Rights Reserved