Displaying page render / SQL query time

Is there a way to display the time spent rendering a page and the time
spent in SQL query? I’d like to throw this up on view pages during
debug.

The logs seem to get this information, I just can’t seem to dig it out.

This page:
http://wiki.rubyonrails.org/rails/pages/BenchmarkingRails
covers benchmarking controllers, but doesn’t separate the render and
database times.

I can duplicate the stuff in ActionController::Benchmarking and use my
own “alias_method_chain”, but I’d prefer to know how to dig out the
stuff that’s already there. Any ideas?

Jake

I couldn’t find a way to pull it out and thus built a simple timer
plugin:

script/plugin install
svn://rubyforge.org/var/svn/activewarehouse/timer/trunk

I also put together a little blog post about it:

http://anthonyeden.com/

That includes some of the information on gotchas I found while putting
the plugin together. I believe there is another plugin which makes the
query benchmarks available in your view.

V/r
Anthony

On 11/16/06, Jake J. [email protected] wrote:

database times.


Email: [email protected]
Cell: 808 782-5046
Current Location: Melbourne, FL

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs