From ec699ebc3c366acf1459c826817b88717fc8b3a3 Mon Sep 17 00:00:00 2001 From: Ivo Anjo Date: Thu, 13 Feb 2025 10:25:34 +0000 Subject: [PATCH] [PROF-9476] Revert "Temporary disable benchmark to make CI happy" **What does this PR do?** This reverts commit 569bf568b80e9615027a8d0c41a8a941deeb9981. **Motivation:** We temporarily disabled this benchmark in https://github.com/DataDog/dd-trace-rb/pull/4331 for the reasons explained in the comment. Once that PR is in master we can re-enable the benchmark. **Additional Notes:** This sharp edge of our benchmarks setup is annoying, but I'll fight it another day... **How to test the change?** Validate this benchmark is now running in the benchmarking platform results page. --- benchmarks/profiler_string_storage_intern.rb | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/benchmarks/profiler_string_storage_intern.rb b/benchmarks/profiler_string_storage_intern.rb index 547d080e85b..39d6341939b 100644 --- a/benchmarks/profiler_string_storage_intern.rb +++ b/benchmarks/profiler_string_storage_intern.rb @@ -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) @@ -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 @@ -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