Skip to content

Commit

Permalink
di bench
Browse files Browse the repository at this point in the history
  • Loading branch information
p committed Jul 12, 2024
1 parent f263a4f commit 17e932b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions benchmarks/di_instrument_method.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def run_benchmark
benchmark_time = VALIDATE_BENCHMARK_MODE ? { time: 0.01, warmup: 0 } : { time: 10, warmup: 2 }
x.config(
**benchmark_time,
suite: report_to_dogstatsd_if_enabled_via_environment_variable(benchmark_name: 'profiler_gc')
suite: report_to_dogstatsd_if_enabled_via_environment_variable(benchmark_name: 'di_instrument_method')
)

# The idea of this benchmark is to test the overall cost of the Ruby VM calling these methods on every GC.
Expand All @@ -57,7 +57,7 @@ def run_benchmark
benchmark_time = VALIDATE_BENCHMARK_MODE ? { time: 0.01, warmup: 0 } : { time: 10, warmup: 2 }
x.config(
**benchmark_time,
suite: report_to_dogstatsd_if_enabled_via_environment_variable(benchmark_name: 'profiler_gc')
suite: report_to_dogstatsd_if_enabled_via_environment_variable(benchmark_name: 'di_instrument_method')
)

x.report('method instrumentation') do
Expand Down Expand Up @@ -86,7 +86,7 @@ def run_benchmark
benchmark_time = VALIDATE_BENCHMARK_MODE ? { time: 0.01, warmup: 0 } : { time: 10, warmup: 2 }
x.config(
**benchmark_time,
suite: report_to_dogstatsd_if_enabled_via_environment_variable(benchmark_name: 'profiler_gc')
suite: report_to_dogstatsd_if_enabled_via_environment_variable(benchmark_name: 'di_instrument_method')
)

x.report('line instrumentation') do
Expand Down Expand Up @@ -127,7 +127,7 @@ def run_benchmark
benchmark_time = VALIDATE_BENCHMARK_MODE ? { time: 0.01, warmup: 0 } : { time: 10, warmup: 2 }
x.config(
**benchmark_time,
suite: report_to_dogstatsd_if_enabled_via_environment_variable(benchmark_name: 'profiler_gc')
suite: report_to_dogstatsd_if_enabled_via_environment_variable(benchmark_name: 'di_instrument_method')
)

x.report('line instrumentation - targeted') do
Expand Down Expand Up @@ -156,7 +156,7 @@ def run_benchmark
benchmark_time = VALIDATE_BENCHMARK_MODE ? { time: 0.01, warmup: 0 } : { time: 10, warmup: 2 }
x.config(
**benchmark_time,
suite: report_to_dogstatsd_if_enabled_via_environment_variable(benchmark_name: 'profiler_gc')
suite: report_to_dogstatsd_if_enabled_via_environment_variable(benchmark_name: 'di_instrument_method')
)

# This benchmark should produce identical results to the
Expand All @@ -177,7 +177,7 @@ def run_benchmark
benchmark_time = VALIDATE_BENCHMARK_MODE ? { time: 0.01, warmup: 0 } : { time: 10, warmup: 2 }
x.config(
**benchmark_time,
suite: report_to_dogstatsd_if_enabled_via_environment_variable(benchmark_name: 'profiler_gc')
suite: report_to_dogstatsd_if_enabled_via_environment_variable(benchmark_name: 'di_instrument_method')
)

# This benchmark should produce identical results to the
Expand Down

0 comments on commit 17e932b

Please sign in to comment.