Skip to content
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: 2 additions & 0 deletions benchmarks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- `library_`
- `profiling_`
- `tracing_`
- `di_`

2. Add the new file to `run_all.sh` in this directory.

Expand All @@ -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

Expand Down
File renamed without changes.
16 changes: 8 additions & 8 deletions benchmarks/run_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
18 changes: 9 additions & 9 deletions spec/datadog/profiling/validate_benchmarks_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand All @@ -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
Expand Down
Loading