Package org.openjdk.jol.info
Class GraphStats
- java.lang.Object
-
- org.openjdk.jol.info.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 countlong
totalSize()
Answer the total instance footprint
-
-
-
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
-
-