Package calibration.java.mx.jmx.mbeans
Class ThreadProfiler
java.lang.Object
javax.management.NotificationBroadcasterSupport
calibration.java.mx.jmx.mbeans.ThreadProfiler
- All Implemented Interfaces:
ThreadProfilerMXBean,NotificationBroadcaster,NotificationEmitter
public final class ThreadProfiler
extends NotificationBroadcasterSupport
implements ThreadProfilerMXBean
The Class ThreadProfiler.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongDecrement thread counter.longGets the errors.longGets the max method allocated bytes.longGets the max cpu time.longGets the max thread allocated bytes.final longGets the method allocated bytes.longGets the cpu time.longGets the min method allocated bytes.longGets the min cpu time.longGets the min thread allocated bytes.longgetRuns()Gets the runs.final longGets the thread allocated bytes.longGets the thread counter.final longGets the thread cpu time.final longGets the thread system time.final longGets the thread user time.voidIncrement thread counter.voidprofile(long threadCpuTime, long threadUserTime, long methodAllocatedBytes, long cpuTime, long threadAllocatedBytes, long threads, long runAll, long errorsAll) Profile.Methods inherited from class javax.management.NotificationBroadcasterSupport
addNotificationListener, removeNotificationListener, removeNotificationListener, sendNotification
-
Constructor Details
-
ThreadProfiler
public ThreadProfiler()
-
-
Method Details
-
getThreadCounter
public long getThreadCounter()Gets the thread counter.- Specified by:
getThreadCounterin interfaceThreadProfilerMXBean- Returns:
- the thread counter
-
incrementThreadCounter
public void incrementThreadCounter()Increment thread counter. -
decrementThreadCounter
public long decrementThreadCounter()Decrement thread counter.- Returns:
- the long
-
getMaxMethodAllocatedBytes
public long getMaxMethodAllocatedBytes()Gets the max method allocated bytes.- Specified by:
getMaxMethodAllocatedBytesin interfaceThreadProfilerMXBean- Returns:
- the max method allocated bytes
-
getMinMethodAllocatedBytes
public long getMinMethodAllocatedBytes()Gets the min method allocated bytes.- Specified by:
getMinMethodAllocatedBytesin interfaceThreadProfilerMXBean- Returns:
- the min method allocated bytes
-
getMaxThreadAllocatedBytes
public long getMaxThreadAllocatedBytes()Gets the max thread allocated bytes.- Specified by:
getMaxThreadAllocatedBytesin interfaceThreadProfilerMXBean- Returns:
- the max thread allocated bytes
-
getMinThreadAllocatedBytes
public long getMinThreadAllocatedBytes()Gets the min thread allocated bytes.- Specified by:
getMinThreadAllocatedBytesin interfaceThreadProfilerMXBean- Returns:
- the min thread allocated bytes
-
getThreadUserTime
public final long getThreadUserTime()Gets the thread user time.- Specified by:
getThreadUserTimein interfaceThreadProfilerMXBean- Returns:
- the thread user time
-
getThreadCpuTime
public final long getThreadCpuTime()Gets the thread cpu time.- Specified by:
getThreadCpuTimein interfaceThreadProfilerMXBean- Returns:
- the thread cpu time
-
getThreadSystemTime
public final long getThreadSystemTime()Gets the thread system time.- Specified by:
getThreadSystemTimein interfaceThreadProfilerMXBean- Returns:
- the thread system time
-
getMethodAllocatedBytes
public final long getMethodAllocatedBytes()Gets the method allocated bytes.- Specified by:
getMethodAllocatedBytesin interfaceThreadProfilerMXBean- Returns:
- the method allocated bytes
-
getThreadAllocatedBytes
public final long getThreadAllocatedBytes()Gets the thread allocated bytes.- Specified by:
getThreadAllocatedBytesin interfaceThreadProfilerMXBean- Returns:
- the thread allocated bytes
-
profile
public void profile(long threadCpuTime, long threadUserTime, long methodAllocatedBytes, long cpuTime, long threadAllocatedBytes, long threads, long runAll, long errorsAll) Profile.- Specified by:
profilein interfaceThreadProfilerMXBean- Parameters:
threadCpuTime- the thread cpu timethreadUserTime- the thread user timemethodAllocatedBytes- the method allocated bytescpuTime- the cpu timethreadAllocatedBytes- the thread allocated bytesthreads- the threadsrunAll- the run allerrorsAll- the errors all
-
getNotificationInfo
- Specified by:
getNotificationInfoin interfaceNotificationBroadcaster- Overrides:
getNotificationInfoin classNotificationBroadcasterSupport
-
getMaxMethodCpuTime
public long getMaxMethodCpuTime()Gets the max cpu time.- Specified by:
getMaxMethodCpuTimein interfaceThreadProfilerMXBean- Returns:
- the max cpu time
-
getErrors
public long getErrors()Gets the errors.- Specified by:
getErrorsin interfaceThreadProfilerMXBean- Returns:
- the errors
-
getMinMethodCpuTime
public long getMinMethodCpuTime()Gets the min cpu time.- Specified by:
getMinMethodCpuTimein interfaceThreadProfilerMXBean- Returns:
- the min cpu time
-
getRuns
public long getRuns()Gets the runs.- Specified by:
getRunsin interfaceThreadProfilerMXBean- Returns:
- the runs
-
getMethodCpuTime
public long getMethodCpuTime()Gets the cpu time.- Specified by:
getMethodCpuTimein interfaceThreadProfilerMXBean- Returns:
- the cpu time
-