diff options
author | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-09-06 04:02:08 +0300 |
---|---|---|
committer | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-11-02 20:11:43 +0300 |
commit | 6db3151fa164d65d6176896301166c9883df1fe4 (patch) | |
tree | a39d5015455eba63c8613e87db102eb2ac901392 /lib/gitlab/metrics/subscribers/active_record.rb | |
parent | c97dc61a9e3e203bc7a3315dd6828eda320b4323 (diff) |
Introduce missing Action concept
Diffstat (limited to 'lib/gitlab/metrics/subscribers/active_record.rb')
-rw-r--r-- | lib/gitlab/metrics/subscribers/active_record.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/metrics/subscribers/active_record.rb b/lib/gitlab/metrics/subscribers/active_record.rb index 15892c88e86..411f49456a6 100644 --- a/lib/gitlab/metrics/subscribers/active_record.rb +++ b/lib/gitlab/metrics/subscribers/active_record.rb @@ -8,14 +8,14 @@ module Gitlab def self.metric_sql_duration_seconds @metric_sql_duration_seconds ||= Gitlab::Metrics.histogram( :gitlab_sql_duration_seconds, - 'SQL duration seconds', + 'SQL time', {}, [0.001, 0.002, 0.005, 0.01, 0.02, 0.05, 0.1, 0.500, 2.0, 10.0] ) end def sql(event) - self.class.metric_sql_duration_secodnds.observe({}, event.duration/1000.0) + self.class.metric_sql_duration_secodnds.observe({}, event.duration / 1000.0) return unless current_transaction current_transaction.increment(:sql_duration, event.duration, false) |