diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2015-12-17 17:17:18 +0100 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2015-12-17 17:25:48 +0100 |
commit | f181f05e8abd7b1066c11578193f6d7170764bf5 (patch) | |
tree | a1b2e5af8db3cfcff7b724b214887e2e6d7952bf /lib/gitlab/metrics.rb | |
parent | bcee44ad33d8a84822a8df068d47812594c445a3 (diff) | |
download | gitlab-ce-f181f05e8abd7b1066c11578193f6d7170764bf5.tar.gz |
Track object counts using the "allocations" Gem
This allows us to track the counts of actual classes instead of "T_XXX"
nodes. This is only enabled on CRuby as it uses CRuby specific APIs.
Diffstat (limited to 'lib/gitlab/metrics.rb')
-rw-r--r-- | lib/gitlab/metrics.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/metrics.rb b/lib/gitlab/metrics.rb index 4b92c3244fa..ce89be636d3 100644 --- a/lib/gitlab/metrics.rb +++ b/lib/gitlab/metrics.rb @@ -16,6 +16,10 @@ module Gitlab !!Settings.metrics['enabled'] end + def self.mri? + RUBY_ENGINE == 'ruby' + end + def self.method_call_threshold Settings.metrics['method_call_threshold'] || 10 end |