0

I need to collect performance metrics for a bunch of Grails on Groovy apps. I'm thinking of doing it on the basis of a few examples on the web (cf. http://www.infoq.com/articles/aop-with-groovy). I think I've got what I need to do in terms of collecting perf data across method and closure boundaries.

What I have not a good idea of doing is o how can I bunch up my perf stats together so that their granularity is preserved o how to be able to weave the advice at load time using Groovy/Grails instead of instrumenting the code before run-time

Any (and every) help is very welcome!

Thanks

ombud
  • 199
  • 2
  • 10
  • 1
    Does it really need AOP? VisualVM (https://visualvm.dev.java.net/) worked fine to me. You can fine-tune it to what classes to profile and what not. – Victor Sergienko Feb 25 '11 at 09:43

1 Answers1

0

first of all: don't do this yourself. especially in Groovy it's not easy to get monitoring done right due to byte code manipulation/optimization by groovyc, possible mess up with AST transformations etc.

take a look at Spring Insight. It comes with the developer edition of tc-server and lets you monitor everything down to GORM-generated SQL statements.

another thing I'v googled is the perf4j Grails plugin, from the documentation it looks pretty what you might need.

Andre Steingress
  • 4,381
  • 28
  • 28
  • Thanks very much for both of your suggestions - I think I'll go ahead and use VisualVM and YourKit (I wasn't able to set Insight up correctly - it kept complaining about timeouts upon execution) – ombud Feb 28 '11 at 18:22
  • OTOH, I came across this http://www.objectpartners.com/2010/10/19/grails-plumbing-spring-aop-interceptors/ (Grails is strongly married to Spring) and thought I would play with it; I'll report progress as and when I make some – ombud Mar 07 '11 at 02:15