Skip to content

Move TracerSettings helper methods to TestHelpers project#8375

Merged
andrewlock merged 4 commits intomasterfrom
andrew/move-function
Mar 27, 2026
Merged

Move TracerSettings helper methods to TestHelpers project#8375
andrewlock merged 4 commits intomasterfrom
andrew/move-function

Conversation

@andrewlock
Copy link
Copy Markdown
Member

Summary of changes

Move the TracerSettings.Create() methods which are only there for testing convenience into the TestHelpers project

Reason for change

They don't need to be in the main binary

Implementation details

  • Moved the settings to the TestHelpers project
  • Created them as static extension members, so the call-site doesn't change at all (partially as an experiment)
  • Fixed a culture bug @vandonr was running into

Test coverage

Covered by existing

@andrewlock andrewlock requested a review from a team as a code owner March 26, 2026 14:33
@andrewlock andrewlock added area:tests unit tests, integration tests type:cleanup Minor code clean up labels Mar 26, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2d7decb08e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tracer/test/Datadog.Trace.TestHelpers/TracerSettingsHelpers.cs
Comment thread tracer/test/Datadog.Trace.TestHelpers/TracerSettingsHelpers.cs Outdated
vandonr added a commit that referenced this pull request Mar 26, 2026
@andrewlock andrewlock enabled auto-merge (squash) March 27, 2026 13:45
@andrewlock andrewlock force-pushed the andrew/move-function branch from 60eceaf to c43d256 Compare March 27, 2026 14:41
@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented Mar 27, 2026

Benchmarks

Benchmark execution time: 2026-03-27 15:23:15

Comparing candidate commit c43d256 in PR branch andrew/move-function with baseline commit 017e910 in branch master.

Found 5 performance improvements and 9 performance regressions! Performance is the same for 259 metrics, 15 unstable metrics.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild netcoreapp3.1

  • 🟥 throughput [-5950.732op/s; -4781.249op/s] or [-6.381%; -5.127%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces netcoreapp3.1

  • 🟥 execution_time [+88.876ms; +89.007ms] or [+79.815%; +79.933%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody netcoreapp3.1

  • 🟥 execution_time [+19.000ms; +25.217ms] or [+9.652%; +12.810%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody net6.0

  • 🟩 execution_time [-16.583ms; -13.098ms] or [-7.744%; -6.117%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody netcoreapp3.1

  • 🟥 execution_time [+10.098ms; +16.391ms] or [+5.018%; +8.145%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟩 execution_time [-32.281ms; -29.161ms] or [-14.323%; -12.939%]
  • 🟩 throughput [+77.513op/s; +94.361op/s] or [+7.278%; +8.860%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces netcoreapp3.1

  • 🟥 execution_time [+23.894ms; +25.412ms] or [+15.528%; +16.514%]
  • 🟥 throughput [-221.910op/s; -208.816op/s] or [-14.228%; -13.388%]

scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool net6.0

  • 🟥 execution_time [+105.351µs; +110.542µs] or [+10.403%; +10.915%]
  • 🟥 throughput [-97.435op/s; -92.794op/s] or [-9.868%; -9.397%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark net6.0

  • 🟥 allocated_mem [+17.851KB; +17.888KB] or [+6.915%; +6.930%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog netcoreapp3.1

  • 🟩 execution_time [-37.493ms; -35.106ms] or [-18.610%; -17.426%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net6.0

  • 🟩 execution_time [-17.551ms; -16.116ms] or [-17.752%; -16.301%]

@andrewlock andrewlock merged commit 5ff69b3 into master Mar 27, 2026
139 of 140 checks passed
@andrewlock andrewlock deleted the andrew/move-function branch March 27, 2026 18:37
@github-actions github-actions Bot added this to the vNext-v3 milestone Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:tests unit tests, integration tests type:cleanup Minor code clean up

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants