diff options
author | Stan Hu <stanhu@gmail.com> | 2019-06-15 02:13:07 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-06-15 02:13:07 +0300 |
commit | 3a90ecd2c23d18d5b783ac5828e77a798b55766e (patch) | |
tree | 245f8044fe3d21d5c795f67edf9496a39f48841a | |
parent | d7e3fcf1c62089716856e345e2a1b10b61b12c0c (diff) |
Clean QueryRecorder backtrace
This makes it much easier to debug N+1 queries via QueryRecorder by
eliminating unnecessary lines.
-rw-r--r-- | spec/support/helpers/query_recorder.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/support/helpers/query_recorder.rb b/spec/support/helpers/query_recorder.rb index c4ae62b25e4..d45377267f3 100644 --- a/spec/support/helpers/query_recorder.rb +++ b/spec/support/helpers/query_recorder.rb @@ -11,7 +11,7 @@ module ActiveRecord def show_backtrace(values) Rails.logger.debug("QueryRecorder SQL: #{values[:sql]}") - caller.each { |line| Rails.logger.debug(" --> #{line}") } + Gitlab::Profiler.clean_backtrace(caller).each { |line| Rails.logger.debug(" --> #{line}") } end def callback(name, start, finish, message_id, values) |