public class Profile extends java.lang.Object implements IProfile
Modifier and Type | Field and Description |
---|---|
static int |
MAX_ENCODED_BYTES
Collector has a 1000000 byte limit on the Content-Length in the HttpServletRequest
|
static int |
MAX_ENCODED_DATA_BYTES
The maximum size of the JSON payload itself (excluding data) is 114 bytes (4 Longs + 3 Integers).
|
static int |
MAX_STACK_DEPTH |
static int |
MAX_STACK_SIZE |
static int |
STACK_TRIM
The amount to trim a stack size by if as long as its encoded size is greater than MAX_ENCODED_BYTES.
|
Constructor and Description |
---|
Profile(ProfilerParameters parameters) |
Modifier and Type | Method and Description |
---|---|
void |
addStackTrace(long threadId,
boolean runnable,
ThreadType type,
java.lang.StackTraceElement... stackTrace)
Subclasses may override.
|
void |
beforeSampling() |
void |
end()
Subclasses may override.
|
long |
getEndTimeMillis() |
java.lang.Long |
getProfileId() |
ProfilerParameters |
getProfilerParameters() |
ProfileTree |
getProfileTree(ThreadType threadType) |
int |
getSampleCount() |
long |
getStartTimeMillis() |
void |
markInstrumentedMethods()
Use the loaded classes to mark all of the
ProfiledMethod s which are instrumented using our method
annotations. |
void |
start()
Subclasses may override.
|
int |
trimBy(int limit)
For testing.
|
void |
writeJSONString(java.io.Writer out) |
public static final int MAX_STACK_DEPTH
public static final int MAX_STACK_SIZE
public static final int MAX_ENCODED_BYTES
public static final int MAX_ENCODED_DATA_BYTES
public static final int STACK_TRIM
public Profile(ProfilerParameters parameters)
public ProfileTree getProfileTree(ThreadType threadType)
getProfileTree
in interface IProfile
public void markInstrumentedMethods()
ProfiledMethod
s which are instrumented using our method
annotations.markInstrumentedMethods
in interface IProfile
InstrumentedClass
,
InstrumentedMethod
public java.lang.Long getProfileId()
getProfileId
in interface IProfile
public ProfilerParameters getProfilerParameters()
getProfilerParameters
in interface IProfile
public void beforeSampling()
beforeSampling
in interface IProfile
public int getSampleCount()
getSampleCount
in interface IProfile
public final long getStartTimeMillis()
getStartTimeMillis
in interface IProfile
public final long getEndTimeMillis()
getEndTimeMillis
in interface IProfile
public void writeJSONString(java.io.Writer out) throws java.io.IOException
writeJSONString
in interface org.json.simple.JSONStreamAware
java.io.IOException
public void addStackTrace(long threadId, boolean runnable, ThreadType type, java.lang.StackTraceElement... stackTrace)
addStackTrace
in interface IProfile