Created
January 3, 2011 21:26
-
-
Save hartsock/763995 to your computer and use it in GitHub Desktop.
An example filter for use with the Grails Profiler plugin that will profile *every* request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ProfilerFilters { | |
| def profilerLog | |
| def filters = { | |
| allUri(uri:'/**') { | |
| before = { | |
| if(Environment.getCurrent().equals(Environment.DEVELOPMENT) && System.getProperty('grails.profiler.on')) { | |
| profilerLog.startProfiling("grails.profiler") | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment