public class SizeOfAgent extends Object
| Constructor | Description |
|---|---|
SizeOfAgent() |
| Modifier and Type | Method | Description |
|---|---|---|
static long |
fullSizeOf(Object obj) |
Calculates full size of object iterating over
its hierarchy graph.
|
static long |
fullSizeOf(Object obj,
Filter filter) |
Calculates full size of object iterating over
its hierarchy graph.
|
static Map<Class,Statistics> |
fullSizePerClass(Object obj) |
Calculates size/count statistics of object iterating over
its hierarchy graph, breaking it down per class.
|
static Map<Class,Statistics> |
fullSizePerClass(Object obj,
Filter filter) |
Calculates size/count statistics of object iterating over
its hierarchy graph, breaking it down per class.
|
static void |
premain(String agentArgs,
Instrumentation instP) |
initializes agent.
|
static long |
sizeOf(Object o) |
Returns object size without member sub-objects.
|
public static void premain(String agentArgs, Instrumentation instP)
agentArgs - the arguments (ignored)instP - the instrumentation to usepublic static long sizeOf(Object o)
o - object to get size ofpublic static long fullSizeOf(Object obj)
obj - object to calculate size ofpublic static long fullSizeOf(Object obj, Filter filter)
obj - object to calculate size of, filter does not skip this objectfilter - the filter for the objects/fields, can be nullpublic static Map<Class,Statistics> fullSizePerClass(Object obj)
obj - object to calculate size ofpublic static Map<Class,Statistics> fullSizePerClass(Object obj, Filter filter)
obj - object to calculate size of, filter does not skip this objectfilter - the filter for the objects/fields, can be nullCopyright © 2018. All Rights Reserved.