资 源 简 介
PerfSpy is an open source for runtime logging, performance monitoring and code inspecting. It uses ApsectJ to weave around your application code at runtime, and logs the execution time of every method and its input parameters and values. It has a UI application, in which you can view the method invocations and their input and return values as trees. With it, you can spot performance bottlenecks and understand complex code flow.
Check this for tutorial: http://perfspy.blogspot.com/.
PerfSpy is mostly useful in an application where actions are performed through an interface -- if an application is written following "programming to interface, not implementations", then it should be the case. Using PerfSpy, you can write a simple Aspect to monitor the interface method, and in the configuration, you can specify which concrete method you"d like to monitor. For example, if your code uses Structs 1, you can write an aspect to monitor "org.apache.struts.action.