MonkeyWrench

MonkeyWrench is a Swing-based Java profiling application.  It takes advantage of Java's management interface and instrumentation hooks, enabling you to:

  • Collect CPU and wall-clock statistics at the class constructor and method level, for the classes you select, with detailed information on the stack trace signatures and threads involved with each constructor or method;
  • Monitor object creation, also with associated stack trace signatures and associated threads;
  • Monitor all threads in the target application, focusing on those with the most CPU time (either in a window or cumulative); also monitor thread contention and deadlocks, all sampled at the time interval of your choice.
  • Graphically monitor the real-time behavior of the JVM garbage collectors, viewing both the number of collections, and the total time consumed collecting, also sampling at the time interval that you choose.

Resources

MonkeyWrench uses well-defined Java APIs, and its Swing interface makes it easy to begin profiling an application.  It can be launched at target launch time, or, for HotSpot JVMs, a MonkeyWrench launcher application can be used to locate and attach to already-running JVMs. 

MonkeyWrench provides in one place information you'd normally need to collect from multiple applications (e.g., method CPU times, hprof-style site summaries, and thread-contention monitoring).  Finally, since the source is available, you can customize it to provide just what you want, and only what you want, for your needs.