开发者

how to measure page request time in milliseconds in a rails project?

开发者 https://www.devze.com 2023-01-16 23:44 出处:网络
New to rails, want to test the time it takes for a given page to render in milliseconds. Where in the request pipeline do I开发者_开发技巧 do this? (start and stop the time, and output to the page)Wh

New to rails, want to test the time it takes for a given page to render in milliseconds.

Where in the request pipeline do I开发者_开发技巧 do this? (start and stop the time, and output to the page)


When you develop with WeBRICK or Mongrel, you should see this in the console:

Rendered layouts/application.html.erb (7.1ms)
Rendered members/index.html.erb within layouts/authed (184.8ms)
Completed 200 OK in 402ms (Views: 185.8ms | ActiveRecord: 26.2ms)

As you can see it says how long the request took to process the pages.

0

精彩评论

暂无评论...
验证码 换一张
取 消