Ignore SQL CACHE hits in Sherlock

This commit is contained in:
Yorick Peterse 2017-11-03 16:08:37 +01:00
parent 64c9d7805d
commit e3b626dae8
No known key found for this signature in database
GPG key ID: EDD30D2BEB691AC9

View file

@ -89,7 +89,9 @@ module Gitlab
ActiveSupport::Notifications.subscribe('sql.active_record') do |_, start, finish, _, data|
next unless same_thread?
track_query(data[:sql].strip, data[:binds], start, finish)
unless data.fetch(:cached, data[:name] == 'CACHE')
track_query(data[:sql].strip, data[:binds], start, finish)
end
end
end