|
JProfiler API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Connection
The primary interface for retrieving profiling data from a profiled JVM or a saved snapshot.
All requests for new profiling data that has to be queried from the profiling agent are done by calling a method on a connection object.
ConnectionFactory
Method Summary | |
---|---|
void |
close()
Closes the connection and free all resources asscociated with this connection. |
Tree |
getAllocationHotspotBacktrace(ProfilingValue hotspot)
Calculates the back traces for an allocation hot spot. |
AllocationHotspots |
getAllocationHotspots(Aggregation level,
Liveness liveness,
Descriptor[] classOrArrayDescriptors,
boolean resetGc,
boolean includeFiltered)
Calculates the allocation hot spots for recorded objects of selected classes. |
AllocationHotspots |
getAllocationHotspots(Aggregation level,
Liveness liveness,
java.lang.String packageName,
boolean resetGc,
boolean includeFiltered)
Calculates the allocation hot spots for recorded objects of a selected package. |
Tree |
getAllocationTree(Aggregation level,
Liveness liveness,
Descriptor[] classOrArrayDescriptors,
boolean resetGc)
Calculates the allocation tree for recorded objects of selected classes. |
Tree |
getAllocationTree(Aggregation level,
Liveness liveness,
java.lang.String packageName,
boolean resetGc)
Calculates the allocation tree for recorded objects of a selected package. |
Tree |
getCpuHotspotBacktrace(ProfilingValue hotspot)
Calculates the back traces for a CPU hot spot. |
CpuHotspots |
getCpuHotspots(java.util.Collection<ThreadInfo> threads,
Aggregation level,
ThreadStatus status,
boolean includeFiltered)
Calculates CPU hot spots. |
Tree |
getCpuTree(java.util.Collection<ThreadInfo> threads,
Aggregation level,
ThreadStatus status)
Calculates the cumulated call tree. |
InterceptorsInfo |
getInterceptorsInfo()
Returns information about registered interceptors. |
Tree |
getPayloadHotspotBacktrace(ProfilingValue hotspot)
Calculates the back traces for a payload hot spot. |
java.util.List<ProfilingValue> |
getPayloadHotspots(int payloadId,
java.util.Collection<ThreadInfo> threads,
Aggregation level,
ThreadStatus status)
Calculates hot spots for a non-method hot spot type. |
RecordedHeapUsage |
getRecordedHeapUsage(boolean resetGc)
Calculates the heap usage for all classes of recorded objects in the JVM. |
java.util.Collection<ThreadInfo> |
getThreadInfos()
Returns information about all threads (live and dead) in the JVM. |
java.util.Set<HeapValue> |
getTotalHeapUsage()
Calculates the total heap usage for all classes in the JVM. |
void |
recordAllocations(boolean record)
Starts or stops recording allocations. |
void |
recordCpuData(boolean record)
Starts or stops recording CPU data. |
Method Detail |
---|
void close()
void recordCpuData(boolean record)
record
- whether to record CPU data or notvoid recordAllocations(boolean record)
getTotalHeapUsage()
method
to get a statistics of all classes and their instances.
record
- whether to record allocations or notInterceptorsInfo getInterceptorsInfo()
InterceptorProvider
.
Interceptor
,
InterceptorProvider
CpuHotspots getCpuHotspots(java.util.Collection<ThreadInfo> threads, Aggregation level, ThreadStatus status, boolean includeFiltered)
threads
- the threads for which to calculate the hot spots (see getThreadInfos()
) or null if all threads should be cumulatedlevel
- the aggregation level for the hot spots and the back tracesstatus
- the thread status for the hot spots and the back tracesincludeFiltered
- whether calls to filtered classes should be separate hot spots (true) or be added to the calling methods (false)
getCpuHotspotBacktrace(com.jprofiler.api.platform.structures.ProfilingValue)
Tree getCpuHotspotBacktrace(ProfilingValue hotspot)
hotspot
- the hot spot for which to calculate the back trace
getCpuHotspots
java.util.List<ProfilingValue> getPayloadHotspots(int payloadId, java.util.Collection<ThreadInfo> threads, Aggregation level, ThreadStatus status)
Payload types are selected by their payload id which is either one of the PAYLOAD_* constants in Payload
or the payload id of a registered interceptor, in the latter case the one-based index of the interceptor in the array returned by the
InterceptorProvider
.
You can also get the payload id from
InterceptorsInfo.getDescriptionToId()
.
The descriptor type of the ProfilingValue objects
is either a PayloadDescriptor
or a URLDescriptor
.
payloadId
- the id of the payload type for which to calculate the hot spotsthreads
- the threads for which to calculate the hot spots (see getThreadInfos()
) or null if all threads should be cumulatedlevel
- the aggregation level for the hot spots and the back tracesstatus
- the thread status for the hot spots and the back traces
getPayloadHotspotBacktrace(com.jprofiler.api.platform.structures.ProfilingValue)
Tree getPayloadHotspotBacktrace(ProfilingValue hotspot)
hotspot
- the hot spot for which to calculate the back trace
getPayloadHotspots
Tree getCpuTree(java.util.Collection<ThreadInfo> threads, Aggregation level, ThreadStatus status)
threads
- the threads for which to calculate the call tree (see getThreadInfos()
) or null if all threads should be cumulatedlevel
- the aggregation level for the call treestatus
- the thread status for the call tree
java.util.Collection<ThreadInfo> getThreadInfos()
java.util.Set<HeapValue> getTotalHeapUsage()
RecordedHeapUsage getRecordedHeapUsage(boolean resetGc)
resetGc
- whether to reset information about garbage collected objects after the requested information is retrieved.
Tree getAllocationTree(Aggregation level, Liveness liveness, Descriptor[] classOrArrayDescriptors, boolean resetGc)
Liveness types that include garbage collected objects only work correctly if allocation recording options in the profiling settings include GCed objects.
level
- the aggregation level for the allocation treeliveness
- the object liveness for which the allocation tree should be calculatedclassOrArrayDescriptors
- the descriptors for the selected classes. You can get those descriptors from the
HeapValue
objects. If null, the allocation tree is calculated for all classes.resetGc
- whether to reset information about garbage collected objects after the requested information is retrieved.
Tree getAllocationTree(Aggregation level, Liveness liveness, java.lang.String packageName, boolean resetGc)
Liveness types that include garbage collected objects only work correctly if allocation recording options in the profiling settings include GCed objects.
level
- the aggregation level for the allocation treeliveness
- the object liveness for which the allocation tree should be calculatedpackageName
- the name of the selected package. If null, the allocation tree is calculated for all classes.resetGc
- whether to reset information about garbage collected objects after the requested information is retrieved.
AllocationHotspots getAllocationHotspots(Aggregation level, Liveness liveness, Descriptor[] classOrArrayDescriptors, boolean resetGc, boolean includeFiltered)
Liveness types that include garbage collected objects only work correctly if allocation recording options in the profiling settings include GCed objects.
level
- the aggregation level for the allocation hot spots and back tracesliveness
- the object liveness for which the allocation hot spots should be calculatedclassOrArrayDescriptors
- the descriptors for the selected classes. You can get those descriptors from the
HeapValue
objects. If null, the allocation hot spots are calculated for all classes.resetGc
- whether to reset information about garbage collected objects after the requested information is retrieved.includeFiltered
- whether calls to filtered classes should be separate hot spots (true) or be added to the calling methods (false)
getAllocationHotspotBacktrace(com.jprofiler.api.platform.structures.ProfilingValue)
AllocationHotspots getAllocationHotspots(Aggregation level, Liveness liveness, java.lang.String packageName, boolean resetGc, boolean includeFiltered)
Liveness types that include garbage collected objects only work correctly if allocation recording options in the profiling settings include GCed objects.
level
- the aggregation level for the allocation hot spots and back tracesliveness
- the object liveness for which the allocation hot spots should be calculatedpackageName
- the name of the selected package. If null, the allocation hot spots are calculated for all classes.resetGc
- whether to reset information about garbage collected objects after the requested information is retrieved.includeFiltered
- whether calls to filtered classes should be separate hot spots (true) or be added to the calling methods (false)
getAllocationHotspotBacktrace(com.jprofiler.api.platform.structures.ProfilingValue)
Tree getAllocationHotspotBacktrace(ProfilingValue hotspot)
hotspot
- the allocation hot spot for which to calculate the back trace
getAllocationHotspots for selected classes
,
getAllocationHotspots for a selected package
|
JProfiler API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |