Class GraphStats


  • public class GraphStats
    extends java.lang.Object
    Light-weight statistics about the object graph.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private long totalCount  
      private long totalSize  
    • Constructor Summary

      Constructors 
      Constructor Description
      GraphStats()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void addRecord​(long size)  
      static GraphStats parseInstance​(java.lang.Object... roots)
      Parse the object graph starting from the given instance.
      long totalCount()
      Answer the total instance count
      long totalSize()
      Answer the total instance footprint
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • totalCount

        private long totalCount
      • totalSize

        private long totalSize
    • Constructor Detail

      • GraphStats

        public GraphStats()
    • Method Detail

      • parseInstance

        public static GraphStats parseInstance​(java.lang.Object... roots)
        Parse the object graph starting from the given instance.
        Parameters:
        roots - root instances to start from
        Returns:
        object graph
      • addRecord

        void addRecord​(long size)
      • totalCount

        public long totalCount()
        Answer the total instance count
        Returns:
        total instance count
      • totalSize

        public long totalSize()
        Answer the total instance footprint
        Returns:
        total instance footprint, bytes