public abstract class SizeOf extends Object
Constructor and Description |
---|
SizeOf(SizeOfFilter fieldFilter,
boolean caching)
Builds a new SizeOf that will filter fields according to the provided filter
|
Modifier and Type | Method and Description |
---|---|
Size |
deepSizeOf(int maxDepth,
boolean abortWhenMaxDepthExceeded,
Object... obj)
Measures the size in memory (heap) of the objects passed in, walking their graph down
Any overlap of the graphs being passed in will be recognized and only measured once
|
abstract long |
sizeOf(Object obj)
Calculates the size in memory (heap) of the instance passed in, not navigating the down graph
|
public SizeOf(SizeOfFilter fieldFilter, boolean caching)
fieldFilter
- The filter to applycaching
- whether to cache reflected fieldsSizeOfFilter
public abstract long sizeOf(Object obj)
obj
- the object to measure the size ofpublic Size deepSizeOf(int maxDepth, boolean abortWhenMaxDepthExceeded, Object... obj)
maxDepth
- maximum depth of the object graph to traverseabortWhenMaxDepthExceeded
- true if the object traversal should be aborted when the max depth is exceededobj
- the root objects of the graphs to measuresizeOf(Object)
Copyright © 2003-2013 Terracotta, Inc.. All Rights Reserved.