Skip to content

Commit

Permalink
Merge pull request #3833 from DataDog/ivoanjo/dont-put-results-in-ben…
Browse files Browse the repository at this point in the history
…chmark-folder

[NO-TICKET] Don't put results in benchmarking folder directly
  • Loading branch information
ivoanjo authored Aug 12, 2024
2 parents 92b624d + 5a52a42 commit cd3288d
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion benchmarks/library_gem_loading.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def benchmark_gem_loading
raise unless status.success?
end
x.save! "#{__FILE__}-results.json" unless VALIDATE_BENCHMARK_MODE
x.save! "#{File.basename(__FILE__)}-results.json" unless VALIDATE_BENCHMARK_MODE
x.compare!
end
RUBY
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/profiler_allocation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def run_benchmark

x.report('Allocations (baseline)', 'BasicObject.new')

x.save! "#{__FILE__}-results.json" unless VALIDATE_BENCHMARK_MODE
x.save! "#{File.basename(__FILE__)}-results.json" unless VALIDATE_BENCHMARK_MODE
x.compare!
end

Expand All @@ -48,7 +48,7 @@ def run_benchmark

x.report("Allocations (#{ENV['CONFIG']})", 'BasicObject.new')

x.save! "#{__FILE__}-results.json" unless VALIDATE_BENCHMARK_MODE
x.save! "#{File.basename(__FILE__)}-results.json" unless VALIDATE_BENCHMARK_MODE
x.compare!
end
end
Expand Down
12 changes: 6 additions & 6 deletions benchmarks/profiler_gc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def run_benchmark
Datadog::Profiling::Collectors::ThreadContext::Testing._native_sample_after_gc(@collector)
end

x.save! "#{__FILE__}-results.json" unless VALIDATE_BENCHMARK_MODE
x.save! "#{File.basename(__FILE__)}-results.json" unless VALIDATE_BENCHMARK_MODE
x.compare!
end

Expand All @@ -67,7 +67,7 @@ def run_benchmark
@recorder.serialize
end

x.save! "#{__FILE__}-results.json" unless VALIDATE_BENCHMARK_MODE
x.save! "#{File.basename(__FILE__)}-results.json" unless VALIDATE_BENCHMARK_MODE
x.compare!
end

Expand All @@ -79,7 +79,7 @@ def run_benchmark

x.report('Major GC runs (profiling disabled)', 'GC.start')

x.save! "#{__FILE__}-results.json" unless VALIDATE_BENCHMARK_MODE
x.save! "#{File.basename(__FILE__)}-results.json" unless VALIDATE_BENCHMARK_MODE
x.compare!
end

Expand All @@ -98,7 +98,7 @@ def run_benchmark

x.report('Major GC runs (profiling enabled)', 'GC.start')

x.save! "#{__FILE__}-results.json" unless VALIDATE_BENCHMARK_MODE
x.save! "#{File.basename(__FILE__)}-results.json" unless VALIDATE_BENCHMARK_MODE
x.compare!
end

Expand All @@ -112,7 +112,7 @@ def run_benchmark

x.report('Allocations (profiling disabled)', 'Object.new')

x.save! "#{__FILE__}-results.json" unless VALIDATE_BENCHMARK_MODE
x.save! "#{File.basename(__FILE__)}-results.json" unless VALIDATE_BENCHMARK_MODE
x.compare!
end

Expand All @@ -131,7 +131,7 @@ def run_benchmark

x.report('Allocations (profiling enabled)', 'Object.new')

x.save! "#{__FILE__}-results.json" unless VALIDATE_BENCHMARK_MODE
x.save! "#{File.basename(__FILE__)}-results.json" unless VALIDATE_BENCHMARK_MODE
x.compare!
end

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/profiler_hold_resume_interruptions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def run_benchmark
Datadog::Profiling::Collectors::CpuAndWallTimeWorker._native_resume_signals
end

x.save! "#{__FILE__}-results.json" unless VALIDATE_BENCHMARK_MODE
x.save! "#{File.basename(__FILE__)}-results.json" unless VALIDATE_BENCHMARK_MODE
x.compare!
end
end
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/profiler_http_transport.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def run_benchmark
run_once
end

x.save! "#{__FILE__}-results.json" unless VALIDATE_BENCHMARK_MODE
x.save! "#{File.basename(__FILE__)}-results.json" unless VALIDATE_BENCHMARK_MODE
x.compare!
end
end
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/profiler_memory_sample_serialize.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def run_benchmark
recorder.serialize
end

x.save! "#{__FILE__}-results.json" unless VALIDATE_BENCHMARK_MODE
x.save! "#{File.basename(__FILE__)}-results.json" unless VALIDATE_BENCHMARK_MODE
x.compare!
end
end
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/profiler_sample_loop_v2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def run_benchmark
Datadog::Profiling::Collectors::ThreadContext::Testing._native_sample(@collector, PROFILER_OVERHEAD_STACK_THREAD)
end

x.save! "#{__FILE__}-results.json" unless VALIDATE_BENCHMARK_MODE
x.save! "#{File.basename(__FILE__)}-results.json" unless VALIDATE_BENCHMARK_MODE
x.compare!
end

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/profiler_sample_serialize.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def run_benchmark
nil
end

x.save! "#{__FILE__}-results.json" unless VALIDATE_BENCHMARK_MODE
x.save! "#{File.basename(__FILE__)}-results.json" unless VALIDATE_BENCHMARK_MODE
x.compare!
end

Expand Down
14 changes: 7 additions & 7 deletions benchmarks/tracing_trace.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def trace(x, depth)
trace(x, 10)
trace(x, 100)

x.save! "#{__FILE__}-results.json" unless VALIDATE_BENCHMARK_MODE
x.save! "#{File.basename(__FILE__)}-results.json" unless VALIDATE_BENCHMARK_MODE
x.compare!
end
end
Expand Down Expand Up @@ -73,7 +73,7 @@ def trace(x, depth)
trace(x, 10)
trace(x, 100)

x.save! "#{__FILE__}-results.json" unless VALIDATE_BENCHMARK_MODE
x.save! "#{File.basename(__FILE__)}-results.json" unless VALIDATE_BENCHMARK_MODE
x.compare!
end
end
Expand All @@ -87,7 +87,7 @@ def benchmark_to_digest
trace.to_digest
end

x.save! "#{__FILE__}-results.json" unless VALIDATE_BENCHMARK_MODE
x.save! "#{File.basename(__FILE__)}-results.json" unless VALIDATE_BENCHMARK_MODE
x.compare!
end
end
Expand All @@ -102,7 +102,7 @@ def benchmark_log_correlation
Datadog::Tracing.log_correlation
end

x.save! "#{__FILE__}-results.json" unless VALIDATE_BENCHMARK_MODE
x.save! "#{File.basename(__FILE__)}-results.json" unless VALIDATE_BENCHMARK_MODE
x.compare!
end
end
Expand All @@ -118,7 +118,7 @@ def benchmark_to_digest_continue
Datadog::Tracing.continue_trace!(digest)
end

x.save! "#{__FILE__}-results.json" unless VALIDATE_BENCHMARK_MODE
x.save! "#{File.basename(__FILE__)}-results.json" unless VALIDATE_BENCHMARK_MODE
x.compare!
end
end
Expand Down Expand Up @@ -147,7 +147,7 @@ def benchmark_propagation_datadog
raise unless extracted_trace_digest
end

x.save! "#{__FILE__}-results.json" unless VALIDATE_BENCHMARK_MODE
x.save! "#{File.basename(__FILE__)}-results.json" unless VALIDATE_BENCHMARK_MODE
x.compare!
end
end
Expand All @@ -170,7 +170,7 @@ def benchmark_propagation_trace_context
raise unless extracted_trace_digest
end

x.save! "#{__FILE__}-results.json" unless VALIDATE_BENCHMARK_MODE
x.save! "#{File.basename(__FILE__)}-results.json" unless VALIDATE_BENCHMARK_MODE
x.compare!
end
end
Expand Down

0 comments on commit cd3288d

Please sign in to comment.