Skip to content

Instantly share code, notes, and snippets.

@ishults
Last active December 16, 2015 20:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ishults/10558478 to your computer and use it in GitHub Desktop.
Save ishults/10558478 to your computer and use it in GitHub Desktop.
private static final String START_TIME = 'Hibernate_Start_Time'
def filters = {
logHibernateStats(controller: '*', action: '*') {
before = {
request[START_TIME] = System.currentTimeMillis()
}
afterView = {
Long end = System.currentTimeMillis()
Long start = request[START_TIME]
log.info "Total time: ${end - start} ms"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment