News for hackers. Stuff that matters.
Re:Improve developer habits by showing time cost of DB queries by mchail on Wednesday April 16, 2014 @07:49PM (#7601237)
Great tip! For rails devs, I strongly recommend rack-mini-profiler [0]. It gives you an in-browser view of rendering time (which you can expand to break out by partial) with query time listed for each query. Each query also includes a stacktrace to make it easy to fix offensive queries. Great for identifying N+1 query bugs as well. There's a railscast for it, too [1].

[0] https://github.com/MiniProfiler/rack-mini-profiler

[1] http://railscasts.com/episodes/368-miniprofiler

There are no comments on this comment yet.