Package io.deephaven.util.profiling
Class NullThreadProfiler
java.lang.Object
io.deephaven.util.profiling.NullThreadProfiler
- All Implemented Interfaces:
ThreadProfiler
The "null"
ThreadProfiler
implementation, which supports no actual measurements.-
Field Summary
Fields inherited from interface io.deephaven.util.profiling.ThreadProfiler
CPU_PROFILING_ENABLED, DEFAULT, MEMORY_PROFILING_ENABLED
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Check if CPU profiling (e.g.final long
Get the approximate number of total bytes allocated by the current thread.final long
Get the approximate number of total nanoseconds the current thread has executed (in system or user mode) since CPU time measurement started.final long
Get the approximate number of total nanoseconds the current thread has executed (in user mode) since CPU time measurement started.boolean
Check if memory profiling (e.g.
-
Field Details
-
INSTANCE
-
-
Method Details
-
memoryProfilingAvailable
public boolean memoryProfilingAvailable()Description copied from interface:ThreadProfiler
Check if memory profiling (e.g.ThreadProfiler.getCurrentThreadAllocatedBytes()
) is available (supported and enabled).- Specified by:
memoryProfilingAvailable
in interfaceThreadProfiler
- Returns:
- Whether memory profiling is available.
-
getCurrentThreadAllocatedBytes
public final long getCurrentThreadAllocatedBytes()Description copied from interface:ThreadProfiler
Get the approximate number of total bytes allocated by the current thread.- Specified by:
getCurrentThreadAllocatedBytes
in interfaceThreadProfiler
- Returns:
- The approximate number of total bytes allocated by the current thread, or
QueryConstants.NULL_LONG
if unavailable.
-
cpuProfilingAvailable
public boolean cpuProfilingAvailable()Description copied from interface:ThreadProfiler
Check if CPU profiling (e.g.ThreadProfiler.getCurrentThreadCpuTime()
andThreadProfiler.getCurrentThreadUserTime()
) is available (supported and enabled).- Specified by:
cpuProfilingAvailable
in interfaceThreadProfiler
- Returns:
- Whether CPU profiling is available.
-
getCurrentThreadCpuTime
public final long getCurrentThreadCpuTime()Description copied from interface:ThreadProfiler
Get the approximate number of total nanoseconds the current thread has executed (in system or user mode) since CPU time measurement started.- Specified by:
getCurrentThreadCpuTime
in interfaceThreadProfiler
- Returns:
- The approximate number of total nanoseconds the current thread has executed, or
QueryConstants.NULL_LONG
if unavailable.
-
getCurrentThreadUserTime
public final long getCurrentThreadUserTime()Description copied from interface:ThreadProfiler
Get the approximate number of total nanoseconds the current thread has executed (in user mode) since CPU time measurement started.- Specified by:
getCurrentThreadUserTime
in interfaceThreadProfiler
- Returns:
- The approximate number of total nanoseconds the current thread has executed in user mode, or
QueryConstants.NULL_LONG
if unavailable.
-