Grails Plumbing: Spring AOP Interceptors | Object Partners

On my most recent Grails project we where tasked to get execution times on some methods that were suspected of running a bit long. The quick and easy (but kind of crude) way to do this would be to set a start time at the beginning of the method, and end time at the end, and log the deltas. If you have to do this on more than one method it quickly becomes tedious and starts to really clutter your code base. Luckily, Grails is built upon Spring, and Spring just happens to have a buried gem that does just what we needed: PerformanceMonitorInterceptor.

via Grails Plumbing: Spring AOP Interceptors | Object Partners.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.