Step1
gem 'rack-mini-profiler'
Step2
测量某一段代码
Rack::MiniProfiler.step("User Auth") do
@users = User.all
end
Reference:
http://railscasts.com/episodes/368-miniprofiler
http://samsaffron.com/archive/2012/07/12/miniprofiler-ruby-edition