diff --git a/.gitlab/benchmarks.yml b/.gitlab/benchmarks.yml index fb0d18f3043..bd5bf1dbbea 100644 --- a/.gitlab/benchmarks.yml +++ b/.gitlab/benchmarks.yml @@ -104,16 +104,6 @@ only-profiling-heap: DD_PROFILING_EXPERIMENTAL_HEAP_ENABLED: "true" ADD_TO_GEMFILE: "gem 'datadog', github: 'datadog/dd-trace-rb', ref: '$CI_COMMIT_SHA'" -only-profiling-heap-clean-after-gc: - extends: .benchmarks - variables: - DD_BENCHMARKS_CONFIGURATION: only-profiling - DD_PROFILING_ENABLED: "true" - DD_PROFILING_ALLOCATION_ENABLED: "true" - DD_PROFILING_EXPERIMENTAL_HEAP_ENABLED: "true" - DD_PROFILING_HEAP_CLEAN_AFTER_GC_ENABLED: "true" - ADD_TO_GEMFILE: "gem 'datadog', github: 'datadog/dd-trace-rb', ref: '$CI_COMMIT_SHA'" - only-profiling-gvl: extends: .benchmarks variables: diff --git a/lib/datadog/core/configuration/settings.rb b/lib/datadog/core/configuration/settings.rb index f9e49c3d00b..eb0386b3004 100644 --- a/lib/datadog/core/configuration/settings.rb +++ b/lib/datadog/core/configuration/settings.rb @@ -518,13 +518,13 @@ def initialize(*_) # Controls if the heap profiler should attempt to clean young objects after GC, rather than just at # serialization time. This lowers memory usage and high percentile latency. # - # Only takes effect when used together with `gc_enabled: true` and `experimental_heap_enabled: true`. + # Only has effect when used together with `gc_enabled: true` and `experimental_heap_enabled: true`. # - # @default false + # @default true option :heap_clean_after_gc_enabled do |o| o.type :bool o.env 'DD_PROFILING_HEAP_CLEAN_AFTER_GC_ENABLED' - o.default false + o.default true end end diff --git a/spec/datadog/core/configuration/settings_spec.rb b/spec/datadog/core/configuration/settings_spec.rb index 1ad353dd737..8bc17004801 100644 --- a/spec/datadog/core/configuration/settings_spec.rb +++ b/spec/datadog/core/configuration/settings_spec.rb @@ -932,7 +932,7 @@ context 'is not defined' do let(:environment) { nil } - it { is_expected.to be false } + it { is_expected.to be true } end [true, false].each do |value| @@ -947,10 +947,10 @@ describe '#heap_clean_after_gc_enabled=' do it 'updates the #heap_clean_after_gc_enabled setting' do - expect { settings.profiling.advanced.heap_clean_after_gc_enabled = true } + expect { settings.profiling.advanced.heap_clean_after_gc_enabled = false } .to change { settings.profiling.advanced.heap_clean_after_gc_enabled } - .from(false) - .to(true) + .from(true) + .to(false) end end