public class ClassHistogramRecord extends HistogramRecord
COMPARATOR_FOR_LABEL, COMPARATOR_FOR_NUMBEROFOBJECTS, COMPARATOR_FOR_RETAINEDHEAPSIZE, COMPARATOR_FOR_USEDHEAPSIZE| Constructor and Description |
|---|
ClassHistogramRecord(String label,
int classId,
int[] objectIds,
long usedHeapSize,
long retainedHeapSize)
Build a histogram record
|
ClassHistogramRecord(String label,
int classId,
long numberOfObjects,
long usedHeapSize,
long retainedHeapSize)
Build a histogram record
|
| Modifier and Type | Method and Description |
|---|---|
long |
calculateRetainedSize(ISnapshot snapshot,
boolean calculateIfNotAvailable,
boolean approximation,
IProgressListener listener)
Find out the retained size
|
int |
getClassId()
Get id of the class this class histogram record stands for.
|
int[] |
getObjectIds()
Get ids of the objects this class histogram record stands for.
|
String |
toString() |
getLabel, getNumberOfObjects, getRetainedHeapSize, getUsedHeapSize, incNumberOfObjects, incNumberOfObjects, incRetainedHeapSize, incUsedHeapSize, reverseComparator, setLabel, setNumberOfObjects, setRetainedHeapSize, setUsedHeapSizepublic ClassHistogramRecord(String label, int classId, long numberOfObjects, long usedHeapSize, long retainedHeapSize)
label - the class nameclassId - the id of the classnumberOfObjects - the number of objects of that classusedHeapSize - the space used by those objectsretainedHeapSize - the total of the size of all the objects retained by those objects. 0 means
calculate when required, negative means approximate size, positive means exact retained size is known.public ClassHistogramRecord(String label, int classId, int[] objectIds, long usedHeapSize, long retainedHeapSize)
label - the class nameclassId - the id of the classobjectIds - the ids of objects of that classusedHeapSize - the space used by those objectsretainedHeapSize - the total of the size of all the objects retained by those objects. 0 means
calculate when required, negative means approximate size, positive means exact retained size is known.public int getClassId()
public int[] getObjectIds()
public long calculateRetainedSize(ISnapshot snapshot, boolean calculateIfNotAvailable, boolean approximation, IProgressListener listener) throws SnapshotException
snapshot - the snapshotcalculateIfNotAvailable - whether to calculate the size if not already availableapproximation - whether to use an approximation to the retained size (sum of the individual retained sizes)listener - to report progress and errorsSnapshotException