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

[NO-TICKET] Don't put results in benchmarking folder directly #3833

Merged
merged 1 commit into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion benchmarks/library_gem_loading.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,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 @@ -28,7 +28,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 @@ -50,7 +50,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 @@ -43,7 +43,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 @@ -69,7 +69,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 @@ -81,7 +81,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 @@ -100,7 +100,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 @@ -114,7 +114,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 @@ -133,7 +133,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 @@ -28,7 +28,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 @@ -86,7 +86,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 @@ -83,7 +83,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 @@ -51,7 +51,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 @@ -53,7 +53,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 @@ -46,7 +46,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 @@ -74,7 +74,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 @@ -88,7 +88,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 @@ -103,7 +103,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 @@ -119,7 +119,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 @@ -148,7 +148,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 @@ -171,7 +171,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
Loading