java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_eval.profiling.MemoryProfiling

public class MemoryProfiling extends Object
Class with helper methods to profile memory usage.
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • runtime

      private static final Runtime 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

      public static String 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

      public static String humanReadableByteCount(long bytes)