Files
gitlabhq/config/initializers/active_record_query_trace.rb
Yorick Peterse 7971ed5dac Added active_record_query_trace
This can be used to track down where queries originate from, regardless
of whether they're caused by N+1 problems or not. This can be enabled by
setting the environment variable ENABLE_QUERY_TRACE to a non-empty value
(e.g. "true").
2015-10-15 12:05:01 +02:00

6 lines
114 B
Ruby

if ENV['ENABLE_QUERY_TRACE']
require 'active_record_query_trace'
ActiveRecordQueryTrace.enabled = 'true'
end