views:

29

answers:

1

Page load time, when in RoR lifecycle do you start/stop a timer to get this stat?

I know I can create a before/after at the controller level, is there anything higher up in the chain that I get start/stop this timer?

I want to get timings for a production release also, not just development mode where things are always slower.

+3  A: 

If I were trying to get the most complete picture of my response time I'd use something like NewRelic's RPM, or build something not unlike the example here http://asciicasts.com/episodes/151-rack-middleware

By having it track it in the middleware you're getting most (if not all) of the Rails stack in the metric instead of just the controller call. Also you can use it for other things like Sinatra apps. :)

bnferguson