Java development/profiling tool: Classmexer agent
MemoryUtil public static long memoryUsageOf(Object obj) public static long deepMemoryUsageOf(Object obj) public static long deepMemoryUsageOf(Object obj, VisibilityFilter referenceFilter) public static long deepMemoryUsageOfAll(Collection objs) public static long deepMemoryUsageOfAll(Collection objs, VisibilityFilter referenceFilter) For more information about on these methods, see the examples below, plus the Classmexer API documentation. Classmexer as an instrumentation agent and relies on the Java Instrumentation framework. To set up your project to use Classmexer: for compiling: include classmexer.jar in your project, or make sure you include it in the classpath if you are compiling from the command line; for running: add java command used to start your application, making sure that a copy of the jar is in the working directory (the directory from which you start the application— not necessarily the same as the classpath). In your source code,Read full article from Java development/profiling tool: Classmexer agent
No comments:
Post a Comment