summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2016-04-18 12:07:40 +0200
committerYorick Peterse <yorickpeterse@gmail.com>2016-04-18 14:53:13 +0200
commit7e6f0ac0e04c3fa05a8d952bf86463001dc48487 (patch)
tree4a14695630e1369ce4ca6affd638e5771c1cd95d /lib
parent06952aaf24633550f57fd54b70d27732509935c2 (diff)
downloadgitlab-ce-7e6f0ac0e04c3fa05a8d952bf86463001dc48487.tar.gz
Count the number of SQL queries per transaction
Fixes gitlab-org/gitlab-ce#15335
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/metrics/subscribers/active_record.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/gitlab/metrics/subscribers/active_record.rb b/lib/gitlab/metrics/subscribers/active_record.rb
index 8008b3bc895..96cad941d5c 100644
--- a/lib/gitlab/metrics/subscribers/active_record.rb
+++ b/lib/gitlab/metrics/subscribers/active_record.rb
@@ -9,6 +9,7 @@ module Gitlab
return unless current_transaction
current_transaction.increment(:sql_duration, event.duration)
+ current_transaction.increment(:sql_count, 1)
end
private