public class HeapProfiler extends MemoryProfiler
MemoryProfiler.MemoryType
Modifier and Type | Field and Description |
---|---|
static int |
OFFSET
Sets the memory offset.
|
Constructor and Description |
---|
HeapProfiler()
Instantiates a
MemoryProfiler . |
Modifier and Type | Method and Description |
---|---|
long |
getCurrentValue()
Gets the current value.
|
protected long |
getTotal()
Gets the total memory available.
|
protected java.lang.String |
getType()
Gets the type of memory.
|
static void |
printFreeMemory(boolean printTotal)
Prints the free heap memory.
|
static void |
printUsedMemory(boolean printTotal)
Prints the used heap memory.
|
compare, getMemory, getName, isBiggerPrinted, printMemory, printMemory, printValue, setMemoryType
public HeapProfiler()
MemoryProfiler
.public static void printUsedMemory(boolean printTotal)
printTotal
- true
if the total memory should be printed.public static void printFreeMemory(boolean printTotal)
printTotal
- true
if the total memory should be printed.public long getCurrentValue()
Profiler
protected long getTotal()
MemoryProfiler
getTotal
in class MemoryProfiler
protected java.lang.String getType()
MemoryProfiler
getType
in class MemoryProfiler