From 18f801976d705711a00a206444e4f0a729f41479 Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Thu, 25 Jul 2024 18:10:47 -0400 Subject: [PATCH] use same pattern for profiler benchmark save paths (benchmarks subdir) --- benchmarks/profiler_allocation.rb | 4 ++-- benchmarks/profiler_gc.rb | 12 ++++++------ benchmarks/profiler_hold_resume_interruptions.rb | 2 +- benchmarks/profiler_http_transport.rb | 2 +- benchmarks/profiler_memory_sample_serialize.rb | 2 +- benchmarks/profiler_sample_loop_v2.rb | 2 +- benchmarks/profiler_sample_serialize.rb | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/benchmarks/profiler_allocation.rb b/benchmarks/profiler_allocation.rb index baa9c9f5584..b78d0a16776 100644 --- a/benchmarks/profiler_allocation.rb +++ b/benchmarks/profiler_allocation.rb @@ -30,7 +30,7 @@ def run_benchmark x.report('Allocations (baseline)', 'BasicObject.new') - x.save! 'profiler-allocation-results.json' unless VALIDATE_BENCHMARK_MODE + x.save! "#{__FILE__}-results.json" unless VALIDATE_BENCHMARK_MODE x.compare! end @@ -53,7 +53,7 @@ def run_benchmark x.report("Allocations (#{ENV['CONFIG']})", 'BasicObject.new') - x.save! 'profiler-allocation-results.json' unless VALIDATE_BENCHMARK_MODE + x.save! "#{__FILE__}-results.json" unless VALIDATE_BENCHMARK_MODE x.compare! end end diff --git a/benchmarks/profiler_gc.rb b/benchmarks/profiler_gc.rb index 9597be15d70..90f63461bf4 100644 --- a/benchmarks/profiler_gc.rb +++ b/benchmarks/profiler_gc.rb @@ -45,7 +45,7 @@ def run_benchmark Datadog::Profiling::Collectors::ThreadContext::Testing._native_sample_after_gc(@collector) end - x.save! 'profiler-gc-results.json' unless VALIDATE_BENCHMARK_MODE + x.save! "#{__FILE__}-results.json" unless VALIDATE_BENCHMARK_MODE x.compare! end @@ -72,7 +72,7 @@ def run_benchmark @recorder.serialize end - x.save! 'profiler-gc-minute-results.json' unless VALIDATE_BENCHMARK_MODE + x.save! "#{__FILE__}-results.json" unless VALIDATE_BENCHMARK_MODE x.compare! end @@ -85,7 +85,7 @@ def run_benchmark x.report('Major GC runs (profiling disabled)', 'GC.start') - x.save! 'profiler-gc-integration-results.json' unless VALIDATE_BENCHMARK_MODE + x.save! "#{__FILE__}-results.json" unless VALIDATE_BENCHMARK_MODE x.compare! end @@ -105,7 +105,7 @@ def run_benchmark x.report('Major GC runs (profiling enabled)', 'GC.start') - x.save! 'profiler-gc-integration-results.json' unless VALIDATE_BENCHMARK_MODE + x.save! "#{__FILE__}-results.json" unless VALIDATE_BENCHMARK_MODE x.compare! end @@ -120,7 +120,7 @@ def run_benchmark x.report('Allocations (profiling disabled)', 'Object.new') - x.save! 'profiler-gc-integration-allocations-results.json' unless VALIDATE_BENCHMARK_MODE + x.save! "#{__FILE__}-results.json" unless VALIDATE_BENCHMARK_MODE x.compare! end @@ -140,7 +140,7 @@ def run_benchmark x.report('Allocations (profiling enabled)', 'Object.new') - x.save! 'profiler-gc-integration-allocations-results.json' unless VALIDATE_BENCHMARK_MODE + x.save! "#{__FILE__}-results.json" unless VALIDATE_BENCHMARK_MODE x.compare! end diff --git a/benchmarks/profiler_hold_resume_interruptions.rb b/benchmarks/profiler_hold_resume_interruptions.rb index 02f22dfca06..54b44e3123d 100644 --- a/benchmarks/profiler_hold_resume_interruptions.rb +++ b/benchmarks/profiler_hold_resume_interruptions.rb @@ -30,7 +30,7 @@ def run_benchmark Datadog::Profiling::Collectors::CpuAndWallTimeWorker._native_resume_signals end - x.save! 'profiler_hold_resume_interruptions-results.json' unless VALIDATE_BENCHMARK_MODE + x.save! "#{__FILE__}-results.json" unless VALIDATE_BENCHMARK_MODE x.compare! end end diff --git a/benchmarks/profiler_http_transport.rb b/benchmarks/profiler_http_transport.rb index 871ec568c5c..cb52ece2a3b 100644 --- a/benchmarks/profiler_http_transport.rb +++ b/benchmarks/profiler_http_transport.rb @@ -88,7 +88,7 @@ def run_benchmark run_once end - x.save! 'profiler-http-transport-results.json' unless VALIDATE_BENCHMARK_MODE + x.save! "#{__FILE__}-results.json" unless VALIDATE_BENCHMARK_MODE x.compare! end end diff --git a/benchmarks/profiler_memory_sample_serialize.rb b/benchmarks/profiler_memory_sample_serialize.rb index 29191c4075d..ace917fd674 100644 --- a/benchmarks/profiler_memory_sample_serialize.rb +++ b/benchmarks/profiler_memory_sample_serialize.rb @@ -85,7 +85,7 @@ def run_benchmark recorder.serialize end - x.save! 'profiler_memory_sample_serialize-results.json' unless VALIDATE_BENCHMARK_MODE + x.save! "#{__FILE__}-results.json" unless VALIDATE_BENCHMARK_MODE x.compare! end end diff --git a/benchmarks/profiler_sample_loop_v2.rb b/benchmarks/profiler_sample_loop_v2.rb index a61120c964c..bd3ba91bd8f 100644 --- a/benchmarks/profiler_sample_loop_v2.rb +++ b/benchmarks/profiler_sample_loop_v2.rb @@ -53,7 +53,7 @@ def run_benchmark Datadog::Profiling::Collectors::ThreadContext::Testing._native_sample(@collector, PROFILER_OVERHEAD_STACK_THREAD) end - x.save! 'profiler-sample-loop-v2-results.json' unless VALIDATE_BENCHMARK_MODE + x.save! "#{__FILE__}-results.json" unless VALIDATE_BENCHMARK_MODE x.compare! end diff --git a/benchmarks/profiler_sample_serialize.rb b/benchmarks/profiler_sample_serialize.rb index 341546f3d32..9c6eb1d571f 100644 --- a/benchmarks/profiler_sample_serialize.rb +++ b/benchmarks/profiler_sample_serialize.rb @@ -55,7 +55,7 @@ def run_benchmark nil end - x.save! 'profiler_sample_serialize-results.json' unless VALIDATE_BENCHMARK_MODE + x.save! "#{__FILE__}-results.json" unless VALIDATE_BENCHMARK_MODE x.compare! end