Skip to content

Commit

Permalink
[PROF-8669] Benchmarks for heap profiling
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexJF committed Feb 23, 2024
1 parent 5ce2b7b commit 74f8097
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
19 changes: 19 additions & 0 deletions .gitlab/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,25 @@ only-profiling-alloc:
DD_PROFILING_NO_SIGNALS_WORKAROUND_ENABLED: "false"
DD_PROFILING_EXPERIMENTAL_ALLOCATION_ENABLED: "true"

only-profiling-heap:
extends: .benchmarks
variables:
DD_BENCHMARKS_CONFIGURATION: only-profiling
DD_PROFILING_ENABLED: "true"
DD_PROFILING_NO_SIGNALS_WORKAROUND_ENABLED: "false"
DD_PROFILING_EXPERIMENTAL_ALLOCATION_ENABLED: "true"
DD_PROFILING_EXPERIMENTAL_HEAP_ENABLED: "true"

only-profiling-heap-size:
extends: .benchmarks
variables:
DD_BENCHMARKS_CONFIGURATION: only-profiling
DD_PROFILING_ENABLED: "true"
DD_PROFILING_NO_SIGNALS_WORKAROUND_ENABLED: "false"
DD_PROFILING_EXPERIMENTAL_ALLOCATION_ENABLED: "true"
DD_PROFILING_EXPERIMENTAL_HEAP_ENABLED: "true"
DD_PROFILING_EXPERIMENTAL_HEAP_SIZE_ENABLED: "true"

profiling-and-tracing:
extends: .benchmarks
variables:
Expand Down
8 changes: 5 additions & 3 deletions benchmarks/profiler_memory_sample_serialize.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,13 @@ def sample_object(recorder, depth = 0)

class ProfilerMemorySampleSerializeBenchmark
def create_profiler
@heap_samples_enabled = ENV['HEAP_SAMPLES'] == 'true'
@heap_size_enabled = ENV['HEAP_SIZE'] == 'true'
@recorder = Datadog::Profiling::StackRecorder.new(
cpu_time_enabled: false,
alloc_samples_enabled: true,
heap_samples_enabled: false,
heap_size_enabled: false,
heap_samples_enabled: @heap_samples_enabled,
heap_size_enabled: @heap_size_enabled,
heap_sample_every: 1,
timeline_enabled: false,
)
Expand All @@ -60,7 +62,7 @@ def run_benchmark
suite: report_to_dogstatsd_if_enabled_via_environment_variable(benchmark_name: 'profiler_memory_sample_serialize')
)

x.report("sample+serialize #{ENV['CONFIG']}") do
x.report("sample+serialize #{ENV['CONFIG']} heap_samples=#{@heap_samples_enabled} heap_size=#{@heap_size_enabled}") do
samples_per_second = 100
simulate_seconds = 60

Expand Down

0 comments on commit 74f8097

Please sign in to comment.