diff options
author | Ben Kochie <superq@gmail.com> | 2018-06-20 16:42:38 +0200 |
---|---|---|
committer | Ben Kochie <superq@gmail.com> | 2018-06-22 14:12:22 +0200 |
commit | 78a9991543cdcc0cbd7ecfaab979c8e2c98b7a75 (patch) | |
tree | a5569e5bbd6e3cde86ce701ad88b530e6e77388d /spec | |
parent | 348ad22d7a02277dc84c99072b7833ef9ff99c5b (diff) | |
download | gitlab-ce-78a9991543cdcc0cbd7ecfaab979c8e2c98b7a75.tar.gz |
Cleanup ruby sampler metricsbjk/48176_ruby_gc
* Use a simple counter for sampler duration instead of a histogram.
* Use a counter to collect GC time.
* Remove unused objects metric.
* Cleanup metric names to match Prometheus conventions.
* Prefix generic GC stats with `gc_stat`.
* Include worker label on memory and file descriptor metrics.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/metrics/samplers/ruby_sampler_spec.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/lib/gitlab/metrics/samplers/ruby_sampler_spec.rb b/spec/lib/gitlab/metrics/samplers/ruby_sampler_spec.rb index 091645ee86f..7972ff253fe 100644 --- a/spec/lib/gitlab/metrics/samplers/ruby_sampler_spec.rb +++ b/spec/lib/gitlab/metrics/samplers/ruby_sampler_spec.rb @@ -45,7 +45,7 @@ describe Gitlab::Metrics::Samplers::RubySampler do it 'adds a metric containing garbage collection time statistics' do expect(GC::Profiler).to receive(:total_time).and_return(0.24) - expect(sampler.metrics[:total_time]).to receive(:set).with({}, 240) + expect(sampler.metrics[:total_time]).to receive(:increment).with({}, 0.24) sampler.sample end |