Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show page generation stats in Grails

Aside from adding a custom timer to measure the beginning and end of a controller's action, is there an easier or more helpful way to show how long a page is really loaded (i.e. show at the bottom of the page: this page is generated in 30.5 seconds)? Note that in Grails, there's the concept of taglibs wherein you can add additional logic after all the processing done in the controller.

I'm actually not yet sure on how controller and taglib works or how the whole page is rendered in Grails, perhaps they are processed in parallel? Feel free to enlighten me on this too.

Thanks!

like image 375
firnnauriel Avatar asked May 20 '11 03:05

firnnauriel


1 Answers

If you just want the times spent on the action and to render your gsp (with all its tags), you can use a simple filter to measure that. Take a look at this blogpost: Profiling web requests in your Grails application (disclaimer: I'm the author)

Regards, Deluan

like image 181
deluan Avatar answered Oct 10 '22 11:10

deluan