Class MemorySpy

java.lang.Object
org.cip4.jdflib.util.MemorySpy

public class MemorySpy extends Object
  • Field Details

  • Constructor Details

    • MemorySpy

      public MemorySpy()
  • Method Details

    • isDefaultMega

      public static boolean isDefaultMega()
      Returns:
      the defaultMega
    • setDefaultMega

      public static void setDefaultMega(boolean defaultMega)
      Parameters:
      defaultMega - the defaultMega to set
    • getSizeMap

      public Map<String,Long> getSizeMap()
      Returns:
    • getHeapUsed

      public long getHeapUsed(MemorySpy.MemScope scope)
      Parameters:
      scope -
      Returns:
    • getNonHeapUsed

      public long getNonHeapUsed(MemorySpy.MemScope scope)
      Parameters:
      scope -
      Returns:
    • getPermGen

      public long getPermGen(MemorySpy.MemScope scope)
      Parameters:
      scope -
      Returns:
    • getMemFromPool

      public long getMemFromPool(String name, MemorySpy.MemScope scope)
      Parameters:
      name -
      scope -
      Returns:
    • getSummary

      public String getSummary(String delim)
      get a fast summary for debugging
      Returns:
    • getSummary

      public String getSummary()
      get a fast summary for debugging
      Returns:
    • getCurrentMem

      public long getCurrentMem()
      get the currently used memory
      Returns:
      the used memory
    • getSummaryMap

      public Map<String,Long> getSummaryMap()
      get a fast summary for debugging
      Returns:
    • getTotalMemory

      public long getTotalMemory()
      Returns:
    • getFreeMem

      public long getFreeMem()
      Returns:
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      See Also:
    • isWantMega

      public boolean isWantMega()
      Returns:
    • setWantMega

      public void setWantMega(boolean wantMega)
      if true we want it in Megabytes
      Parameters:
      wantMega -