Class ObjectSizeOfAgent
java.lang.Object
org.apache.wicket.util.instrument.ObjectSizeOfAgent
Instrumentation agent for calculating object sizes using Java's instrumentation API. To use it,
have the jar somewhere we you can access it (just having this class on the classpath is not
enough) and startup your application with a -javaagent argument like e.g:
'-javaagent:/mydir/wicket-objectsizeof-agent-1.3-SNAPSHOT.jar'. When the application starts up,
this agent will register an
WicketObjects.IObjectSizeOfStrategy
at
WicketObjects.setObjectSizeOfStrategy(IObjectSizeOfStrategy)
. Note that this is a static
registration.- Author:
- eelcohillenius
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
agentmain
(String agentArgs, Instrumentation instrumentation) Initializes agent when it is attached to an already running JVM.static void
premain
(String agentArgs, Instrumentation instrumentation) Initializes agent before the main function of the application is executed.
-
Constructor Details
-
ObjectSizeOfAgent
public ObjectSizeOfAgent()
-
-
Method Details
-
agentmain
Initializes agent when it is attached to an already running JVM.- Parameters:
agentArgs
- Arguments passed in to the agentinstrumentation
- The instrumentation class
-
premain
Initializes agent before the main function of the application is executed.- Parameters:
agentArgs
- Arguments passed in to the agentinstrumentation
- The instrumentation class
-