diff options
author | Stan Hu <stanhu@gmail.com> | 2017-12-11 06:53:56 -0800 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2017-12-11 06:55:59 -0800 |
commit | 10f5446c336653004b7851af7c67a3ec010ade05 (patch) | |
tree | c0383a92d565e40845e9c123d21513070071ff3c /spec/lib/gitlab/metrics | |
parent | e1a8e5a509fc11c1373367f7399da6c12b51db39 (diff) | |
download | gitlab-ce-10f5446c336653004b7851af7c67a3ec010ade05.tar.gz |
Remove RubySampler#sample_objects for performance as well
Diffstat (limited to 'spec/lib/gitlab/metrics')
-rw-r--r-- | spec/lib/gitlab/metrics/samplers/ruby_sampler_spec.rb | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/spec/lib/gitlab/metrics/samplers/ruby_sampler_spec.rb b/spec/lib/gitlab/metrics/samplers/ruby_sampler_spec.rb index 53699327da1..375cbf8a9ca 100644 --- a/spec/lib/gitlab/metrics/samplers/ruby_sampler_spec.rb +++ b/spec/lib/gitlab/metrics/samplers/ruby_sampler_spec.rb @@ -11,7 +11,6 @@ describe Gitlab::Metrics::Samplers::RubySampler do it 'samples various statistics' do expect(Gitlab::Metrics::System).to receive(:memory_usage) expect(Gitlab::Metrics::System).to receive(:file_descriptor_count) - expect(sampler).to receive(:sample_objects) expect(sampler).to receive(:sample_gc) sampler.sample @@ -65,26 +64,4 @@ describe Gitlab::Metrics::Samplers::RubySampler do sampler.sample end end - - if Gitlab::Metrics.mri? - describe '#sample_objects' do - it 'adds a metric containing the amount of allocated objects' do - expect(sampler.metrics[:objects_total]).to receive(:set) - .with(include(class: anything), be > 0) - .at_least(:once) - .and_call_original - - sampler.sample - end - - it 'ignores classes without a name' do - expect(Allocations).to receive(:to_hash).and_return({ Class.new => 4 }) - - expect(sampler.metrics[:objects_total]).not_to receive(:set) - .with(include(class: 'object_counts'), anything) - - sampler.sample - end - end - end end |