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 /spec/lib/gitlab/metrics | |
parent | 06952aaf24633550f57fd54b70d27732509935c2 (diff) |
Count the number of SQL queries per transaction
Fixes gitlab-org/gitlab-ce#15335
Diffstat (limited to 'spec/lib/gitlab/metrics')
-rw-r--r-- | spec/lib/gitlab/metrics/subscribers/active_record_spec.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/spec/lib/gitlab/metrics/subscribers/active_record_spec.rb b/spec/lib/gitlab/metrics/subscribers/active_record_spec.rb index 7bc070a4d09..e3293a01207 100644 --- a/spec/lib/gitlab/metrics/subscribers/active_record_spec.rb +++ b/spec/lib/gitlab/metrics/subscribers/active_record_spec.rb @@ -28,6 +28,9 @@ describe Gitlab::Metrics::Subscribers::ActiveRecord do expect(transaction).to receive(:increment). with(:sql_duration, 0.2) + expect(transaction).to receive(:increment). + with(:sql_count, 1) + subscriber.sql(event) end end |