Package com.illumon.util.profiling
Class NullThreadProfiler
java.lang.Object
com.illumon.util.profiling.NullThreadProfiler
- All Implemented Interfaces:
- ThreadProfiler
public final class NullThreadProfiler extends Object implements ThreadProfiler
The "null" 
ThreadProfiler implementation, which supports no actual measurements.- 
Field SummaryFields Modifier and Type Field Description static ThreadProfilerINSTANCEFields inherited from interface com.illumon.util.profiling.ThreadProfilerCPU_PROFILING_ENABLED, DEFAULT, MEMORY_PROFILING_ENABLED
- 
Method SummaryModifier and Type Method Description booleancpuProfilingAvailable()Check if CPU profiling (e.g.longgetCurrentThreadAllocatedBytes()Get the approximate number of total bytes allocated by the current thread.longgetCurrentThreadCpuTime()Get the approximate number of total nanoseconds the current thread has executed (in system or user mode) since CPU time measurement started.longgetCurrentThreadUserTime()Get the approximate number of total nanoseconds the current thread has executed (in user mode) since CPU time measurement started.booleanmemoryProfilingAvailable()Check if memory profiling (e.g.
- 
Field Details
- 
Method Details- 
memoryProfilingAvailablepublic boolean memoryProfilingAvailable()Description copied from interface:ThreadProfilerCheck if memory profiling (e.g.ThreadProfiler.getCurrentThreadAllocatedBytes()) is available (supported and enabled).- Specified by:
- memoryProfilingAvailablein interface- ThreadProfiler
- Returns:
- Whether memory profiling is available.
 
- 
getCurrentThreadAllocatedBytespublic final long getCurrentThreadAllocatedBytes()Description copied from interface:ThreadProfilerGet the approximate number of total bytes allocated by the current thread.- Specified by:
- getCurrentThreadAllocatedBytesin interface- ThreadProfiler
- Returns:
- The approximate number of total bytes allocated by the current thread, or
 QueryConstants.NULL_LONGif unavailable.
 
- 
cpuProfilingAvailablepublic boolean cpuProfilingAvailable()Description copied from interface:ThreadProfilerCheck if CPU profiling (e.g.ThreadProfiler.getCurrentThreadCpuTime()andThreadProfiler.getCurrentThreadUserTime()) is available (supported and enabled).- Specified by:
- cpuProfilingAvailablein interface- ThreadProfiler
- Returns:
- Whether CPU profiling is available.
 
- 
getCurrentThreadCpuTimepublic final long getCurrentThreadCpuTime()Description copied from interface:ThreadProfilerGet the approximate number of total nanoseconds the current thread has executed (in system or user mode) since CPU time measurement started.- Specified by:
- getCurrentThreadCpuTimein interface- ThreadProfiler
- Returns:
- The approximate number of total nanoseconds the current thread has executed, or
 QueryConstants.NULL_LONGif unavailable.
 
- 
getCurrentThreadUserTimepublic final long getCurrentThreadUserTime()Description copied from interface:ThreadProfilerGet the approximate number of total nanoseconds the current thread has executed (in user mode) since CPU time measurement started.- Specified by:
- getCurrentThreadUserTimein interface- ThreadProfiler
- Returns:
- The approximate number of total nanoseconds the current thread has executed in user mode, or
 QueryConstants.NULL_LONGif unavailable.
 
 
-