An overview of the number of queries is output to the log and browser console.
Queries total_count: 5, cached_count: 0, exec_count: 5, total_duration: 4.4ms
!!! %html %head %title MyAPP = favicon_link_tag '/favicon.ico' %body = yield - if Rails.env.development? = queries_watch_summary
Add this line to your application's Gemfile:
gem 'queries_watch', group: 'development'
And then execute:
config/initializers/queries_watch.rb, you can configure the following values.
if Rails.env.development? . do |config| config.warn_threshold = 30 # default: nil config.error_threshold = 100 # default: nil end end
The gem is available as open source under the terms of the MIT License.
Code of Conduct
Everyone interacting in the QueriesWatch project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.