public class MXBeanThreadProfiler extends java.lang.Object implements ThreadProfiler
ThreadMXBean implementation to provide thread information.| Constructor and Description |
|---|
MXBeanThreadProfiler()
ThreadContentionMonitoring and ThreadCpuTime are both turned on when
constructing this class.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getThreadCpuTime(long threadId)
Return the number of nanoseconds of CPU time used by the thread with the
given id.
|
long |
getThreadWaitTime(long threadId)
Return the number of nanoseconds of waiting time used by the thread with
the given id.
|
public MXBeanThreadProfiler()
ThreadMXBean for more details.public long getThreadWaitTime(long threadId)
ThreadProfilergetThreadWaitTime in interface ThreadProfilerthreadId - id of the target threadpublic long getThreadCpuTime(long threadId)
ThreadProfilergetThreadCpuTime in interface ThreadProfilerthreadId - id of the target thread