Skip to content

Instantly share code, notes, and snippets.

@hartsock
Created January 3, 2011 21:26
Show Gist options
  • Save hartsock/763995 to your computer and use it in GitHub Desktop.
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
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