Skip to content

Update vendored System.Collections.Immutable#8391

Merged
andrewlock merged 9 commits into
masterfrom
andrew/update-vendors
Apr 22, 2026
Merged

Update vendored System.Collections.Immutable#8391
andrewlock merged 9 commits into
masterfrom
andrew/update-vendors

Conversation

@andrewlock

Copy link
Copy Markdown
Member

Summary of changes

  • Tweaks to the vendoring tools
  • Remove some unused types from System.Collections.Immutable
  • Update the vendored version of System.Collections.Immutable to use the runtime repo directly, and bump to latest patch version

Reason for change

We want to update our vendored .NET library versions.

Implementation details

  • Added ability to specify "include" files, instead of using "exclude". Makes it easier to limit the included scope of files
  • remove requiredment that the vendored code has an associated csproj in a known location (this one doesn't)
  • Before starting the update, identified a bunch of additional types we could avoid bringing in (stack, queue, sorted dictionary etc)
  • Make the vendoring repeatable
  • Run the tool, check for errors, tweak, rince and repeat

Test coverage

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

Other details

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

@andrewlock andrewlock added area:tools area:vendors Code from other vendors labels Apr 1, 2026
@andrewlock
andrewlock requested review from a team as code owners April 1, 2026 11:26
@andrewlock
andrewlock force-pushed the andrew/update-vendors branch from ffd7780 to ab9dd65 Compare April 1, 2026 11:27
Comment on lines +412 to +413
// Hacky, but it works
contents = contents.Replace("var sortedDictionary = this.Dictionary as ImmutableSortedDictionary<TKey, TValue>;", "var sortedDictionary = this.Dictionary as IImmutableDictionaryInternal<TKey, TValue>;");

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is the hackiest of the fixes, but it's quite useful. Here is the impact in context:

        public override bool Contains(TValue item)
        {
-           var sortedDictionary = this.Dictionary as ImmutableSortedDictionary<TKey, TValue>;
+           var sortedDictionary = this.Dictionary as IImmutableDictionaryInternal<TKey, TValue>;

            if (sortedDictionary != null)
            {
                return sortedDictionary.ContainsValue(item);
            }

            var dictionary = this.Dictionary as IImmutableDictionaryInternal<TKey, TValue>;
            if (dictionary != null)
            {
                return dictionary.ContainsValue(item);
            }

            throw new NotSupportedException();
        }

this is the only reference to ImmutableSortedDictionary<> we have, so it could never be true anyway AFAICT, and it means that we can completely remove the ImmutableSortedDictionary<> hierarchy, which trims a bunch of other stuff too

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

Copy link
Copy Markdown

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: ffd778022c

ℹ️ 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/build/_build/UpdateVendors/UpdateVendors.cs Outdated
return Regex.Replace(
result,
@"public(\s+((abstract|sealed|static|unsafe)\s+)*?(partial\s+)?(class|readonly\s+(ref\s+)?struct|struct|interface|enum|delegate))",
@"public(\s+((abstract|sealed|static|unsafe)\s+)*?(readonly\s+)?(partial\s+)?(class|readonly\s+(ref\s+)?struct|struct|interface|enum|delegate))",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Necessary because there was one instance of public readonly partial class, which we didn't support previously

@andrewlock
andrewlock force-pushed the andrew/update-vendors branch from ab9dd65 to 445b715 Compare April 1, 2026 11:39
@andrewlock
andrewlock marked this pull request as draft April 1, 2026 13:38
@andrewlock
andrewlock force-pushed the andrew/update-vendors branch 2 times, most recently from 43cbd2b to 3c2c93a Compare April 1, 2026 14:17
@dd-trace-dotnet-ci-bot

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

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8391) 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.79 ± (72.96 - 73.46) ms72.55 ± (72.81 - 73.33) ms-0.3%
.NET Framework 4.8 - Bailout
duration76.75 ± (76.64 - 77.01) ms79.50 ± (79.12 - 79.68) ms+3.6%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1072.91 ± (1072.04 - 1078.41) ms1136.86 ± (1129.24 - 1152.40) ms+6.0%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms22.65 ± (22.59 - 22.71) ms23.46 ± (23.39 - 23.53) ms+3.6%✅⬆️
process.time_to_main_ms85.92 ± (85.59 - 86.26) ms88.95 ± (88.56 - 89.34) ms+3.5%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.85 ± (10.84 - 10.85) MB10.92 ± (10.92 - 10.93) MB+0.7%✅⬆️
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.42 ± (22.38 - 22.46) ms22.97 ± (22.92 - 23.02) ms+2.5%✅⬆️
process.time_to_main_ms85.54 ± (85.33 - 85.75) ms87.33 ± (87.13 - 87.53) ms+2.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.94 ± (10.94 - 10.94) MB10.95 ± (10.95 - 10.96) MB+0.1%✅⬆️
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms230.89 ± (229.68 - 232.10) ms229.50 ± (228.39 - 230.61) ms-0.6%
process.time_to_main_ms528.35 ± (526.80 - 529.89) ms532.77 ± (531.41 - 534.13) ms+0.8%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.54 ± (48.51 - 48.56) MB48.48 ± (48.45 - 48.50) MB-0.1%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.0%
.NET 6 - Baseline
process.internal_duration_ms21.22 ± (21.17 - 21.27) ms21.21 ± (21.17 - 21.24) ms-0.0%
process.time_to_main_ms73.72 ± (73.46 - 73.98) ms72.98 ± (72.79 - 73.17) ms-1.0%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.63 ± (10.63 - 10.63) MB10.63 ± (10.63 - 10.63) MB+0.0%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms21.21 ± (21.16 - 21.25) ms21.15 ± (21.11 - 21.18) ms-0.3%
process.time_to_main_ms75.00 ± (74.78 - 75.23) ms74.44 ± (74.27 - 74.61) ms-0.7%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.74 ± (10.73 - 10.74) MB10.75 ± (10.74 - 10.75) MB+0.1%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms383.31 ± (381.47 - 385.14) ms384.79 ± (382.97 - 386.61) ms+0.4%✅⬆️
process.time_to_main_ms528.77 ± (527.63 - 529.91) ms532.37 ± (530.94 - 533.79) ms+0.7%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed49.88 ± (49.85 - 49.90) MB50.01 ± (49.98 - 50.04) MB+0.3%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.1%
.NET 8 - Baseline
process.internal_duration_ms19.42 ± (19.38 - 19.45) ms19.66 ± (19.62 - 19.70) ms+1.3%✅⬆️
process.time_to_main_ms72.54 ± (72.38 - 72.71) ms73.36 ± (73.16 - 73.55) ms+1.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.67 ± (7.67 - 7.68) MB7.64 ± (7.64 - 7.65) MB-0.4%
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.63 ± (19.58 - 19.69) ms20.08 ± (20.02 - 20.14) ms+2.3%✅⬆️
process.time_to_main_ms75.08 ± (74.83 - 75.34) ms77.52 ± (77.23 - 77.80) ms+3.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.72 ± (7.72 - 7.72) MB7.70 ± (7.69 - 7.70) MB-0.3%
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms305.39 ± (303.09 - 307.68) ms304.19 ± (301.64 - 306.73) ms-0.4%
process.time_to_main_ms489.92 ± (488.77 - 491.07) ms490.31 ± (489.03 - 491.59) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed37.20 ± (37.16 - 37.23) MB37.20 ± (37.15 - 37.26) MB+0.0%✅⬆️
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)-0.3%

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration190.88 ± (190.94 - 191.70) ms191.48 ± (191.51 - 192.31) ms+0.3%✅⬆️
.NET Framework 4.8 - Bailout
duration194.62 ± (194.58 - 194.93) ms195.05 ± (194.93 - 195.33) ms+0.2%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1147.54 ± (1149.71 - 1156.69) ms1147.73 ± (1148.97 - 1155.86) ms+0.0%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms185.07 ± (184.83 - 185.31) ms185.28 ± (185.04 - 185.53) ms+0.1%✅⬆️
process.time_to_main_ms80.72 ± (80.50 - 80.93) ms80.77 ± (80.58 - 80.96) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.12 ± (16.10 - 16.14) MB16.15 ± (16.12 - 16.19) MB+0.2%✅⬆️
runtime.dotnet.threads.count20 ± (19 - 20)19 ± (19 - 20)-0.5%
.NET Core 3.1 - Bailout
process.internal_duration_ms184.54 ± (184.29 - 184.78) ms184.71 ± (184.38 - 185.03) ms+0.1%✅⬆️
process.time_to_main_ms81.73 ± (81.59 - 81.87) ms82.21 ± (82.06 - 82.36) ms+0.6%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.18 ± (16.15 - 16.21) MB16.20 ± (16.17 - 16.22) MB+0.1%✅⬆️
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (21 - 21)+0.1%✅⬆️
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms393.76 ± (392.43 - 395.09) ms393.45 ± (392.16 - 394.75) ms-0.1%
process.time_to_main_ms506.15 ± (504.88 - 507.42) ms508.11 ± (506.86 - 509.36) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed58.74 ± (58.54 - 58.94) MB58.91 ± (58.73 - 59.09) MB+0.3%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+0.1%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms189.30 ± (188.99 - 189.62) ms190.04 ± (189.73 - 190.36) ms+0.4%✅⬆️
process.time_to_main_ms70.10 ± (69.95 - 70.26) ms70.36 ± (70.21 - 70.52) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.06 ± (15.91 - 16.21) MB16.16 ± (16.02 - 16.31) MB+0.7%✅⬆️
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 19)+2.3%✅⬆️
.NET 6 - Bailout
process.internal_duration_ms188.63 ± (188.41 - 188.86) ms189.19 ± (188.98 - 189.40) ms+0.3%✅⬆️
process.time_to_main_ms71.02 ± (70.93 - 71.11) ms71.43 ± (71.34 - 71.52) ms+0.6%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.04 ± (15.88 - 16.21) MB16.21 ± (16.07 - 16.34) MB+1.0%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+0.4%✅⬆️
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms600.13 ± (597.64 - 602.61) ms600.27 ± (597.78 - 602.75) ms+0.0%✅⬆️
process.time_to_main_ms508.40 ± (507.52 - 509.29) ms509.21 ± (508.23 - 510.20) ms+0.2%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed61.71 ± (61.62 - 61.80) MB61.94 ± (61.85 - 62.03) MB+0.4%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+0.0%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms186.80 ± (186.51 - 187.09) ms187.08 ± (186.81 - 187.34) ms+0.1%✅⬆️
process.time_to_main_ms69.39 ± (69.23 - 69.55) ms69.41 ± (69.27 - 69.55) ms+0.0%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.77 ± (11.74 - 11.80) MB11.81 ± (11.78 - 11.84) MB+0.3%✅⬆️
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 18)-0.2%
.NET 8 - Bailout
process.internal_duration_ms185.76 ± (185.61 - 185.91) ms186.25 ± (186.00 - 186.50) ms+0.3%✅⬆️
process.time_to_main_ms70.46 ± (70.41 - 70.52) ms70.78 ± (70.68 - 70.88) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.70 ± (11.62 - 11.78) MB11.80 ± (11.74 - 11.85) MB+0.8%✅⬆️
runtime.dotnet.threads.count19 ± (18 - 19)19 ± (19 - 19)+3.0%✅⬆️
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms518.13 ± (515.84 - 520.42) ms523.60 ± (521.01 - 526.20) ms+1.1%✅⬆️
process.time_to_main_ms466.87 ± (466.22 - 467.53) ms468.16 ± (467.45 - 468.87) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed50.75 ± (50.72 - 50.78) MB50.76 ± (50.72 - 50.79) MB+0.0%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+0.2%✅⬆️
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 (8391) - mean (73ms)  : 69, 77
    master - mean (73ms)  : 70, 77

    section Bailout
    This PR (8391) - mean (79ms)  : 75, 84
    master - mean (77ms)  : 75, 79

    section CallTarget+Inlining+NGEN
    This PR (8391) - mean (1,141ms)  : 964, 1317
    master - mean (1,075ms)  : 1030, 1121

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 (8391) - mean (120ms)  : 113, 127
    master - mean (116ms)  : 108, 123

    section Bailout
    This PR (8391) - mean (118ms)  : 114, 122
    master - mean (115ms)  : 111, 118

    section CallTarget+Inlining+NGEN
    This PR (8391) - mean (801ms)  : 772, 831
    master - mean (797ms)  : 773, 821

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

    section Bailout
    This PR (8391) - mean (102ms)  : 99, 105
    master - mean (103ms)  : 98, 108

    section CallTarget+Inlining+NGEN
    This PR (8391) - mean (945ms)  : 911, 979
    master - mean (940ms)  : 906, 974

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8391) - mean (101ms)  : 96, 106
    master - mean (100ms)  : 96, 103

    section Bailout
    This PR (8391) - mean (106ms)  : 100, 112
    master - mean (103ms)  : 97, 108

    section CallTarget+Inlining+NGEN
    This PR (8391) - mean (828ms)  : 785, 870
    master - mean (825ms)  : 786, 865

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 (8391) - mean (192ms)  : 188, 196
    master - mean (191ms)  : 188, 195

    section Bailout
    This PR (8391) - mean (195ms)  : 193, 197
    master - mean (195ms)  : 193, 196

    section CallTarget+Inlining+NGEN
    This PR (8391) - mean (1,152ms)  : 1103, 1202
    master - mean (1,153ms)  : 1101, 1205

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 (8391) - mean (275ms)  : 269, 280
    master - mean (274ms)  : 270, 278

    section Bailout
    This PR (8391) - mean (275ms)  : 272, 279
    master - mean (275ms)  : 271, 279

    section CallTarget+Inlining+NGEN
    This PR (8391) - mean (941ms)  : 917, 966
    master - mean (930ms)  : 903, 957

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8391) - mean (269ms)  : 264, 274
    master - mean (267ms)  : 263, 272

    section Bailout
    This PR (8391) - mean (269ms)  : 266, 272
    master - mean (268ms)  : 265, 271

    section CallTarget+Inlining+NGEN
    This PR (8391) - mean (1,142ms)  : 1109, 1174
    master - mean (1,138ms)  : 1099, 1176

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8391) - mean (266ms)  : 262, 271
    master - mean (266ms)  : 261, 271

    section Bailout
    This PR (8391) - mean (267ms)  : 264, 270
    master - mean (266ms)  : 263, 268

    section CallTarget+Inlining+NGEN
    This PR (8391) - mean (1,023ms)  : 985, 1061
    master - mean (1,019ms)  : 981, 1057

Loading

@andrewlock
andrewlock marked this pull request as ready for review April 1, 2026 15:09

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

Copy link
Copy Markdown

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: 3c2c93a94a

ℹ️ 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/build/_build/UpdateVendors/UpdateVendors.cs Outdated
@andrewlock
andrewlock force-pushed the andrew/update-vendors branch from db7cc20 to 23014ee Compare April 2, 2026 08:33

@bouwkast bouwkast left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks!

@pr-commenter

pr-commenter Bot commented Apr 14, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-04-21 11:24:03

Comparing candidate commit ffcd2fb in PR branch andrew/update-vendors with baseline commit b821c57 in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 27 metrics, 0 unstable metrics, 87 known flaky benchmarks.

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 net472

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.008%; +0.005%]
  • ignore execution_time [-1.704ms; -0.769ms] or [-0.847%; -0.382%]
  • ignore throughput [-1617.852op/s; -867.498op/s] or [-1.918%; -1.029%]

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

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.006%; +0.007%]
  • ignore execution_time [-1720.540µs; +1772.217µs] or [-0.858%; +0.884%]
  • 🟩 throughput [+10604.412op/s; +12829.662op/s] or [+8.913%; +10.784%]

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

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.003%; +0.007%]
  • ignore execution_time [+0.272ms; +2.537ms] or [+0.137%; +1.276%]
  • ignore throughput [-2217.505op/s; -1001.806op/s] or [-2.255%; -1.019%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • ignore allocated_mem [+8 bytes; +9 bytes] or [+0.266%; +0.279%]
  • 🟥 execution_time [+304.983ms; +306.745ms] or [+151.343%; +152.218%]
  • ignore throughput [+9.966op/s; +13.711op/s] or [+1.793%; +2.467%]

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

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.009%; +0.002%]
  • 🟥 execution_time [+383.458ms; +386.407ms] or [+302.955%; +305.285%]
  • ignore throughput [+6.260op/s; +9.485op/s] or [+0.825%; +1.251%]

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

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.009%; +0.002%]
  • 🟥 execution_time [+398.282ms; +400.937ms] or [+352.464%; +354.814%]
  • ignore throughput [+1.908op/s; +5.432op/s] or [+0.269%; +0.767%]

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

  • 🟥 allocated_mem [+1.308KB; +1.308KB] or [+27.529%; +27.541%]
  • ignore execution_time [-290.207µs; +338.535µs] or [-0.145%; +0.169%]
  • ignore throughput [-4089.205op/s; -3692.727op/s] or [-3.182%; -2.873%]

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

  • 🟥 allocated_mem [+471 bytes; +472 bytes] or [+9.977%; +9.987%]
  • 🟩 execution_time [-15.674ms; -11.504ms] or [-7.320%; -5.373%]
  • ignore throughput [+5218.042op/s; +7991.645op/s] or [+3.809%; +5.833%]

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

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+27.502%; +27.510%]
  • ignore execution_time [-12.359ms; -8.231ms] or [-5.885%; -3.920%]
  • ignore throughput [+407.062op/s; +2677.889op/s] or [+0.368%; +2.421%]

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

  • 🟥 allocated_mem [+1.307KB; +1.307KB] or [+105.746%; +105.759%]
  • ignore execution_time [-903.467µs; -395.956µs] or [-0.450%; -0.197%]
  • 🟥 throughput [-250571.617op/s; -247061.237op/s] or [-25.585%; -25.226%]

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

  • 🟥 allocated_mem [+471 bytes; +472 bytes] or [+38.558%; +38.566%]
  • 🟩 execution_time [-25.852ms; -21.000ms] or [-11.529%; -9.365%]
  • ignore throughput [-57103.851op/s; -34360.829op/s] or [-6.100%; -3.671%]

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

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+105.292%; +105.304%]
  • ignore execution_time [-2890.799µs; +1394.329µs] or [-1.443%; +0.696%]
  • 🟥 throughput [-145374.287op/s; -129275.776op/s] or [-20.887%; -18.574%]

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

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.007%; +0.003%]
  • ignore execution_time [-1121.788µs; -68.319µs] or [-0.559%; -0.034%]
  • ignore throughput [-83.718op/s; +721.714op/s] or [-0.056%; +0.486%]

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

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.004%; +0.003%]
  • ignore execution_time [-2407.288µs; +1130.285µs] or [-1.215%; +0.570%]
  • 🟩 throughput [+11850.837op/s; +14803.156op/s] or [+7.540%; +9.419%]

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

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.007%; +0.003%]
  • ignore execution_time [+1.817ms; +5.814ms] or [+0.927%; +2.964%]
  • 🟩 throughput [+7642.076op/s; +10270.102op/s] or [+6.088%; +8.181%]

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

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.008%; +0.004%]
  • ignore execution_time [-253.254µs; -30.433µs] or [-0.126%; -0.015%]
  • ignore throughput [+72083.109op/s; +79461.051op/s] or [+2.193%; +2.417%]

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

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.006%; +0.008%]
  • ignore execution_time [-3.214ms; -2.353ms] or [-1.589%; -1.163%]
  • 🟩 throughput [+454305.554op/s; +482197.973op/s] or [+15.148%; +16.079%]

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

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.004%; +0.004%]
  • 🟩 execution_time [-19.068ms; -14.691ms] or [-8.789%; -6.772%]
  • 🟩 throughput [+202171.079op/s; +257212.594op/s] or [+8.025%; +10.209%]

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

  • ignore allocated_mem [+1 bytes; +4 bytes] or [+0.004%; +0.012%]
  • 🟥 execution_time [+300.007ms; +300.627ms] or [+149.903%; +150.213%]
  • ignore throughput [+154.699op/s; +172.068op/s] or [+1.709%; +1.900%]

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

  • ignore allocated_mem [-1 bytes; +2 bytes] or [-0.004%; +0.008%]
  • 🟥 execution_time [+299.778ms; +306.291ms] or [+151.179%; +154.463%]
  • ignore throughput [+296.754op/s; +548.098op/s] or [+2.270%; +4.192%]

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

  • ignore allocated_mem [-1 bytes; +2 bytes] or [-0.004%; +0.008%]
  • 🟥 execution_time [+299.568ms; +309.139ms] or [+150.899%; +155.720%]
  • ignore throughput [-25.102op/s; +172.320op/s] or [-0.242%; +1.664%]

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

  • ignore allocated_mem [+3 bytes; +4 bytes] or [+0.186%; +0.199%]
  • 🟥 execution_time [+297.597ms; +298.430ms] or [+146.168%; +146.577%]
  • ignore throughput [-4.500op/s; +0.808op/s] or [-0.119%; +0.021%]

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

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.004%; +0.009%]
  • 🟥 execution_time [+294.364ms; +296.225ms] or [+143.904%; +144.814%]
  • ignore throughput [+115.489op/s; +164.845op/s] or [+1.678%; +2.395%]

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

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.004%; +0.009%]
  • 🟥 execution_time [+301.794ms; +302.806ms] or [+150.836%; +151.342%]
  • ignore throughput [+32.581op/s; +51.107op/s] or [+0.647%; +1.014%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark net472

  • ignore allocated_mem [+0 bytes; +0 bytes] or [+nan%; +nan%]
  • ignore execution_time [+3.484µs; +7.246µs] or [+0.715%; +1.488%]
  • ignore throughput [-29.801op/s; -14.420op/s] or [-1.451%; -0.702%]

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

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.000%; +0.010%]
  • ignore execution_time [+15.654µs; +42.259µs] or [+3.590%; +9.692%]
  • ignore throughput [-209.060op/s; -89.346op/s] or [-9.089%; -3.884%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark netcoreapp3.1

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.003%; +0.003%]
  • ignore execution_time [+9.790µs; +31.772µs] or [+2.098%; +6.807%]
  • ignore throughput [-155.251op/s; -74.397op/s] or [-7.167%; -3.434%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack net472

  • ignore allocated_mem [+0 bytes; +0 bytes] or [+nan%; +nan%]
  • ignore execution_time [-5.160µs; -1.442µs] or [-1.393%; -0.389%]
  • ignore throughput [+11.048op/s; +37.851op/s] or [+0.409%; +1.402%]

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

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.003%; +0.007%]
  • 🟥 execution_time [+21.653µs; +45.227µs] or [+6.913%; +14.439%]
  • 🟥 throughput [-422.126op/s; -223.726op/s] or [-13.159%; -6.974%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack netcoreapp3.1

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.003%; +0.003%]
  • ignore execution_time [-11644.455ns; +10732.455ns] or [-3.185%; +2.936%]
  • ignore throughput [-113.930op/s; +19.605op/s] or [-4.089%; +0.704%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • ignore allocated_mem [+0 bytes; +0 bytes] or [+nan%; +nan%]
  • 🟥 execution_time [+299.570ms; +300.228ms] or [+149.516%; +149.844%]
  • ignore throughput [-1597961.658op/s; -1035052.735op/s] or [-0.800%; -0.518%]

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

  • ignore allocated_mem [+101 bytes; +103 bytes] or [+0.564%; +0.575%]
  • unstable execution_time [+368.812ms; +405.188ms] or [+400.730%; +440.253%]
  • 🟩 throughput [+1052.402op/s; +1209.230op/s] or [+8.648%; +9.936%]

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

  • ignore allocated_mem [+20 bytes; +22 bytes] or [+0.099%; +0.110%]
  • unstable execution_time [+270.151ms; +317.649ms] or [+205.123%; +241.188%]
  • 🟩 throughput [+686.630op/s; +887.754op/s] or [+6.647%; +8.594%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • ignore allocated_mem [+2.707KB; +2.711KB] or [+4.809%; +4.817%]
  • unstable execution_time [+247.887ms; +304.584ms] or [+113.976%; +140.045%]
  • 🟥 throughput [-533.195op/s; -457.066op/s] or [-48.313%; -41.415%]

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

  • ignore allocated_mem [-1.274KB; -1.272KB] or [-3.005%; -3.000%]
  • unstable execution_time [+202.959ms; +336.171ms] or [+86.493%; +143.262%]
  • 🟥 throughput [-744.467op/s; -661.051op/s] or [-49.656%; -44.092%]

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

  • ignore allocated_mem [+756 bytes; +759 bytes] or [+1.785%; +1.793%]
  • 🟥 execution_time [+335.688ms; +342.621ms] or [+200.780%; +204.927%]
  • 🟥 throughput [-397.589op/s; -362.413op/s] or [-27.684%; -25.234%]

scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net472

  • ignore allocated_mem [+0 bytes; +0 bytes] or [+nan%; +nan%]
  • ignore execution_time [-44.503µs; -15.836µs] or [-2.240%; -0.797%]
  • ignore throughput [+4.802op/s; +12.057op/s] or [+0.954%; +2.396%]

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

  • ignore allocated_mem [+0 bytes; +0 bytes] or [+nan%; +nan%]
  • ignore execution_time [-29.569µs; +12.806µs] or [-2.031%; +0.880%]
  • ignore throughput [-1.538op/s; +15.976op/s] or [-0.224%; +2.326%]

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

  • ignore allocated_mem [+0 bytes; +0 bytes] or [+nan%; +nan%]
  • ignore execution_time [-200.889µs; -110.815µs] or [-6.989%; -3.855%]
  • ignore throughput [+14.486op/s; +33.457op/s] or [+4.164%; +9.617%]

scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool net472

  • ignore allocated_mem [+0 bytes; +0 bytes] or [+nan%; +nan%]
  • ignore execution_time [-13.478µs; -7.874µs] or [-1.164%; -0.680%]
  • ignore throughput [+6.029op/s; +10.222op/s] or [+0.698%; +1.183%]

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

  • ignore allocated_mem [+0 bytes; +0 bytes] or [+nan%; +nan%]
  • ignore execution_time [-51.115µs; -40.002µs] or [-4.741%; -3.710%]
  • ignore throughput [+36.379op/s; +46.626op/s] or [+3.922%; +5.027%]

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

  • ignore allocated_mem [+0 bytes; +0 bytes] or [+nan%; +nan%]
  • ignore execution_time [-114.847µs; -13.242µs] or [-6.153%; -0.709%]
  • unstable throughput [+9.747op/s; +76.011op/s] or [+1.819%; +14.188%]

scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice net472

  • ignore allocated_mem [-43 bytes; +21 bytes] or [-0.007%; +0.003%]
  • ignore execution_time [+25.442µs; +46.699µs] or [+0.994%; +1.824%]
  • ignore throughput [-6.811op/s; -3.725op/s] or [-1.744%; -0.954%]

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

  • ignore allocated_mem [-38 bytes; +46 bytes] or [-0.006%; +0.007%]
  • 🟩 execution_time [-173.522µs; -133.251µs] or [-8.790%; -6.750%]
  • 🟩 throughput [+38.773op/s; +49.659op/s] or [+7.654%; +9.803%]

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

  • ignore allocated_mem [-42 bytes; +23 bytes] or [-0.007%; +0.004%]
  • ignore execution_time [-208.559µs; -109.799µs] or [-5.289%; -2.784%]
  • ignore throughput [+6.961op/s; +17.997op/s] or [+2.745%; +7.097%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.001%; +0.008%]
  • 🟥 execution_time [+303.512ms; +305.472ms] or [+152.843%; +153.830%]
  • ignore throughput [+6961.978op/s; +8715.398op/s] or [+2.240%; +2.804%]

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

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.006%; +0.004%]
  • 🟥 execution_time [+301.746ms; +307.049ms] or [+151.205%; +153.863%]
  • ignore throughput [+20641.006op/s; +26937.940op/s] or [+3.254%; +4.247%]

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

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.006%; +0.004%]
  • 🟥 execution_time [+300.488ms; +303.657ms] or [+150.952%; +152.544%]
  • ignore throughput [+12759.409op/s; +20242.613op/s] or [+2.688%; +4.264%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.008%; +0.004%]
  • 🟥 execution_time [+300.749ms; +301.948ms] or [+151.026%; +151.628%]
  • ignore throughput [+13440.608op/s; +15054.876op/s] or [+4.503%; +5.044%]

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

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.007%; +0.006%]
  • 🟥 execution_time [+298.732ms; +300.967ms] or [+147.710%; +148.815%]
  • ignore throughput [+6592.767op/s; +12204.907op/s] or [+1.062%; +1.966%]

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

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.006%; +0.004%]
  • 🟥 execution_time [+303.864ms; +307.654ms] or [+154.012%; +155.932%]
  • ignore throughput [-1463.200op/s; +7117.125op/s] or [-0.316%; +1.537%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • ignore allocated_mem [+0 bytes; +1 bytes] or [+0.108%; +0.119%]
  • 🟥 execution_time [+301.736ms; +303.252ms] or [+151.444%; +152.205%]
  • ignore throughput [-4940.348op/s; -3015.298op/s] or [-1.282%; -0.782%]

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

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.006%; +0.006%]
  • 🟥 execution_time [+300.108ms; +302.501ms] or [+149.576%; +150.769%]
  • 🟩 throughput [+61571.688op/s; +66618.281op/s] or [+12.226%; +13.228%]

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

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.006%; +0.006%]
  • 🟥 execution_time [+301.296ms; +303.985ms] or [+149.892%; +151.230%]
  • ignore throughput [-15721.057op/s; -9728.796op/s] or [-3.721%; -2.303%]

scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net472

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.003%; +0.006%]
  • ignore execution_time [-1.421ms; -0.583ms] or [-0.706%; -0.290%]
  • ignore throughput [-3012.410op/s; -1413.012op/s] or [-1.211%; -0.568%]

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

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.005%; +0.003%]
  • 🟩 execution_time [-16.094ms; -12.442ms] or [-7.484%; -5.785%]
  • 🟩 throughput [+26949.345op/s; +33582.977op/s] or [+7.393%; +9.213%]

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

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.004%; +0.008%]
  • ignore execution_time [-0.640ms; +3.297ms] or [-0.321%; +1.654%]
  • ignore throughput [+3023.766op/s; +9111.813op/s] or [+1.104%; +3.326%]

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

  • ignore allocated_mem [-4.459KB; -4.431KB] or [-1.623%; -1.613%]
  • unstable execution_time [+10.037µs; +51.020µs] or [+2.479%; +12.602%]
  • ignore throughput [-265.219op/s; -59.919op/s] or [-10.673%; -2.411%]

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

  • 🟩 allocated_mem [-19.156KB; -19.135KB] or [-6.988%; -6.980%]
  • unstable execution_time [-56.932µs; -5.085µs] or [-11.252%; -1.005%]
  • ignore throughput [+34.093op/s; +215.182op/s] or [+1.701%; +10.738%]

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

  • ignore allocated_mem [+81 bytes; +97 bytes] or [+0.030%; +0.035%]
  • ignore execution_time [-48.403µs; +8.170µs] or [-8.388%; +1.416%]
  • ignore throughput [-12.759op/s; +141.014op/s] or [-0.729%; +8.056%]

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

  • ignore allocated_mem [-2 bytes; +2 bytes] or [-0.005%; +0.006%]
  • ignore execution_time [+1.836µs; +3.336µs] or [+3.181%; +5.779%]
  • ignore throughput [-935.696op/s; -519.290op/s] or [-5.399%; -2.997%]

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

  • ignore allocated_mem [-4 bytes; +0 bytes] or [-0.010%; -0.001%]
  • 🟥 execution_time [+6.907µs; +11.135µs] or [+16.327%; +26.321%]
  • 🟥 throughput [-4930.770op/s; -3133.520op/s] or [-20.757%; -13.191%]

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

  • ignore allocated_mem [-1 bytes; +1 bytes] or [-0.002%; +0.002%]
  • unstable execution_time [-12.602µs; -5.284µs] or [-19.551%; -8.198%]
  • 🟩 throughput [+1277.911op/s; +2795.294op/s] or [+7.840%; +17.150%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • ignore allocated_mem [+2 bytes; +3 bytes] or [+0.061%; +0.072%]
  • 🟥 execution_time [+300.590ms; +301.950ms] or [+151.935%; +152.622%]
  • ignore throughput [-122.620op/s; -101.999op/s] or [-2.049%; -1.704%]

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

  • ignore allocated_mem [-1 bytes; +0 bytes] or [-0.027%; -0.017%]
  • 🟥 execution_time [+296.460ms; +299.611ms] or [+150.897%; +152.501%]
  • ignore throughput [-162.037op/s; -78.867op/s] or [-2.010%; -0.978%]

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

  • ignore allocated_mem [-1 bytes; +0 bytes] or [-0.027%; -0.017%]
  • 🟥 execution_time [+300.051ms; +303.037ms] or [+150.213%; +151.707%]
  • ignore throughput [-191.660op/s; -125.273op/s] or [-2.441%; -1.596%]

scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net472

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.005%; +0.005%]
  • ignore execution_time [+297.314µs; +938.343µs] or [+0.148%; +0.468%]
  • ignore throughput [-9216.445op/s; -5136.109op/s] or [-2.551%; -1.422%]

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

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.004%; +0.007%]
  • ignore execution_time [+142.452µs; +860.924µs] or [+0.071%; +0.430%]
  • 🟩 throughput [+43284.935op/s; +46485.236op/s] or [+8.193%; +8.799%]

scenario:Benchmarks.Trace.RedisBenchmark.SendReceive netcoreapp3.1

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.004%; +0.006%]
  • ignore execution_time [+1.114ms; +4.794ms] or [+0.565%; +2.430%]
  • ignore throughput [+4822.634op/s; +12956.350op/s] or [+1.141%; +3.066%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.005%; +0.006%]
  • 🟥 execution_time [+299.358ms; +301.007ms] or [+149.203%; +150.025%]
  • ignore throughput [-1325.615op/s; -352.660op/s] or [-0.875%; -0.233%]

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

  • ignore allocated_mem [+0 bytes; +0 bytes] or [+0.000%; +0.009%]
  • 🟥 execution_time [+302.311ms; +303.988ms] or [+151.806%; +152.648%]
  • ignore throughput [+5530.889op/s; +6994.548op/s] or [+2.405%; +3.042%]

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

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.004%; +0.003%]
  • 🟥 execution_time [+303.709ms; +306.219ms] or [+154.021%; +155.295%]
  • ignore throughput [+3246.289op/s; +5252.663op/s] or [+1.828%; +2.958%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • ignore allocated_mem [+0 bytes; +0 bytes] or [+nan%; +nan%]
  • 🟥 execution_time [+299.744ms; +300.507ms] or [+149.514%; +149.895%]
  • 🟩 throughput [+61044657.599op/s; +61316539.341op/s] or [+44.457%; +44.655%]

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

  • ignore allocated_mem [+107 bytes; +109 bytes] or [+0.628%; +0.638%]
  • unstable execution_time [+373.765ms; +408.392ms] or [+464.843%; +507.908%]
  • 🟩 throughput [+1050.100op/s; +1233.865op/s] or [+8.118%; +9.538%]

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

  • ignore allocated_mem [+0 bytes; +0 bytes] or [+nan%; +nan%]
  • 🟥 execution_time [+299.226ms; +300.135ms] or [+149.247%; +149.700%]
  • ignore throughput [+1771771.506op/s; +2708635.602op/s] or [+0.785%; +1.200%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net472

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.005%; +0.006%]
  • ignore execution_time [+494.958µs; +997.095µs] or [+0.248%; +0.499%]
  • ignore throughput [-16631.764op/s; -13964.097op/s] or [-1.856%; -1.558%]

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

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.005%; +0.007%]
  • ignore execution_time [-4.875ms; -3.761ms] or [-2.387%; -1.842%]
  • 🟩 throughput [+103234.214op/s; +112002.555op/s] or [+9.639%; +10.457%]

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

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.003%; +0.006%]
  • ignore execution_time [+3.090ms; +7.339ms] or [+1.563%; +3.714%]
  • 🟩 throughput [+56900.379op/s; +76228.304op/s] or [+6.586%; +8.823%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net472

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.000%; +0.009%]
  • ignore execution_time [-607.689µs; +520.124µs] or [-0.304%; +0.260%]
  • ignore throughput [-10997.837op/s; -5267.535op/s] or [-1.007%; -0.482%]

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

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.004%; +0.004%]
  • ignore execution_time [+5.767ms; +9.858ms] or [+3.005%; +5.136%]
  • 🟩 throughput [+103835.921op/s; +133390.532op/s] or [+8.037%; +10.325%]

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

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.001%; +0.008%]
  • ignore execution_time [-2.446ms; -1.023ms] or [-1.202%; -0.503%]
  • 🟩 throughput [+77832.956op/s; +87761.238op/s] or [+7.730%; +8.716%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net472

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.008%; +0.002%]
  • ignore execution_time [-2.428ms; -1.213ms] or [-1.208%; -0.604%]
  • ignore throughput [-2754.819op/s; +121.763op/s] or [-0.614%; +0.027%]

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

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.004%; +0.009%]
  • ignore execution_time [-537.135µs; +891.527µs] or [-0.268%; +0.445%]
  • 🟩 throughput [+54803.722op/s; +59438.218op/s] or [+9.951%; +10.793%]

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

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.006%; +0.004%]
  • ignore execution_time [+2.253ms; +6.342ms] or [+1.132%; +3.187%]
  • 🟩 throughput [+25351.554op/s; +35168.985op/s] or [+5.675%; +7.872%]

scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net472

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.005%; +0.006%]
  • ignore execution_time [-615.107µs; +500.574µs] or [-0.307%; +0.249%]
  • 🟥 throughput [-46811.699op/s; -42383.561op/s] or [-6.851%; -6.203%]

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

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.005%; +0.007%]
  • ignore execution_time [-0.714ms; +2.802ms] or [-0.357%; +1.401%]
  • 🟩 throughput [+51247.379op/s; +68900.277op/s] or [+5.726%; +7.698%]

scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin netcoreapp3.1

  • ignore allocated_mem [+0 bytes; +0 bytes] or [-0.005%; +0.005%]
  • ignore execution_time [+0.772ms; +4.680ms] or [+0.392%; +2.377%]
  • ignore throughput [+18478.557op/s; +33069.209op/s] or [+2.580%; +4.617%]

@andrewlock
andrewlock force-pushed the andrew/update-vendors branch from 7ea4e03 to ffcd2fb Compare April 21, 2026 10:18
@andrewlock
andrewlock merged commit ac962de into master Apr 22, 2026
137 of 139 checks passed
@andrewlock
andrewlock deleted the andrew/update-vendors branch April 22, 2026 10:48
@github-actions github-actions Bot added this to the vNext-v3 milestone Apr 22, 2026
andrewlock added a commit that referenced this pull request Apr 22, 2026
## Summary of changes

Use the built-in _System.Reflection.Metadata_ types for .NET Core 3.1+

## Reason for change

In #6726, we switched from always using the vendored System.Memory and
other BCL types, to using the built-in versions for .NET Core 3.1 where
they're available. This was done with the goal of reducing artifact
size, while also hopefully improving consistency, and potentially
improving performance.

Separately, we're working on updating our vendored code to make updating
it more repeatable (see #8391). This flagged a variety of modifications
we'd made to the vendored System.Reflection.Metadata code to be able to
use internal members.

Rather than include those modifications in the updated vendored code,
this PR updates our _existing_ usages to _not_ use those internal
members in any scenario. This also means we can _stop_ using the
vendored code for .NET Core 3.1+.

## Implementation details

- Add pollyfil for `Hash` type used by Debugger code, which was internal
to _System.Reflection.Metadata_
- Note that although this was called `FNV1aHash`, it _isn't_ using
`FNV1a`, so I chose to call it simple hash (as that's what it's doing, a
simple "hash code" calculation).
- If these hashes _should_ be using FNV1A, then that should be addressed
separately
- Update namespaces to use the built-in versions where appropriate
- These are intentionally _not_ added to `GlobalUsings.cs`, because
doing so causes a variety of namespace collisions across our vendored
code (Newtonsoft.Json, dnlib)
  - A couple of unused `using` statements needed removing.
- Stop using internal members on `MethodDefinition`
- In some cases, there are simple replacements available, e.g. replacing
`FromRowId`.
- Removing usages of `MethodDefinition.Handle` was a little more
painful, as it required more refactoring, but fundamentally we were
always deriving a `MethodDefinition` _from_ a `MethodDefinitionHandle`,
so the changes are mostly a minor inconvenience, but they now only use
public APIs.

## Test coverage

Should be covered by existing tests; all these changes are just
"refactorings", nothing additional.


### Assembly size comparison

| Runtime         | Before   | After    | Diff    | %
|-----------------|----------|----------|---------|-------
| `netcoreapp3.1` | 7,919.5 KB | 7,484.0 KB | -435.5 KB | -5.50%
| `net6.0`        | 8,016.5 KB | 7,581.5 KB | -435 KB | -5.43%

### Estimated size per namespace

#### Before (`net6.0`)

```
Total 7.15 MB (100.0%)
 └── Datadog 7.08 MB (99.1%)
     └── Trace 7.08 MB (99.1%)
         └── VendoredMicrosoftCode 0.54 MB (7.5%)
             └── System 0.54 MB (7.5%)
                 └── Reflection 0.52 MB (7.3%)
                     ├── Metadata 0.42 MB (5.8%)
                     ├── PortableExecutable 0.07 MB (1.0%)
                     └── Internal 0.03 MB (0.4%)
```

#### After (`net6.0`) (all gone)

```
Total 6.72 MB (100.0%)
 └── Datadog 6.66 MB (99.1%)
     └── Trace 6.66 MB (99.1%)
```

## Other details

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

Part of a stack updating our vendored system code
- #8391
andrewlock added a commit that referenced this pull request Apr 22, 2026
## Summary of changes

- Remove some unused types from System.Reflection.Metadata (mostly
around builder/writer infrastructure that was unused)
- Update the vendored version of System.Reflection.Metadata to use the
runtime repo directly, and bump to latest patch version

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

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

Part of a stack updating our vendored system code

- #8391

- #8454
<!-- https://www.nuget.org/packages/System.Collections.Immutable/7.0.0 -->
<PackageReference Include="System.Collections.Immutable" Version="7.0.0" />
<!-- https://www.nuget.org/packages/System.Collections.Immutable/7.0.20 -->
<PackageReference Include="System.Collections.Immutable" Version="7.0.20" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I assume there's a reason we can't go higher than 7.x?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Not necessarily, but potentially 😄 The important thing for me was to get the update process repeatable, and get on the latest of the available patches. Subsequently, we can look at bumping this (and others) higher, in follow ups 🙂

andrewlock added a commit that referenced this pull request Apr 23, 2026
## 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](https://www.nuget.org/packages/System.Memory/4.6.3#dependencies-body-tab)
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

- #8391
- #8454
- #8455
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:tools area:vendors Code from other vendors

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants