Skip to content

Commit

Permalink
remove benchmark run_forever
Browse files Browse the repository at this point in the history
  • Loading branch information
p committed Aug 6, 2024
1 parent 8a72d91 commit 1b93ea5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 58 deletions.
13 changes: 1 addition & 12 deletions benchmarks/profiler_http_transport.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,6 @@ def run_benchmark
end
end

def run_forever
while true
100.times { run_once }
print '.'
end
end

def run_once
success = @transport.export(@flush)

Expand All @@ -108,9 +101,5 @@ def run_once
puts "Current pid is #{Process.pid}"

ProfilerHttpTransportBenchmark.new.instance_exec do
if ARGV.include?('--forever')
run_forever
else
run_benchmark
end
run_benchmark
end
17 changes: 1 addition & 16 deletions benchmarks/profiler_memory_sample_serialize.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,26 +87,11 @@ def run_benchmark
x.compare!
end
end

def run_forever
loop do
recorder = @recorder_factory.call
1000.times do |i|
sample_object(recorder, i % 400)
end
recorder.serialize
print '.'
end
end
end

puts "Current pid is #{Process.pid}"

ProfilerMemorySampleSerializeBenchmark.new.instance_exec do
setup
if ARGV.include?('--forever')
run_forever
else
run_benchmark
end
run_benchmark
end
16 changes: 1 addition & 15 deletions benchmarks/profiler_sample_loop_v2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,26 +57,12 @@ def run_benchmark

@recorder.serialize
end

def run_forever
while true
1000.times do
Datadog::Profiling::Collectors::ThreadContext::Testing._native_sample(@collector, PROFILER_OVERHEAD_STACK_THREAD)
end
@recorder.serialize
print '.'
end
end
end

puts "Current pid is #{Process.pid}"

ProfilerSampleLoopBenchmark.new.instance_exec do
create_profiler
4.times { thread_with_very_deep_stack }
if ARGV.include?('--forever')
run_forever
else
run_benchmark
end
run_benchmark
end
16 changes: 1 addition & 15 deletions benchmarks/profiler_sample_serialize.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,26 +59,12 @@ def run_benchmark

@recorder.serialize
end

def run_forever
while true
1000.times do
Datadog::Profiling::Collectors::ThreadContext::Testing._native_sample(@collector, PROFILER_OVERHEAD_STACK_THREAD)
end
@recorder.serialize
print '.'
end
end
end

puts "Current pid is #{Process.pid}"

ProfilerSampleSerializeBenchmark.new.instance_exec do
create_profiler
10.times { Thread.new { sleep } }
if ARGV.include?('--forever')
run_forever
else
run_benchmark
end
run_benchmark
end

0 comments on commit 1b93ea5

Please sign in to comment.