public interface MemUseTrackerKey extends MetricKey
com.sun.management.ThreadMXBean. This facility
should be employed using the try-with-resources pattern:
try (DebugCloseable a = memUseTracker.start()) {
// the code to measure
}
NAME_COMPARATOR| Modifier and Type | Method and Description |
|---|---|
MemUseTrackerKey |
doc(String string)
Sets the documentation for this key.
|
static long |
getCurrentThreadAllocatedBytes() |
long |
getCurrentValue(DebugContext debug)
Gets the current value of this tracker.
|
DebugCloseable |
start(DebugContext debug)
Creates a point from which memory usage will be recorded if memory use tracking is
enabled.
|
getDoc, getDocName, getName, toCSVFormat, toHumanReadableFormatDebugCloseable start(DebugContext debug)
long getCurrentValue(DebugContext debug)
MemUseTrackerKey doc(String string)
MetricKeystatic long getCurrentThreadAllocatedBytes()