Package org.openjdk.jol.info
Class GraphStats
java.lang.Object
org.openjdk.jol.info.GraphStats
Light-weight statistics about the object graph.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
addRecord
(long size) static GraphStats
parseInstance
(Object... roots) Parse the object graph starting from the given instance.long
Answer the total instance countlong
Answer the total instance footprint
-
Field Details
-
totalCount
private long totalCount -
totalSize
private long totalSize
-
-
Constructor Details
-
GraphStats
public GraphStats()
-
-
Method Details
-
parseInstance
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
-