-
- Downloads
Call `GC::Profiler.clear` only in one place
Previously, both InfluxSampler and RubySampler were relying on the `GC::Profiler.total_time` data which is the sum over the list of captured GC events. Also, both samplers asynchronously called `GC::Profiler.clear` which led to incorrect metric data because each sampler has the wrong assumption it is the only object who calls `GC::Profiler.clear` and thus could rely on the gathered results between such calls. We should ensure that `GC::Profiler.total_time` is called only in one place making it possible to rely on accumulated data between such wipes. Also, we need to track the amount of profiler reports we lost.
Showing
- changelogs/unreleased/63571-fix-gc-profiler-data-being-wiped.yml 5 additions, 0 deletions...ogs/unreleased/63571-fix-gc-profiler-data-being-wiped.yml
- config/initializers/peek.rb 6 additions, 1 deletionconfig/initializers/peek.rb
- lib/gitlab/metrics/samplers/influx_sampler.rb 0 additions, 22 deletionslib/gitlab/metrics/samplers/influx_sampler.rb
- lib/gitlab/metrics/samplers/ruby_sampler.rb 17 additions, 6 deletionslib/gitlab/metrics/samplers/ruby_sampler.rb
- spec/lib/gitlab/metrics/samplers/influx_sampler_spec.rb 0 additions, 20 deletionsspec/lib/gitlab/metrics/samplers/influx_sampler_spec.rb
- spec/lib/gitlab/metrics/samplers/ruby_sampler_spec.rb 16 additions, 4 deletionsspec/lib/gitlab/metrics/samplers/ruby_sampler_spec.rb
Please register or sign in to comment