diff --git a/benchmarks/README.md b/benchmarks/README.md index 882d3b00e48..e28a067886a 100644 --- a/benchmarks/README.md +++ b/benchmarks/README.md @@ -7,6 +7,7 @@ - `library_` - `profiling_` - `tracing_` + - `di_` 2. Add the new file to `run_all.sh` in this directory. @@ -16,6 +17,7 @@ - `library_` prefix: `spec/validate_benchmarks_spec.rb` - `profiling_` prefix: `./spec/datadog/profiling/validate_benchmarks_spec.rb` - `tracing_` prefix: `./spec/datadog/tracing/validate_benchmarks_spec.rb` + - `di_` prefix: `./spec/datadog/di/validate_benchmarks_spec.rb` ## Adding Benchmarks For a New Product diff --git a/benchmarks/profiler_allocation.rb b/benchmarks/profiling_allocation.rb similarity index 100% rename from benchmarks/profiler_allocation.rb rename to benchmarks/profiling_allocation.rb diff --git a/benchmarks/profiler_gc.rb b/benchmarks/profiling_gc.rb similarity index 100% rename from benchmarks/profiler_gc.rb rename to benchmarks/profiling_gc.rb diff --git a/benchmarks/profiler_hold_resume_interruptions.rb b/benchmarks/profiling_hold_resume_interruptions.rb similarity index 100% rename from benchmarks/profiler_hold_resume_interruptions.rb rename to benchmarks/profiling_hold_resume_interruptions.rb diff --git a/benchmarks/profiler_http_transport.rb b/benchmarks/profiling_http_transport.rb similarity index 100% rename from benchmarks/profiler_http_transport.rb rename to benchmarks/profiling_http_transport.rb diff --git a/benchmarks/profiler_memory_sample_serialize.rb b/benchmarks/profiling_memory_sample_serialize.rb similarity index 100% rename from benchmarks/profiler_memory_sample_serialize.rb rename to benchmarks/profiling_memory_sample_serialize.rb diff --git a/benchmarks/profiler_sample_gvl.rb b/benchmarks/profiling_sample_gvl.rb similarity index 100% rename from benchmarks/profiler_sample_gvl.rb rename to benchmarks/profiling_sample_gvl.rb diff --git a/benchmarks/profiler_sample_loop_v2.rb b/benchmarks/profiling_sample_loop_v2.rb similarity index 100% rename from benchmarks/profiler_sample_loop_v2.rb rename to benchmarks/profiling_sample_loop_v2.rb diff --git a/benchmarks/profiler_sample_serialize.rb b/benchmarks/profiling_sample_serialize.rb similarity index 100% rename from benchmarks/profiler_sample_serialize.rb rename to benchmarks/profiling_sample_serialize.rb diff --git a/benchmarks/run_all.sh b/benchmarks/run_all.sh index 03e84869668..b3e72aa17cc 100755 --- a/benchmarks/run_all.sh +++ b/benchmarks/run_all.sh @@ -8,14 +8,14 @@ set -ex for file in \ `dirname "$0"`/di_instrument.rb \ `dirname "$0"`/library_gem_loading.rb \ - `dirname "$0"`/profiler_allocation.rb \ - `dirname "$0"`/profiler_gc.rb \ - `dirname "$0"`/profiler_hold_resume_interruptions.rb \ - `dirname "$0"`/profiler_http_transport.rb \ - `dirname "$0"`/profiler_memory_sample_serialize.rb \ - `dirname "$0"`/profiler_sample_loop_v2.rb \ - `dirname "$0"`/profiler_sample_serialize.rb \ - `dirname "$0"`/profiler_sample_gvl.rb \ + `dirname "$0"`/profiling_allocation.rb \ + `dirname "$0"`/profiling_gc.rb \ + `dirname "$0"`/profiling_hold_resume_interruptions.rb \ + `dirname "$0"`/profiling_http_transport.rb \ + `dirname "$0"`/profiling_memory_sample_serialize.rb \ + `dirname "$0"`/profiling_sample_loop_v2.rb \ + `dirname "$0"`/profiling_sample_serialize.rb \ + `dirname "$0"`/profiling_sample_gvl.rb \ `dirname "$0"`/tracing_trace.rb; do bundle exec ruby "$file" diff --git a/spec/datadog/profiling/validate_benchmarks_spec.rb b/spec/datadog/profiling/validate_benchmarks_spec.rb index 68ce8a59fd2..79837ee9650 100644 --- a/spec/datadog/profiling/validate_benchmarks_spec.rb +++ b/spec/datadog/profiling/validate_benchmarks_spec.rb @@ -10,14 +10,14 @@ end benchmarks_to_validate = [ - "profiler_allocation", - "profiler_gc", - "profiler_hold_resume_interruptions", - "profiler_http_transport", - "profiler_memory_sample_serialize", - "profiler_sample_loop_v2", - "profiler_sample_serialize", - "profiler_sample_gvl", + "profiling_allocation", + "profiling_gc", + "profiling_hold_resume_interruptions", + "profiling_http_transport", + "profiling_memory_sample_serialize", + "profiling_sample_loop_v2", + "profiling_sample_serialize", + "profiling_sample_gvl", ].freeze benchmarks_to_validate.each do |benchmark| @@ -28,7 +28,7 @@ # This test validates that we don't forget to add new benchmarks to benchmarks_to_validate it "tests all expected benchmarks in the benchmarks folder" do - all_benchmarks = Dir["./benchmarks/profiler_*"].map { |it| it.gsub("./benchmarks/", "").gsub(".rb", "") } + all_benchmarks = Dir["./benchmarks/profiling_*"].map { |it| it.gsub("./benchmarks/", "").gsub(".rb", "") } expect(benchmarks_to_validate).to contain_exactly(*all_benchmarks) end