diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2016-04-18 13:07:40 +0300 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2016-04-18 15:53:13 +0300 |
commit | 7e6f0ac0e04c3fa05a8d952bf86463001dc48487 (patch) | |
tree | 4a14695630e1369ce4ca6affd638e5771c1cd95d /lib/gitlab/metrics/subscribers/active_record.rb | |
parent | 06952aaf24633550f57fd54b70d27732509935c2 (diff) |
Count the number of SQL queries per transaction
Fixes gitlab-org/gitlab-ce#15335
Diffstat (limited to 'lib/gitlab/metrics/subscribers/active_record.rb')
-rw-r--r-- | lib/gitlab/metrics/subscribers/active_record.rb | 1 |
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 |