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-9476] Revert "Temporary disable benchmark to make CI happy" #4376

Merged
merged 2 commits into from
Feb 18, 2025
Merged
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
11 changes: 3 additions & 8 deletions benchmarks/profiler_string_storage_intern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@

# This benchmark measures the performance of string storage-related APIs

# Temporary hack to make CI happy. Our CI tries to compare benchmarks between master and branches, and if benchmarks
# are not backwards-compatible between them (e.g. a new API was added...) it breaks. As a workaround, I'm disabling this
# benchmark so we can merge it to master, and then I'll follow up with a micro-PR to re-enable it.
TEMPORARY_DISABLE_BENCHMARK = true

class ProfilerStringStorageIntern
def initialize
@recorder = Datadog::Profiling::StackRecorder.for_testing(heap_samples_enabled: true)
Expand All @@ -24,7 +19,7 @@ def run_benchmark
**benchmark_time,
)
x.report('intern_all 1000 repeated strings') do
Datadog::Profiling::StackRecorder::Testing._native_benchmark_intern(@recorder, "hello, world!", 1000, true) unless TEMPORARY_DISABLE_BENCHMARK
Datadog::Profiling::StackRecorder::Testing._native_benchmark_intern(@recorder, "hello, world!", 1000, true)
end

x.save! "#{File.basename(__FILE__)}-1-results.json" unless VALIDATE_BENCHMARK_MODE
Expand All @@ -45,11 +40,11 @@ def run_benchmark
new_strings = strings_to_intern - existing_strings

new_strings.times do |i|
Datadog::Profiling::StackRecorder::Testing._native_benchmark_intern(recorder, ("%010d" % i), 1, false) unless TEMPORARY_DISABLE_BENCHMARK
Datadog::Profiling::StackRecorder::Testing._native_benchmark_intern(recorder, ("%010d" % i), 1, false)
end

existing_strings.times do |i|
Datadog::Profiling::StackRecorder::Testing._native_benchmark_intern(recorder, "hello, world!", 1, false) unless TEMPORARY_DISABLE_BENCHMARK
Datadog::Profiling::StackRecorder::Testing._native_benchmark_intern(recorder, "hello, world!", 1, false)
end
end

Expand Down
Loading