On May 6, 2010, at 9:01 AM, David Blevins wrote: > The result is something exposes a nice clean view like this one: > > https://issues.apache.org/jira/secure/attachment/12443866/jmx-monitoring.png > > That's the view of our stateless pool stats via JConsole. > > Still have a few "wires" to hookup, but it's looking good. Next part will be > getting stats for each method invocation on a bean.
Bean method stats are mostly in (same as above, need to hook them in). As monitoring methods can get expensive, I added an @Monitor annotation that allows people to annotate the methods of their bean to elect which should be monitored and how much of a sample size to keep for each method. The annotation can be used at the class level as well to enable monitoring for all methods of the bean. So here's the view of a fully monitored class: https://issues.apache.org/jira/secure/attachment/12444073/jmx-invocations-all-stats.png As that can be a lot to chew on and I am a grep addict, I thought it might be nice to offer a standard operation on all our MBeans that allow you to filter (essentially grep) the MBean attributes. Here's an example of it being used to filter out all attributes except those for the "red()" method: https://issues.apache.org/jira/secure/attachment/12444074/jmx-invocations-filter-a1.png And the resulting MBean attributes, post filtering. With JConsole at least, it seems you have to disconnect and reconnect to force it to reload the MBean definition. https://issues.apache.org/jira/secure/attachment/12444075/jmx-invocations-filter-a2.png Here's another example if it being used to filter out all but the "Count" attributes, which allows us to see which methods are invoked the most. https://issues.apache.org/jira/secure/attachment/12444076/jmx-invocations-filter-b1.png https://issues.apache.org/jira/secure/attachment/12444077/jmx-invocations-filter-b2.png -David
