Skip to content

Update vendored System.Memory#8459

Merged
andrewlock merged 13 commits into
masterfrom
andrew/update-vendors-3
Apr 23, 2026
Merged

Update vendored System.Memory#8459
andrewlock merged 13 commits into
masterfrom
andrew/update-vendors-3

Conversation

@andrewlock

Copy link
Copy Markdown
Member

Summary of changes

  • Update the System.Memory based on NuGet package sources

Reason for change

We want to update our vendored .NET library versions.

Implementation details

  • Make the vendoring repeatable
  • Run the tool, check for errors, tweak, rinse and repeat
  • After running the tool, used 🤖 to identify segments of code that weren't used, so we could strip them out

The updated vendoring is based on the public System.Memory nuget package, so is designed to be used with .NET Framework and .NET Standard, so makes the most sense to use IMO.

As this package also uses System.Buffers and System.Numerics.Vectors, vendored those pieces we need where appropriate.

Test coverage

This is the test, if it compiles and tests pass, we should be ok 🤞

Other details

https://datadoghq.atlassian.net/browse/APMLP-1207

Note that currently, there's a lot of Utf8Formatter code that isn't used, and could be excluded, however, given that theoretically we could/should use this in the future. I'm torn whether to just leave it in, or whether to tear it out for now, and restore it if/when we want to use it later. Any thoughts?

Part of a stack updating our vendored system code

@andrewlock andrewlock added the area:vendors Code from other vendors label Apr 15, 2026
@pr-commenter

pr-commenter Bot commented Apr 15, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-04-22 18:40:49

Comparing candidate commit 4cb40f3 in PR branch andrew/update-vendors-3 with baseline commit 34902b0 in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 27 metrics, 0 unstable metrics, 61 known flaky benchmarks, 26 flaky benchmarks without significant changes.

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 ----------------------------------'

Known flaky benchmarks

These benchmarks are marked as flaky and will not trigger a failure. Modify FLAKY_BENCHMARKS_REGEX to control which benchmarks are marked as flaky.

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net6.0

  • 🟩 throughput [+8711.240op/s; +12085.569op/s] or [+7.322%; +10.158%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+303.244ms; +305.314ms] or [+150.480%; +151.508%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net6.0

  • 🟥 execution_time [+379.576ms; +382.195ms] or [+299.888%; +301.957%]

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

  • 🟥 execution_time [+396.633ms; +398.950ms] or [+351.005%; +353.055%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody net472

  • 🟥 allocated_mem [+1.308KB; +1.308KB] or [+27.529%; +27.541%]

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

  • 🟥 allocated_mem [+471 bytes; +472 bytes] or [+9.977%; +9.987%]
  • 🟩 execution_time [-15.787ms; -11.504ms] or [-7.373%; -5.373%]

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

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+27.502%; +27.510%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody net472

  • 🟥 allocated_mem [+1.307KB; +1.307KB] or [+105.746%; +105.759%]
  • 🟥 throughput [-257506.337op/s; -253779.701op/s] or [-26.293%; -25.912%]

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

  • 🟥 allocated_mem [+471 bytes; +472 bytes] or [+38.558%; +38.566%]
  • 🟩 execution_time [-26.611ms; -18.577ms] or [-11.867%; -8.285%]

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

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+105.292%; +105.304%]
  • 🟥 throughput [-142108.300op/s; -125890.554op/s] or [-20.418%; -18.088%]

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

  • 🟩 throughput [+8978.522op/s; +11952.105op/s] or [+5.713%; +7.605%]

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

  • 🟩 throughput [+6295.847op/s; +8934.576op/s] or [+5.015%; +7.118%]

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

  • 🟩 throughput [+405671.665op/s; +425112.747op/s] or [+13.527%; +14.175%]

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

  • 🟩 execution_time [-18.364ms; -13.973ms] or [-8.465%; -6.441%]
  • 🟩 throughput [+162945.777op/s; +216996.584op/s] or [+6.468%; +8.613%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs net472

  • 🟥 execution_time [+300.472ms; +300.991ms] or [+150.136%; +150.395%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs net6.0

  • 🟥 execution_time [+299.126ms; +302.268ms] or [+150.850%; +152.434%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs netcoreapp3.1

  • 🟥 execution_time [+299.500ms; +302.030ms] or [+150.865%; +152.139%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs net472

  • 🟥 execution_time [+297.875ms; +298.729ms] or [+146.305%; +146.724%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs net6.0

  • 🟥 execution_time [+297.067ms; +299.265ms] or [+145.225%; +146.300%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs netcoreapp3.1

  • 🟥 execution_time [+301.833ms; +303.908ms] or [+150.856%; +151.893%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack net6.0

  • 🟥 execution_time [+25.069µs; +48.686µs] or [+8.003%; +15.543%]
  • 🟥 throughput [-450.319op/s; -251.649op/s] or [-14.038%; -7.845%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+299.834ms; +300.512ms] or [+149.648%; +149.986%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net6.0

  • 🟥 execution_time [+414.902ms; +419.110ms] or [+450.808%; +455.380%]
  • 🟩 throughput [+1129.091op/s; +1258.250op/s] or [+9.278%; +10.339%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest netcoreapp3.1

  • unstable execution_time [+304.290ms; +342.144ms] or [+231.044%; +259.787%]
  • 🟩 throughput [+641.588op/s; +841.700op/s] or [+6.211%; +8.148%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • unstable execution_time [+293.550ms; +372.147ms] or [+134.972%; +171.110%]
  • 🟥 throughput [-520.662op/s; -453.042op/s] or [-47.177%; -41.050%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net6.0

  • unstable execution_time [+207.645ms; +340.892ms] or [+88.490%; +145.274%]
  • 🟥 throughput [-745.637op/s; -662.154op/s] or [-49.734%; -44.166%]

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

  • 🟥 execution_time [+334.042ms; +340.605ms] or [+199.796%; +203.722%]
  • 🟥 throughput [-403.364op/s; -368.519op/s] or [-28.086%; -25.659%]

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

  • 🟥 execution_time [+98.687µs; +188.116µs] or [+6.780%; +12.923%]

scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool netcoreapp3.1

  • unstable throughput [-2.964op/s; +64.715op/s] or [-0.553%; +12.079%]

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

  • 🟩 execution_time [-171.776µs; -119.455µs] or [-8.702%; -6.051%]
  • 🟩 throughput [+35.972op/s; +49.771op/s] or [+7.101%; +9.825%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 execution_time [+301.989ms; +303.319ms] or [+152.076%; +152.746%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net6.0

  • 🟥 execution_time [+303.442ms; +306.042ms] or [+152.055%; +153.358%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch netcoreapp3.1

  • 🟥 execution_time [+301.529ms; +304.904ms] or [+151.475%; +153.171%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 execution_time [+300.188ms; +301.481ms] or [+150.744%; +151.394%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net6.0

  • 🟥 execution_time [+300.081ms; +302.482ms] or [+148.377%; +149.564%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync netcoreapp3.1

  • 🟥 execution_time [+303.519ms; +307.073ms] or [+153.837%; +155.638%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 execution_time [+304.355ms; +306.120ms] or [+152.759%; +153.645%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net6.0

  • 🟥 execution_time [+300.989ms; +302.484ms] or [+150.016%; +150.761%]
  • 🟩 throughput [+55791.574op/s; +60089.473op/s] or [+11.078%; +11.932%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync netcoreapp3.1

  • 🟥 execution_time [+300.618ms; +303.131ms] or [+149.555%; +150.805%]

scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net6.0

  • 🟩 execution_time [-15.483ms; -11.836ms] or [-7.200%; -5.504%]
  • 🟩 throughput [+24052.324op/s; +30955.314op/s] or [+6.598%; +8.492%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark net472

  • unstable execution_time [+8.174µs; +49.229µs] or [+2.019%; +12.160%]

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

  • 🟩 allocated_mem [-18.412KB; -18.392KB] or [-6.716%; -6.709%]
  • unstable execution_time [-54.879µs; -2.654µs] or [-10.847%; -0.525%]

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

  • 🟥 execution_time [+5.741µs; +9.720µs] or [+13.570%; +22.974%]
  • 🟥 throughput [-4471.631op/s; -2718.200op/s] or [-18.824%; -11.443%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark netcoreapp3.1

  • unstable execution_time [-13.689µs; -6.651µs] or [-21.239%; -10.318%]
  • 🟩 throughput [+1628.155op/s; +3097.787op/s] or [+9.989%; +19.006%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+302.451ms; +303.728ms] or [+152.876%; +153.521%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net6.0

  • 🟥 execution_time [+301.095ms; +303.567ms] or [+153.256%; +154.515%]

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

  • 🟥 execution_time [+299.878ms; +302.018ms] or [+150.126%; +151.197%]

scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net472

  • 🟥 throughput [-25999.823op/s; -24693.880op/s] or [-7.197%; -6.836%]

scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net6.0

  • 🟩 throughput [+33342.242op/s; +38730.172op/s] or [+6.311%; +7.331%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+300.451ms; +302.044ms] or [+149.748%; +150.542%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net6.0

  • 🟥 execution_time [+303.263ms; +304.479ms] or [+152.284%; +152.895%]

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

  • 🟥 execution_time [+303.854ms; +306.216ms] or [+154.095%; +155.293%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+300.619ms; +301.350ms] or [+149.950%; +150.315%]
  • 🟩 throughput [+51579938.986op/s; +58783207.991op/s] or [+37.564%; +42.810%]

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

  • unstable execution_time [+344.084ms; +391.371ms] or [+427.930%; +486.739%]
  • 🟩 throughput [+832.885op/s; +1023.701op/s] or [+6.439%; +7.914%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore netcoreapp3.1

  • 🟥 execution_time [+299.730ms; +300.657ms] or [+149.499%; +149.961%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net6.0

  • 🟩 throughput [+79019.629op/s; +91246.576op/s] or [+7.378%; +8.519%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net6.0

  • 🟩 throughput [+79115.739op/s; +110230.655op/s] or [+6.124%; +8.532%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan netcoreapp3.1

  • 🟩 throughput [+80445.019op/s; +88922.295op/s] or [+7.989%; +8.831%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net6.0

  • 🟩 throughput [+49115.223op/s; +54833.678op/s] or [+8.918%; +9.957%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes netcoreapp3.1

  • 🟩 throughput [+27313.070op/s; +37027.112op/s] or [+6.114%; +8.288%]

scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net6.0

  • 🟩 throughput [+49930.018op/s; +68221.205op/s] or [+5.578%; +7.622%]

Known flaky benchmarks without significant changes:

  • scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net472
  • scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild netcoreapp3.1
  • scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody net472
  • scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody net472
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark net472
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark net6.0
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark netcoreapp3.1
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack net472
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack netcoreapp3.1
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice netcoreapp3.1
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool net6.0
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice netcoreapp3.1
  • scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net472
  • scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog netcoreapp3.1
  • scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark netcoreapp3.1
  • scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark net472
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive netcoreapp3.1
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope netcoreapp3.1
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net472
  • scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net472
  • scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin netcoreapp3.1

@dd-trace-dotnet-ci-bot

dd-trace-dotnet-ci-bot Bot commented Apr 15, 2026

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8459) and master.

✅ No regressions detected - check the details below

Full Metrics Comparison

FakeDbCommand

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration72.87 ± (72.79 - 73.13) ms72.71 ± (72.71 - 73.04) ms-0.2%
.NET Framework 4.8 - Bailout
duration77.88 ± (77.62 - 78.05) ms77.42 ± (77.13 - 77.55) ms-0.6%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1082.93 ± (1085.06 - 1094.96) ms1074.56 ± (1073.24 - 1079.31) ms-0.8%
.NET Core 3.1 - Baseline
process.internal_duration_ms22.65 ± (22.61 - 22.69) ms22.52 ± (22.48 - 22.56) ms-0.6%
process.time_to_main_ms85.29 ± (85.09 - 85.49) ms85.22 ± (84.98 - 85.46) ms-0.1%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.93 ± (10.93 - 10.93) MB10.92 ± (10.92 - 10.92) MB-0.1%
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.93 ± (22.87 - 22.99) ms22.55 ± (22.51 - 22.60) ms-1.6%
process.time_to_main_ms89.11 ± (88.80 - 89.43) ms87.61 ± (87.32 - 87.90) ms-1.7%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.90 ± (10.89 - 10.90) MB10.94 ± (10.94 - 10.94) MB+0.4%✅⬆️
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms213.20 ± (212.36 - 214.03) ms211.30 ± (210.51 - 212.09) ms-0.9%
process.time_to_main_ms527.91 ± (526.54 - 529.28) ms527.33 ± (525.92 - 528.74) ms-0.1%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed47.88 ± (47.86 - 47.91) MB47.92 ± (47.89 - 47.94) MB+0.1%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.0%
.NET 6 - Baseline
process.internal_duration_ms21.66 ± (21.59 - 21.72) ms21.17 ± (21.13 - 21.20) ms-2.3%
process.time_to_main_ms75.68 ± (75.34 - 76.01) ms73.46 ± (73.27 - 73.64) ms-2.9%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.62 ± (10.62 - 10.62) MB10.64 ± (10.64 - 10.64) MB+0.2%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms21.39 ± (21.33 - 21.44) ms21.59 ± (21.53 - 21.65) ms+1.0%✅⬆️
process.time_to_main_ms75.60 ± (75.34 - 75.85) ms77.88 ± (77.57 - 78.19) ms+3.0%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.73 ± (10.73 - 10.73) MB10.75 ± (10.75 - 10.75) MB+0.2%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms382.11 ± (379.87 - 384.35) ms383.68 ± (381.62 - 385.73) ms+0.4%✅⬆️
process.time_to_main_ms529.86 ± (528.49 - 531.23) ms526.92 ± (525.63 - 528.22) ms-0.6%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed49.24 ± (49.21 - 49.27) MB49.35 ± (49.32 - 49.38) MB+0.2%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.2%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms19.58 ± (19.54 - 19.61) ms19.56 ± (19.52 - 19.60) ms-0.1%
process.time_to_main_ms73.60 ± (73.41 - 73.79) ms73.49 ± (73.28 - 73.69) ms-0.2%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.66 ± (7.65 - 7.66) MB7.67 ± (7.67 - 7.68) MB+0.2%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.95 ± (19.89 - 20.01) ms19.47 ± (19.43 - 19.51) ms-2.4%
process.time_to_main_ms76.70 ± (76.40 - 77.01) ms74.03 ± (73.87 - 74.20) ms-3.5%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.71 ± (7.71 - 7.72) MB7.72 ± (7.71 - 7.73) MB+0.1%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms305.12 ± (302.92 - 307.32) ms303.10 ± (300.45 - 305.75) ms-0.7%
process.time_to_main_ms489.82 ± (488.71 - 490.92) ms492.08 ± (490.60 - 493.56) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed36.64 ± (36.59 - 36.69) MB36.65 ± (36.60 - 36.71) MB+0.0%✅⬆️
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)-0.1%

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration206.45 ± (206.11 - 207.39) ms208.56 ± (210.27 - 212.56) ms+1.0%✅⬆️
.NET Framework 4.8 - Bailout
duration211.71 ± (211.23 - 212.37) ms211.69 ± (212.81 - 214.91) ms-0.0%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1200.01 ± (1202.99 - 1210.63) ms1251.33 ± (1248.17 - 1259.78) ms+4.3%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms200.63 ± (200.04 - 201.21) ms204.16 ± (203.16 - 205.16) ms+1.8%✅⬆️
process.time_to_main_ms87.27 ± (86.95 - 87.59) ms89.02 ± (88.48 - 89.56) ms+2.0%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed15.99 ± (15.98 - 16.01) MB15.89 ± (15.87 - 15.91) MB-0.6%
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+1.2%✅⬆️
.NET Core 3.1 - Bailout
process.internal_duration_ms200.32 ± (199.59 - 201.05) ms203.58 ± (202.62 - 204.54) ms+1.6%✅⬆️
process.time_to_main_ms89.72 ± (89.33 - 90.11) ms90.43 ± (90.02 - 90.84) ms+0.8%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed15.98 ± (15.96 - 15.99) MB15.94 ± (15.93 - 15.96) MB-0.2%
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (21 - 21)-1.1%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms395.98 ± (394.75 - 397.21) ms400.17 ± (398.32 - 402.01) ms+1.1%✅⬆️
process.time_to_main_ms544.02 ± (542.60 - 545.43) ms553.83 ± (552.06 - 555.60) ms+1.8%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed58.40 ± (58.28 - 58.51) MB58.42 ± (58.33 - 58.52) MB+0.0%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)-0.1%
.NET 6 - Baseline
process.internal_duration_ms208.19 ± (207.60 - 208.79) ms206.91 ± (206.07 - 207.75) ms-0.6%
process.time_to_main_ms77.00 ± (76.62 - 77.37) ms76.60 ± (76.28 - 76.93) ms-0.5%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.27 ± (16.25 - 16.29) MB16.26 ± (16.24 - 16.27) MB-0.1%
runtime.dotnet.threads.count19 ± (19 - 20)19 ± (19 - 19)-0.8%
.NET 6 - Bailout
process.internal_duration_ms208.67 ± (208.08 - 209.25) ms206.41 ± (205.67 - 207.14) ms-1.1%
process.time_to_main_ms78.16 ± (77.86 - 78.46) ms77.54 ± (77.25 - 77.84) ms-0.8%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.29 ± (16.27 - 16.31) MB16.27 ± (16.26 - 16.29) MB-0.1%
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 21)+0.2%✅⬆️
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms599.71 ± (597.37 - 602.06) ms599.25 ± (596.40 - 602.11) ms-0.1%
process.time_to_main_ms539.29 ± (537.96 - 540.62) ms539.39 ± (538.08 - 540.70) ms+0.0%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed60.86 ± (60.75 - 60.97) MB61.02 ± (60.93 - 61.12) MB+0.3%✅⬆️
runtime.dotnet.threads.count31 ± (31 - 31)31 ± (31 - 31)+0.4%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms202.84 ± (202.17 - 203.51) ms205.48 ± (204.74 - 206.23) ms+1.3%✅⬆️
process.time_to_main_ms74.56 ± (74.28 - 74.83) ms75.98 ± (75.65 - 76.30) ms+1.9%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.57 ± (11.56 - 11.59) MB11.57 ± (11.56 - 11.59) MB-0.0%
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+0.4%✅⬆️
.NET 8 - Bailout
process.internal_duration_ms202.01 ± (201.33 - 202.68) ms204.01 ± (203.35 - 204.68) ms+1.0%✅⬆️
process.time_to_main_ms75.70 ± (75.39 - 76.00) ms76.39 ± (76.12 - 76.65) ms+0.9%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.61 ± (11.59 - 11.62) MB11.65 ± (11.64 - 11.67) MB+0.4%✅⬆️
runtime.dotnet.threads.count20 ± (19 - 20)20 ± (20 - 20)+0.9%✅⬆️
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms531.25 ± (525.42 - 537.08) ms537.99 ± (531.07 - 544.90) ms+1.3%✅⬆️
process.time_to_main_ms498.26 ± (497.06 - 499.47) ms500.30 ± (499.16 - 501.45) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed50.37 ± (50.30 - 50.44) MB50.41 ± (50.33 - 50.49) MB+0.1%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+0.1%✅⬆️
Comparison explanation

Execution-time benchmarks measure the whole time it takes to execute a program, and are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are highlighted in **red**. The following thresholds were used for comparing the execution times:

  • Welch test with statistical test for significance of 5%
  • Only results indicating a difference greater than 5% and 5 ms are considered.

Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard.

Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph).

Duration charts
FakeDbCommand (.NET Framework 4.8)
gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8459) - mean (73ms)  : 71, 75
    master - mean (73ms)  : 71, 75

    section Bailout
    This PR (8459) - mean (77ms)  : 75, 80
    master - mean (78ms)  : 75, 81

    section CallTarget+Inlining+NGEN
    This PR (8459) - mean (1,076ms)  : 1032, 1121
    master - mean (1,090ms)  : 1015, 1165

Loading
FakeDbCommand (.NET Core 3.1)
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8459) - mean (115ms)  : 109, 121
    master - mean (115ms)  : 112, 118

    section Bailout
    This PR (8459) - mean (118ms)  : 111, 125
    master - mean (119ms)  : 113, 126

    section CallTarget+Inlining+NGEN
    This PR (8459) - mean (778ms)  : 752, 804
    master - mean (779ms)  : 750, 808

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8459) - mean (101ms)  : 97, 105
    master - mean (104ms)  : 97, 111

    section Bailout
    This PR (8459) - mean (106ms)  : 101, 112
    master - mean (104ms)  : 98, 110

    section CallTarget+Inlining+NGEN
    This PR (8459) - mean (938ms)  : 906, 970
    master - mean (941ms)  : 902, 980

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8459) - mean (101ms)  : 96, 105
    master - mean (101ms)  : 98, 104

    section Bailout
    This PR (8459) - mean (101ms)  : 99, 104
    master - mean (105ms)  : 99, 111

    section CallTarget+Inlining+NGEN
    This PR (8459) - mean (827ms)  : 790, 864
    master - mean (825ms)  : 789, 862

Loading
HttpMessageHandler (.NET Framework 4.8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8459) - mean (211ms)  : 194, 228
    master - mean (207ms)  : 197, 217

    section Bailout
    This PR (8459) - mean (214ms)  : 199, 229
    master - mean (212ms)  : 204, 220

    section CallTarget+Inlining+NGEN
    This PR (8459) - mean (1,254ms)  : 1186, 1322
    master - mean (1,207ms)  : 1152, 1261

Loading
HttpMessageHandler (.NET Core 3.1)
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8459) - mean (307ms)  : 278, 335
    master - mean (297ms)  : 282, 313

    section Bailout
    This PR (8459) - mean (307ms)  : 279, 336
    master - mean (300ms)  : 285, 314

    section CallTarget+Inlining+NGEN
    This PR (8459) - mean (991ms)  : 957, 1025
    master - mean (979ms)  : 945, 1013

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8459) - mean (294ms)  : 277, 312
    master - mean (295ms)  : 282, 308

    section Bailout
    This PR (8459) - mean (295ms)  : 276, 315
    master - mean (297ms)  : 284, 310

    section CallTarget+Inlining+NGEN
    This PR (8459) - mean (1,169ms)  : 1124, 1214
    master - mean (1,169ms)  : 1121, 1217

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8459) - mean (293ms)  : 279, 308
    master - mean (289ms)  : 273, 305

    section Bailout
    This PR (8459) - mean (292ms)  : 278, 306
    master - mean (289ms)  : 273, 306

    section CallTarget+Inlining+NGEN
    This PR (8459) - mean (1,073ms)  : 976, 1171
    master - mean (1,064ms)  : 981, 1147

Loading

@andrewlock
andrewlock force-pushed the andrew/update-vendors-2 branch from 58b049c to 8947b73 Compare April 21, 2026 10:19
@andrewlock
andrewlock force-pushed the andrew/update-vendors-3 branch from 3b42dd4 to 2e151f2 Compare April 21, 2026 10:19
@andrewlock
andrewlock force-pushed the andrew/update-vendors-2 branch from 8947b73 to ac67d3f Compare April 22, 2026 14:45
Base automatically changed from andrew/update-vendors-2 to master April 22, 2026 16:44
@andrewlock
andrewlock force-pushed the andrew/update-vendors-3 branch from 2e151f2 to 4cb40f3 Compare April 22, 2026 17:33
@andrewlock
andrewlock merged commit 8363350 into master Apr 23, 2026
142 checks passed
@andrewlock
andrewlock deleted the andrew/update-vendors-3 branch April 23, 2026 07:18
@github-actions github-actions Bot added this to the vNext-v3 milestone Apr 23, 2026
andrewlock added a commit that referenced this pull request Apr 23, 2026
## Summary of changes

Stop vendoring the `SR` + regex files for microsoft code

## Reason for change

Using `ResourceManager` is overkill, as we don't deploy all the
translations etc anyway, and don't want to.

## Implementation details

Replaced all the `SR.` accesses in previous PRs, so this is now dead
code that we can remove.

## Test coverage

If it builds, we're good

## Other details

https://datadoghq.atlassian.net/browse/APMLP-1207

Note that currently, there's a lot of `Utf8Formatter` code that _isn't_
used, and could be excluded, however, given that theoretically we
could/should use this in the future. I'm torn whether to just leave it
in, or whether to tear it out for now, and restore it if/when we want to
use it later. Any thoughts?

Part of a stack updating our vendored system code

- #8391
- #8454
- #8455
- #8459
andrewlock added a commit that referenced this pull request Apr 23, 2026
## Summary of changes

- Create re-usable vendoring process for
System.Runtime.CompilerServices.Unsafe
- Update the vendored code (it's actually unchanged)

## Reason for change

We want to be able to update vendored code as required. For the vendored
[System.Runtime.CompilerServices.Unsafe
package](https://nuget.info/packages/System.Runtime.CompilerServices.Unsafe/6.1.2),
the [source
code](https://github.com/dotnet/maintenance-packages/blob/14e29655e53aec37342e933bfd7ba574167453ff/src/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.il)
is written directly as IL, and [compiled using
Ilasm.exe](https://learn.microsoft.com/en-us/dotnet/framework/tools/ilasm-exe-il-assembler).
So this PR introduces a simple "IL to C#" converter that converts that
file to its C# equivalent, using the same `InlineIL.Fody` approach that
we currently have.

The final result produces a file that is _virtually_ identical to the
existing one (which is good!). The only difference I made was to add the
original IL line as a comment next to the Fody equivalent.

This also shows that the code has not _actually_ changed (and it's
unlikely it _will_ tbh), so this just means we have a repeatable
self-contained approach to regenerate this in the repo as required.

## Implementation details

Told 🤖 to make the IL to C# converter, and it did 😄 I've given the code
it generated a once-over to look for anything terrible, but the key
thing is that the _output_ is sane, and that's visibly basically
unchanged, so I think it's fine.

## Test coverage

@dudikeleti already wrote some extensive tests for the `Unsafe`
implementation back when he originally ported it, which verifies that we
can compile the methods, call them, and that the generated IL is
identical to the "real" versions 🎉

## Other details


https://datadoghq.atlassian.net/browse/APMLP-1207

Part of a stack updating our vendored system code

- #8391
- #8454
- #8455
- #8459
- #8461
andrewlock added a commit that referenced this pull request Apr 24, 2026
#8476)

## Summary of changes

Updates the System.Memory vendoring code to move types like
`ReadOnlySpan<T>`, `Span<T>` into `System` instead of
`Datadog.Trace.VendoredMicrosoftCode.System`

## Reason for change

The compiler has various functionality that relies on the `Span<T>` (and
`ReadOnlySpan<T>`) being available in the `System` namespace. By making
this change, we get the advantage of those types being available.

A separate PR will actually update code to use those types, except where
changes were required to make it compile in this PR.

## Implementation details

Update the vendoring code to stop changing the namespace.

## Test coverage

This is the test, if the tests pass, we should be fine.

## Other details


Depends on a stack updating our vendored system code

- #8391
- #8454
- #8455
- #8459
- #8461
- #8469
andrewlock added a commit that referenced this pull request Apr 24, 2026
## Summary of changes

Remove some branching code that's no longer required after #8476 moved
`Span<T>` to `System` namespace

## Reason for change

This sort of stuff is the _reason_ we made that change, to reduce
maintenance.

## Implementation details

Set 🤖 looking for possible cases, so it's not exhaustive, but gives a
taster. I think most of these make sense. It's nothing outstanding but
it's the little things.

## Test coverage

Just a refactoring, so covered by existing tests.

## Other details

By definition, we don't really expect to see performance improvements
for this, other than potentially some reduced allocation in .NET
Framework. The primary benefits are devx

Depends on the vendoring code stack:


Depends on a stack updating our vendored system code

- #8391
- #8454
- #8455
- #8459
- #8461
- #8469
- #8476

---------

Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
andrewlock added a commit that referenced this pull request Apr 24, 2026
#8486)

## Summary of changes

Update the tag list generator to always use `ReadOnlySpan<byte>`
properties instead of `byte[]`

## Reason for change

After moving our vendored `Span<T>` implementation into the `System`
namespace, various optimizations open up to us, including using
`ReadOnlySpan<byte>` properties on .NET Framework instead of `static
readonly byte[]` to avoid startup costs.

## Implementation details

Replace the code generated by the generator, and update the generated
code

## Test coverage

Covered by snapshot tests and behaviour is covered by existing tests.
We'll check the benchmarks to make sure that we _don't_ see any perf
impact (there shouldn't be, impact should just be reduced startup costs)

## Other details

Depends on a stack updating our vendored system code

- #8391
- #8454
- #8455
- #8459
- #8461
- #8469
- #8476
- #8477
andrewlock added a commit that referenced this pull request Apr 27, 2026
… string literals (#8487)

## Summary of changes

Convert `Encoding.Utf8.GetBytes` calls to static constants using UTF8
string literals

## Reason for change

After moving our vendored `Span<T>` implementation into the `System`
namespace, various optimizations open up to us, including using UTF-8
string literals, to encode strings to UTF-8 at compile time instead of
at runtime. By combing with `static ReadOnlySpan<byte>` properties,
these also become zero allocation, so we get reduced overall memory
usage as well as better startup time

## Implementation details

Replace the following with utf8 string literals:
- `StringEncoding.UTF8.GetBytes`
- `Encoding.UTF8.GetBytes`
- `EncodingHelpers.UTF8NoBom.GetBytes`

## Test coverage

All covered by existing tests

## Other details

Depends on a stack updating our vendored system code

- #8391
- #8454
- #8455
- #8459
- #8461
- #8469
- #8476
- #8477
- #8486
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:vendors Code from other vendors

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants