Skip to content

Commit

Permalink
Fix macro benchmark (#3614)
Browse files Browse the repository at this point in the history
* Inject Gemfile for each variants and remove obsolete variants

* Explicit env for features

* Extract default env

* Use `ruby/gitlab` branch
  • Loading branch information
TonyCTHsu authored Apr 30, 2024
1 parent 370d7b1 commit 2be8d89
Showing 1 changed file with 15 additions and 49 deletions.
64 changes: 15 additions & 49 deletions .gitlab/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,18 @@ variables:
# Benchmark's env variables. Modify to tweak benchmark parameters.
DD_TRACE_DEBUG: "false"
DD_RUNTIME_METRICS_ENABLED: "true"
# Gitlab makes use of the rugged gem, which triggers the automatic no signals workaround use, see
# https://docs.datadoghq.com/profiler/profiler_troubleshooting/ruby/#unexpected-failures-or-errors-from-ruby-gems-that-use-native-extensions-in-dd-trace-rb-1110
# But in practice the endpoints we test it aren't affected, so we prefer to run the profiler in its default,
# better accuracy, mode.
DD_PROFILING_NO_SIGNALS_WORKAROUND_ENABLED: "false"

# DEV: This variable is consumed by the reliability environment
# (TODO) Update this variable to reflect "DATADOG" instead of "DDTRACE" as a name?
DD_RELENV_DDTRACE_COMMIT_ID: $CI_COMMIT_SHORT_SHA
# Default `false` for all features, overwrite by each variants.
DD_TRACE_ENABLED: "false"
DD_PROFILING_ENABLED: "false"
DD_APPSEC_ENABLED: "false"

ADD_TO_GEMFILE: "gem 'datadog', require: 'datadog/auto_instrument', github: 'DataDog/dd-trace-rb', ref: '$CI_COMMIT_SHA'"

K6_OPTIONS_NORMAL_OPERATION_RATE: 30
K6_OPTIONS_NORMAL_OPERATION_DURATION: 10m
Expand Down Expand Up @@ -65,92 +73,50 @@ only-tracing:
extends: .benchmarks
variables:
DD_BENCHMARKS_CONFIGURATION: only-tracing
DD_TRACE_ENABLED: "true"

only-profiling:
extends: .benchmarks
variables:
DD_BENCHMARKS_CONFIGURATION: only-profiling
DD_PROFILING_ENABLED: "true"
# Gitlab makes use of the rugged gem, which triggers the automatic no signals workaround use, see
# https://docs.datadoghq.com/profiler/profiler_troubleshooting/ruby/#unexpected-failures-or-errors-from-ruby-gems-that-use-native-extensions-in-dd-trace-rb-1110
# But in practice the endpoints we test it aren't affected, so we prefer to run the profiler in its default,
# better accuracy, mode.
DD_PROFILING_NO_SIGNALS_WORKAROUND_ENABLED: "false"

only-profiling-alloc:
extends: .benchmarks
variables:
DD_BENCHMARKS_CONFIGURATION: only-profiling
DD_PROFILING_ENABLED: "true"
DD_PROFILING_NO_SIGNALS_WORKAROUND_ENABLED: "false"
DD_PROFILING_ALLOCATION_ENABLED: "true"

only-profiling-heap:
extends: .benchmarks
variables:
DD_BENCHMARKS_CONFIGURATION: only-profiling
DD_PROFILING_ENABLED: "true"
DD_PROFILING_NO_SIGNALS_WORKAROUND_ENABLED: "false"
DD_PROFILING_ALLOCATION_ENABLED: "true"
DD_PROFILING_EXPERIMENTAL_HEAP_ENABLED: "true"

only-profiling-heap-size:
extends: .benchmarks
variables:
DD_BENCHMARKS_CONFIGURATION: only-profiling
DD_PROFILING_ENABLED: "true"
DD_PROFILING_NO_SIGNALS_WORKAROUND_ENABLED: "false"
DD_PROFILING_ALLOCATION_ENABLED: "true"
DD_PROFILING_EXPERIMENTAL_HEAP_ENABLED: "true"
DD_PROFILING_EXPERIMENTAL_HEAP_SIZE_ENABLED: "true"

only-profiling-heap-size-sample-rate-1:
extends: .benchmarks
variables:
DD_BENCHMARKS_CONFIGURATION: only-profiling
DD_PROFILING_ENABLED: "true"
DD_PROFILING_NO_SIGNALS_WORKAROUND_ENABLED: "false"
DD_PROFILING_ALLOCATION_ENABLED: "true"
DD_PROFILING_EXPERIMENTAL_HEAP_ENABLED: "true"
DD_PROFILING_EXPERIMENTAL_HEAP_SIZE_ENABLED: "true"
DD_PROFILING_EXPERIMENTAL_HEAP_SAMPLE_RATE: "1"

profiling-and-tracing:
extends: .benchmarks
variables:
DD_BENCHMARKS_CONFIGURATION: profiling-and-tracing
DD_TRACE_ENABLED: "true"
DD_PROFILING_ENABLED: "true"
DD_PROFILING_NO_SIGNALS_WORKAROUND_ENABLED: "false"

tracing-and-appsec:
extends: .benchmarks
variables:
DD_BENCHMARKS_CONFIGURATION: tracing-and-appsec
DD_TRACE_ENABLED: "true"
DD_APPSEC_ENABLED: "true"

tracing-and-appsec-and-no-remote-configuration:
extends: .benchmarks
variables:
DD_BENCHMARKS_CONFIGURATION: tracing-and-appsec-and-no-remote-configuration
DD_APPSEC_ENABLED: "true"
DD_REMOTE_CONFIGURATION_ENABLED: "false"

profiling-and-tracing-and-appsec:
extends: .benchmarks
variables:
DD_BENCHMARKS_CONFIGURATION: profiling-and-tracing-and-appsec
DD_APPSEC_ENABLED: "true"
DD_TRACE_ENABLED: "true"
DD_PROFILING_ENABLED: "true"
DD_PROFILING_NO_SIGNALS_WORKAROUND_ENABLED: "false"

candidate-tracer-appsec-with-api-security:
extends: .benchmarks
variables:
DD_BENCHMARKS_CONFIGURATION: "tracing-and-appsec-with-api-security"
DD_PROFILING_ENABLED: "false"
DD_APPSEC_ENABLED: "true"
DD_EXPERIMENTAL_API_SECURITY_ENABLED: "true"
DD_API_SECURITY_REQUEST_SAMPLE_RATE: "1.0"

# -----------------------------------------------------
# Microbenchmarks that report to statsd
Expand Down

0 comments on commit 2be8d89

Please sign in to comment.