[PROF-10128] Fix profiling benchmarking configuration still having auto_instrument overhead #3818
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR tweaks the
ADD_TO_GEMFILE
environment variable for benchmarking configurations where only the profiler should be active to not includerequire: 'datadog/auto_instrument'
.It turns out this change was added in #3614 when we fixed the benchmarks not running. Loading the instrumentation code and then disabling tracing has a measurable performance overhead vs not loading it at all (20% regression of median throughput in high load gitlab tests).
Motivation:
I expect that with this change, the
only-profiling
configuration will reflect historical data we had before the change in #3614.This is relevant because we use this data as basis for comparison with other profiling features (e.g. allocation) and thus it's important to have a correct baseline.
Additional Notes:
I noticed a similar-ish configuration issue in our reliability environment. I'll open a separate PR for that one as well.
How to test the change?
I've tested a similar configuration using
bp-runner
locally and confirmed that overhead is reduced. Once we merge this in, I'll validate that the nightly runs show performance is back to where it was on the 18th of April.