Class MemoryProfiling
java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_eval.profiling.MemoryProfiling
Class with helper methods to profile memory usage.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
humanReadableByteCount
(long bytes) static void
Logs the used memory of the current JVM in a human readable way e.g.static long
Returns the used memory in bytes by the current JVM.static long
usedMemory
(boolean callGC) Returns the used memory in bytes by the current JVM.static String
Returns the used memory of the current JVM in a human readable way e.g.
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
runtime
-
-
Constructor Details
-
MemoryProfiling
public MemoryProfiling()
-
-
Method Details
-
usedMemory
public static long usedMemory(boolean callGC) Returns the used memory in bytes by the current JVM.- Parameters:
callGC
- true, if the garbage collector (GC) should be run first.- Returns:
- used memory in bytes by the current JVM
-
usedMemory
public static long usedMemory()Returns the used memory in bytes by the current JVM. The garbage collector (GC) is exectuted before the measurement.- Returns:
- used memory in bytes by the current JVM
-
usedMemoryHumanReadable
Returns the used memory of the current JVM in a human readable way e.g. 50 MB or 100 GB. The garbage collector (GC) is exectuted before the measurement.- Returns:
- used memory of the current JVM in a human readable way
-
logUsedMemory
public static void logUsedMemory()Logs the used memory of the current JVM in a human readable way e.g. 50 MB or 100 GB. The garbage collector (GC) is exectuted before the measurement. -
humanReadableByteCount
-