Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PROF-9470] Enable "heap clean after GC" profiler optimization by default #4085

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .gitlab/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions lib/datadog/core/configuration/settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions spec/datadog/core/configuration/settings_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand All @@ -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

Expand Down
Loading