Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2015-12-17 19:17:18 +0300
committerYorick Peterse <yorickpeterse@gmail.com>2015-12-17 19:25:48 +0300
commitf181f05e8abd7b1066c11578193f6d7170764bf5 (patch)
treea1b2e5af8db3cfcff7b724b214887e2e6d7952bf /spec/lib/gitlab/metrics/sampler_spec.rb
parentbcee44ad33d8a84822a8df068d47812594c445a3 (diff)
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 'spec/lib/gitlab/metrics/sampler_spec.rb')
-rw-r--r--spec/lib/gitlab/metrics/sampler_spec.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/lib/gitlab/metrics/sampler_spec.rb b/spec/lib/gitlab/metrics/sampler_spec.rb
index 319f287178d..69376c0b79b 100644
--- a/spec/lib/gitlab/metrics/sampler_spec.rb
+++ b/spec/lib/gitlab/metrics/sampler_spec.rb
@@ -3,6 +3,10 @@ require 'spec_helper'
describe Gitlab::Metrics::Sampler do
let(:sampler) { described_class.new(5) }
+ after do
+ Allocations.stop if Gitlab::Metrics.mri?
+ end
+
describe '#start' do
it 'gathers a sample at a given interval' do
expect(sampler).to receive(:sleep).with(5)