public class AgentSizeOf extends SizeOf
Modifier and Type | Field and Description |
---|---|
private static boolean |
AGENT_LOADED |
static java.lang.String |
BYPASS_LOADING
System property name to bypass attaching to the VM and loading of Java agent to measure Object sizes.
|
Constructor and Description |
---|
AgentSizeOf()
Builds a new SizeOf that will not filter fields and will cache reflected fields
|
AgentSizeOf(SizeOfFilter filter)
Builds a new SizeOf that will filter fields according to the provided filter and will cache reflected fields
|
AgentSizeOf(SizeOfFilter filter,
boolean caching)
Builds a new SizeOf that will filter fields according to the provided filter
|
Modifier and Type | Method and Description |
---|---|
long |
sizeOf(java.lang.Object obj)
Calculates the size in memory (heap) of the instance passed in, not navigating the down graph
|
deepSizeOf
public static final java.lang.String BYPASS_LOADING
private static final boolean AGENT_LOADED
public AgentSizeOf() throws java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException
- If agent couldn't be loaded or isn't presentAgentSizeOf(net.sf.ehcache.pool.sizeof.filter.SizeOfFilter, boolean)
public AgentSizeOf(SizeOfFilter filter) throws java.lang.UnsupportedOperationException
filter
- The filter to applyjava.lang.UnsupportedOperationException
- If agent couldn't be loaded or isn't presentAgentSizeOf(net.sf.ehcache.pool.sizeof.filter.SizeOfFilter, boolean)
,
SizeOfFilter
public AgentSizeOf(SizeOfFilter filter, boolean caching) throws java.lang.UnsupportedOperationException
filter
- The filter to applycaching
- whether to cache reflected fieldsjava.lang.UnsupportedOperationException
- If agent couldn't be loaded or isn't presentSizeOfFilter
public long sizeOf(java.lang.Object obj)
SizeOf