Skip to content

Pre-cache reference assemblies as package references in analyzers tests#7959

Merged
NachoEchevarria merged 2 commits intomasterfrom
nacho/CachePackagesForAnalyzerUnitTests
Dec 18, 2025
Merged

Pre-cache reference assemblies as package references in analyzers tests#7959
NachoEchevarria merged 2 commits intomasterfrom
nacho/CachePackagesForAnalyzerUnitTests

Conversation

@NachoEchevarria
Copy link
Collaborator

Summary of changes

Pre-cache reference assemblies as package references in Datadog.Trace.Tools.Analyzers.Tests to prevent flaky test failures caused by NuGet 503 errors during test runtime.

Reason for change

The analyzer tests experience intermittent failures in CI when NuGet.org returns 503 errors. This happens because Microsoft.CodeAnalysis.Testing framework dynamically downloads reference assemblies (e.g., Microsoft.NETCore.App.Ref, NETStandard.Library) at test runtime to compile analyzer test code snippets.

Example error:
NuGet.Protocol.Core.Types.FatalProtocolException : An error occurred while retrieving package metadata for 'Microsoft.NETCore.App.Ref.3.1.0' from source 'nuget.org'.

The issue occurs because while build-time packages are restored during the Restore target, the Microsoft.CodeAnalysis.Testing framework requires additional reference assemblies that aren't direct dependencies of the test project. When these aren't in the local NuGet cache, the framework attempts to download them at runtime, which fails when NuGet.org is experiencing issues.

Implementation details

Added conditional package references to tracer/test/Datadog.Trace.Tools.Analyzers.Tests/Datadog.Trace.Tools.Analyzers.Tests.csproj based on actual runtime monitoring of which packages are requested during test execution:

Package mapping by target framework:

  • .NET Framework (TargetFrameworkIdentifier == '.NETFramework'):
    • Microsoft.NETFramework.ReferenceAssemblies.net472 1.0.2
  • .NET Core 2.1/3.0 (TargetFramework == 'netcoreapp2.1' OR 'netcoreapp3.0'):
    • NETStandard.Library 2.0.3
    • Microsoft.NETCore.Platforms 1.1.0
  • .NET Core 3.1 and .NET 5+ (TargetFrameworkIdentifier == '.NETCoreApp' AND NOT netcoreapp2.1/3.0):
    • Microsoft.NETCore.App.Ref 3.1.0

All packages use PrivateAssets="all" ExcludeAssets="all" to:

  • Download packages during the Restore target
  • Store them in the NuGet global cache
  • Exclude them from build to avoid compatibility issues
  • Make them available for Microsoft.CodeAnalysis.Testing at test runtime

Added NoWarn suppression for NU1605 (package downgrade warning) since Microsoft.NETCore.Platforms 1.1.0 is intentionally used despite being an older version.

Test coverage

  • Validated locally by running analyzer tests across all target frameworks (netcoreapp2.1, netcoreapp3.0, netcoreapp3.1, net5.0, net6.0, net7.0, net8.0, net9.0, net10.0, net48).
  • Reproduced locally the issue by removing nuget cache files, compiling and running tests without internet connection.
  • Used Process Monitor to check the nuget requested at runtime for each framework.

Other details

@NachoEchevarria NachoEchevarria changed the title Pre download required packages Pre-cache reference assemblies as package references in Datadog.Trace.Tools.Analyzers.Tests Dec 17, 2025
@github-actions github-actions bot added the area:tests unit tests, integration tests label Dec 17, 2025
@NachoEchevarria NachoEchevarria changed the title Pre-cache reference assemblies as package references in Datadog.Trace.Tools.Analyzers.Tests Pre-cache reference assemblies as package references in analyzers tests Dec 17, 2025
@datadog-official
Copy link

datadog-official bot commented Dec 17, 2025

⚠️ Tests

Fix all issues with Cursor

⚠️ Warnings

❄️ 1 New flaky test detected

SubmitsOtlpLogs from Datadog.Trace.ClrProfiler.IntegrationTests.OpenTelemetrySdkTests (Datadog) (Fix with Cursor)
Expected logsData not to be empty.

ℹ️ Info

🧪 All tests passed

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: ff249c5 | Docs | Datadog PR Page | Was this helpful? Give us feedback!

@dd-trace-dotnet-ci-bot
Copy link

dd-trace-dotnet-ci-bot bot commented Dec 17, 2025

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (7959) 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
duration68.06 ± (68.04 - 68.27) ms68.02 ± (68.04 - 68.27) ms-0.1%
.NET Framework 4.8 - Bailout
duration71.87 ± (71.76 - 71.92) ms71.80 ± (71.73 - 71.90) ms-0.1%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration999.92 ± (1003.07 - 1010.54) ms1000.65 ± (1000.43 - 1006.35) ms+0.1%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms21.93 ± (21.89 - 21.97) ms21.92 ± (21.88 - 21.95) ms-0.1%
process.time_to_main_ms78.38 ± (78.24 - 78.53) ms78.56 ± (78.38 - 78.74) ms+0.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.90 ± (10.90 - 10.91) MB10.93 ± (10.93 - 10.94) MB+0.3%✅⬆️
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms21.80 ± (21.77 - 21.82) ms21.74 ± (21.71 - 21.76) ms-0.3%
process.time_to_main_ms79.56 ± (79.46 - 79.65) ms79.52 ± (79.42 - 79.62) ms-0.0%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.94 ± (10.94 - 10.94) MB10.94 ± (10.93 - 10.94) MB-0.0%
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms211.00 ± (209.51 - 212.48) ms211.64 ± (209.56 - 213.72) ms+0.3%✅⬆️
process.time_to_main_ms471.11 ± (470.58 - 471.64) ms472.14 ± (471.56 - 472.73) ms+0.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.04 ± (48.02 - 48.05) MB48.08 ± (48.06 - 48.10) MB+0.1%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.0%
.NET 6 - Baseline
process.internal_duration_ms20.63 ± (20.60 - 20.66) ms20.69 ± (20.66 - 20.72) ms+0.3%✅⬆️
process.time_to_main_ms67.79 ± (67.65 - 67.92) ms68.23 ± (68.08 - 68.39) ms+0.7%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.60 ± (10.60 - 10.60) MB10.62 ± (10.62 - 10.63) MB+0.2%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms20.65 ± (20.62 - 20.67) ms20.57 ± (20.54 - 20.59) ms-0.4%
process.time_to_main_ms68.73 ± (68.67 - 68.78) ms68.85 ± (68.79 - 68.91) ms+0.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.66 ± (10.66 - 10.67) MB10.66 ± (10.66 - 10.67) MB-0.0%
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms199.18 ± (197.97 - 200.40) ms200.02 ± (199.03 - 201.02) ms+0.4%✅⬆️
process.time_to_main_ms437.63 ± (437.05 - 438.22) ms439.94 ± (439.29 - 440.58) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.15 ± (48.08 - 48.23) MB48.25 ± (48.19 - 48.32) MB+0.2%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.1%
.NET 8 - Baseline
process.internal_duration_ms18.74 ± (18.71 - 18.76) ms18.79 ± (18.75 - 18.82) ms+0.3%✅⬆️
process.time_to_main_ms66.79 ± (66.70 - 66.89) ms67.01 ± (66.90 - 67.12) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.66 ± (7.66 - 7.67) MB7.66 ± (7.65 - 7.66) MB-0.1%
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms18.69 ± (18.67 - 18.71) ms18.75 ± (18.72 - 18.77) ms+0.3%✅⬆️
process.time_to_main_ms67.82 ± (67.76 - 67.88) ms67.96 ± (67.90 - 68.01) ms+0.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.72 ± (7.71 - 7.73) MB7.70 ± (7.70 - 7.71) MB-0.2%
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms177.94 ± (176.98 - 178.90) ms178.99 ± (178.31 - 179.68) ms+0.6%✅⬆️
process.time_to_main_ms422.98 ± (422.46 - 423.50) ms422.99 ± (422.48 - 423.50) ms+0.0%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed36.24 ± (36.20 - 36.28) MB36.37 ± (36.35 - 36.39) MB+0.4%✅⬆️
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)+0.2%✅⬆️

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration192.16 ± (192.34 - 193.18) ms193.77 ± (193.57 - 194.28) ms+0.8%✅⬆️
.NET Framework 4.8 - Bailout
duration196.86 ± (196.68 - 197.34) ms197.88 ± (197.85 - 198.47) ms+0.5%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1109.63 ± (1113.57 - 1122.70) ms1118.09 ± (1120.38 - 1130.60) ms+0.8%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms188.06 ± (187.63 - 188.49) ms188.94 ± (188.56 - 189.32) ms+0.5%✅⬆️
process.time_to_main_ms80.56 ± (80.33 - 80.78) ms81.31 ± (81.05 - 81.56) ms+0.9%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.06 ± (16.04 - 16.09) MB16.14 ± (16.12 - 16.17) MB+0.5%✅⬆️
runtime.dotnet.threads.count20 ± (19 - 20)20 ± (20 - 20)+0.5%✅⬆️
.NET Core 3.1 - Bailout
process.internal_duration_ms186.58 ± (186.28 - 186.87) ms187.60 ± (187.25 - 187.94) ms+0.5%✅⬆️
process.time_to_main_ms81.71 ± (81.60 - 81.82) ms82.43 ± (82.27 - 82.60) ms+0.9%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.17 ± (16.14 - 16.20) MB16.21 ± (16.18 - 16.24) MB+0.2%✅⬆️
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (20 - 21)-0.2%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms403.34 ± (400.15 - 406.53) ms396.79 ± (393.97 - 399.60) ms-1.6%
process.time_to_main_ms474.66 ± (474.14 - 475.18) ms476.12 ± (475.45 - 476.79) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed58.39 ± (58.24 - 58.54) MB58.52 ± (58.37 - 58.67) MB+0.2%✅⬆️
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 30)+0.1%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms191.87 ± (191.58 - 192.16) ms193.66 ± (193.22 - 194.10) ms+0.9%✅⬆️
process.time_to_main_ms69.76 ± (69.60 - 69.92) ms70.27 ± (70.06 - 70.47) ms+0.7%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.17 ± (16.02 - 16.31) MB16.31 ± (16.22 - 16.40) MB+0.9%✅⬆️
runtime.dotnet.threads.count18 ± (18 - 18)19 ± (19 - 19)+3.9%✅⬆️
.NET 6 - Bailout
process.internal_duration_ms190.83 ± (190.58 - 191.07) ms192.31 ± (191.94 - 192.68) ms+0.8%✅⬆️
process.time_to_main_ms70.46 ± (70.38 - 70.54) ms71.03 ± (70.90 - 71.16) ms+0.8%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed15.94 ± (15.78 - 16.11) MB16.11 ± (15.96 - 16.25) MB+1.0%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+0.6%✅⬆️
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms404.23 ± (402.40 - 406.05) ms409.96 ± (407.66 - 412.27) ms+1.4%✅⬆️
process.time_to_main_ms443.40 ± (442.76 - 444.05) ms445.29 ± (444.69 - 445.89) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed59.02 ± (58.87 - 59.16) MB59.14 ± (59.01 - 59.26) MB+0.2%✅⬆️
runtime.dotnet.threads.count30 ± (29 - 30)30 ± (29 - 30)-0.1%
.NET 8 - Baseline
process.internal_duration_ms189.29 ± (189.04 - 189.54) ms191.02 ± (190.63 - 191.42) ms+0.9%✅⬆️
process.time_to_main_ms69.16 ± (69.00 - 69.32) ms69.97 ± (69.75 - 70.20) ms+1.2%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.75 ± (11.71 - 11.78) MB11.77 ± (11.74 - 11.80) MB+0.2%✅⬆️
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 18)-0.2%
.NET 8 - Bailout
process.internal_duration_ms189.39 ± (189.02 - 189.76) ms190.00 ± (189.74 - 190.26) ms+0.3%✅⬆️
process.time_to_main_ms70.27 ± (70.13 - 70.41) ms70.79 ± (70.67 - 70.90) ms+0.7%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.78 ± (11.74 - 11.81) MB11.82 ± (11.80 - 11.84) MB+0.4%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-0.1%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms365.35 ± (363.92 - 366.79) ms364.37 ± (362.95 - 365.79) ms-0.3%
process.time_to_main_ms428.97 ± (428.33 - 429.62) ms428.79 ± (428.20 - 429.38) ms-0.0%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed48.00 ± (47.97 - 48.03) MB47.95 ± (47.92 - 47.98) MB-0.1%
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 29)+1.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 (7959) - mean (68ms)  : 67, 70
    master - mean (68ms)  : 67, 70

    section Bailout
    This PR (7959) - mean (72ms)  : 71, 73
    master - mean (72ms)  : 71, 73

    section CallTarget+Inlining+NGEN
    This PR (7959) - mean (1,003ms)  : 966, 1041
    master - mean (1,007ms)  : 954, 1060

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 (7959) - mean (106ms)  : 103, 108
    master - mean (106ms)  : 103, 108

    section Bailout
    This PR (7959) - mean (106ms)  : 105, 108
    master - mean (106ms)  : 105, 108

    section CallTarget+Inlining+NGEN
    This PR (7959) - mean (711ms)  : 676, 747
    master - mean (710ms)  : 680, 740

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7959) - mean (94ms)  : 91, 96
    master - mean (93ms)  : 91, 95

    section Bailout
    This PR (7959) - mean (94ms)  : 93, 95
    master - mean (94ms)  : 93, 95

    section CallTarget+Inlining+NGEN
    This PR (7959) - mean (666ms)  : 643, 689
    master - mean (663ms)  : 641, 685

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7959) - mean (92ms)  : 89, 94
    master - mean (91ms)  : 90, 93

    section Bailout
    This PR (7959) - mean (93ms)  : 92, 93
    master - mean (92ms)  : 91, 94

    section CallTarget+Inlining+NGEN
    This PR (7959) - mean (629ms)  : 612, 646
    master - mean (628ms)  : 615, 641

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 (7959) - mean (194ms)  : 190, 197
    master - mean (193ms)  : 189, 197

    section Bailout
    This PR (7959) - mean (198ms)  : 195, 201
    master - mean (197ms)  : 194, 200

    section CallTarget+Inlining+NGEN
    This PR (7959) - mean (1,125ms)  : 1056, 1195
    master - mean (1,118ms)  : 1051, 1185

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 (7959) - mean (279ms)  : 271, 286
    master - mean (277ms)  : 271, 283

    section Bailout
    This PR (7959) - mean (278ms)  : 274, 282
    master - mean (276ms)  : 273, 280

    section CallTarget+Inlining+NGEN
    This PR (7959) - mean (905ms)  : 852, 958
    master - mean (909ms)  : 853, 965

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7959) - mean (272ms)  : 266, 279
    master - mean (270ms)  : 266, 273

    section Bailout
    This PR (7959) - mean (272ms)  : 266, 277
    master - mean (269ms)  : 266, 272

    section CallTarget+Inlining+NGEN
    This PR (7959) - mean (889ms)  : 844, 935
    master - mean (878ms)  : 846, 911

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7959) - mean (271ms)  : 265, 276
    master - mean (268ms)  : 264, 271

    section Bailout
    This PR (7959) - mean (270ms)  : 267, 274
    master - mean (269ms)  : 263, 275

    section CallTarget+Inlining+NGEN
    This PR (7959) - mean (826ms)  : 807, 845
    master - mean (826ms)  : 800, 853

Loading

@NachoEchevarria NachoEchevarria marked this pull request as ready for review December 17, 2025 13:48
@NachoEchevarria NachoEchevarria requested a review from a team as a code owner December 17, 2025 13:48
Copy link
Member

@andrewlock andrewlock left a comment

Choose a reason for hiding this comment

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

Nice, thanks!

…Tools.Analyzers.Tests.csproj

Co-authored-by: Andrew Lock <andrew.lock@datadoghq.com>
@pr-commenter
Copy link

pr-commenter bot commented Dec 17, 2025

Benchmarks

Benchmarks Report for benchmark platform 🐌

Benchmarks for #7959 compared to master:

  • 1 benchmarks are faster, with geometric mean 1.143
  • 2 benchmarks are slower, with geometric mean 1.904
  • 4 benchmarks have fewer allocations
  • 5 benchmarks have more allocations

The following thresholds were used for comparing the benchmark speeds:

  • Mann–Whitney U test with statistical test for significance of 5%
  • Only results indicating a difference greater than 10% and 0.3 ns are considered.

Allocation changes below 0.5% are ignored.

Benchmark details

Benchmarks.Trace.ActivityBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 10.4μs 55.8ns 296ns 0 0 0 5.49 KB
master StartStopWithChild netcoreapp3.1 13.7μs 68.9ns 300ns 0 0 0 5.71 KB
master StartStopWithChild net472 21.9μs 90.8ns 340ns 0.904 0.339 0 6.01 KB
#7959 StartStopWithChild net6.0 11.1μs 53.1ns 206ns 0 0 0 5.5 KB
#7959 StartStopWithChild netcoreapp3.1 14.6μs 25.6ns 99ns 0 0 0 5.72 KB
#7959 StartStopWithChild net472 21.6μs 108ns 494ns 0.896 0.336 0 6 KB
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #7959

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 3.26 KB 3.39 KB 128 B 3.92%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 1.28ms 110ns 410ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 1.37ms 97ns 363ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 1.72ms 205ns 794ns 0 0 0 3.26 KB
#7959 WriteAndFlushEnrichedTraces net6.0 1.27ms 1.46μs 5.64μs 0 0 0 2.7 KB
#7959 WriteAndFlushEnrichedTraces netcoreapp3.1 1.39ms 1.29μs 4.99μs 0 0 0 2.7 KB
#7959 WriteAndFlushEnrichedTraces net472 1.7ms 463ns 1.79μs 0 0 0 3.39 KB
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody net6.0 1.14μs 6.25ns 37ns 0 0 0 1.22 KB
master AllCycleSimpleBody netcoreapp3.1 1.38μs 7.92ns 53.7ns 0 0 0 1.2 KB
master AllCycleSimpleBody net472 1.03μs 0.37ns 1.39ns 0.195 0 0 1.23 KB
master AllCycleMoreComplexBody net6.0 7.41μs 36.9ns 165ns 0 0 0 4.72 KB
master AllCycleMoreComplexBody netcoreapp3.1 8.97μs 42.5ns 175ns 0 0 0 4.62 KB
master AllCycleMoreComplexBody net472 7.72μs 4.4ns 16.5ns 0.732 0 0 4.74 KB
master ObjectExtractorSimpleBody net6.0 327ns 1.84ns 11.5ns 0 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 400ns 2.25ns 13.9ns 0 0 0 272 B
master ObjectExtractorSimpleBody net472 304ns 0.076ns 0.294ns 0.0444 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 6.6μs 29ns 112ns 0 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 7.98μs 6.04ns 23.4ns 0 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 6.79μs 3.38ns 12.2ns 0.577 0 0 3.8 KB
#7959 AllCycleSimpleBody net6.0 1.1μs 5.99ns 35.9ns 0 0 0 1.22 KB
#7959 AllCycleSimpleBody netcoreapp3.1 1.37μs 7.62ns 50ns 0 0 0 1.2 KB
#7959 AllCycleSimpleBody net472 1.03μs 1.31ns 5.08ns 0.194 0 0 1.23 KB
#7959 AllCycleMoreComplexBody net6.0 7.49μs 7.68ns 29.7ns 0 0 0 4.72 KB
#7959 AllCycleMoreComplexBody netcoreapp3.1 9.06μs 43.4ns 184ns 0 0 0 4.62 KB
#7959 AllCycleMoreComplexBody net472 7.65μs 4.3ns 15.5ns 0.727 0 0 4.74 KB
#7959 ObjectExtractorSimpleBody net6.0 341ns 1.87ns 10.6ns 0 0 0 280 B
#7959 ObjectExtractorSimpleBody netcoreapp3.1 398ns 2.01ns 9.2ns 0 0 0 272 B
#7959 ObjectExtractorSimpleBody net472 303ns 0.0107ns 0.0372ns 0.0443 0 0 281 B
#7959 ObjectExtractorMoreComplexBody net6.0 6.47μs 1.47ns 5.5ns 0 0 0 3.78 KB
#7959 ObjectExtractorMoreComplexBody netcoreapp3.1 7.82μs 40.1ns 179ns 0 0 0 3.69 KB
#7959 ObjectExtractorMoreComplexBody net472 6.7μs 3.79ns 14.7ns 0.57 0 0 3.8 KB
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed ✔️ Fewer allocations 🎉

Fewer allocations 🎉 in #7959

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs‑net6.0 2.16 KB 2.14 KB -18 B -0.83%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EncodeArgs net6.0 76.1μs 292ns 1.09μs 0 0 0 32.4 KB
master EncodeArgs netcoreapp3.1 97.1μs 251ns 971ns 0 0 0 32.4 KB
master EncodeArgs net472 108μs 10.3ns 39.8ns 4.89 0 0 32.5 KB
master EncodeLegacyArgs net6.0 143μs 47.5ns 171ns 0 0 0 2.16 KB
master EncodeLegacyArgs netcoreapp3.1 198μs 331ns 1.28μs 0 0 0 2.14 KB
master EncodeLegacyArgs net472 264μs 42.8ns 166ns 0 0 0 2.14 KB
#7959 EncodeArgs net6.0 77.7μs 232ns 867ns 0 0 0 32.4 KB
#7959 EncodeArgs netcoreapp3.1 98.5μs 181ns 676ns 0 0 0 32.4 KB
#7959 EncodeArgs net472 108μs 10.5ns 39.4ns 4.88 0 0 32.5 KB
#7959 EncodeLegacyArgs net6.0 143μs 13.6ns 52.5ns 0 0 0 2.14 KB
#7959 EncodeLegacyArgs netcoreapp3.1 199μs 64.3ns 249ns 0 0 0 2.14 KB
#7959 EncodeLegacyArgs net472 265μs 38.6ns 149ns 0 0 0 2.15 KB
Benchmarks.Trace.Asm.AppSecWafBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunWafRealisticBenchmark net6.0 423μs 2.03μs 11.3μs 0 0 0 4.55 KB
master RunWafRealisticBenchmark netcoreapp3.1 466μs 2.78μs 26.3μs 0 0 0 4.48 KB
master RunWafRealisticBenchmark net472 486μs 426ns 1.54μs 0 0 0 0 b
master RunWafRealisticBenchmarkWithAttack net6.0 305μs 887ns 3.2μs 0 0 0 2.24 KB
master RunWafRealisticBenchmarkWithAttack netcoreapp3.1 329μs 1.38μs 5.16μs 0 0 0 2.22 KB
master RunWafRealisticBenchmarkWithAttack net472 366μs 271ns 976ns 0 0 0 0 b
#7959 RunWafRealisticBenchmark net6.0 424μs 1.57μs 5.65μs 0 0 0 4.55 KB
#7959 RunWafRealisticBenchmark netcoreapp3.1 466μs 3.84μs 36.8μs 0 0 0 4.48 KB
#7959 RunWafRealisticBenchmark net472 487μs 427ns 1.54μs 0 0 0 0 b
#7959 RunWafRealisticBenchmarkWithAttack net6.0 321μs 1.75μs 9.57μs 0 0 0 2.24 KB
#7959 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 376μs 3.71μs 36.7μs 0 0 0 2.22 KB
#7959 RunWafRealisticBenchmarkWithAttack net472 365μs 144ns 520ns 0 0 0 0 b
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Fewer allocations 🎉

Fewer allocations 🎉 in #7959

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.AspNetCoreBenchmark.SendRequest‑netcoreapp3.1 21.34 KB 21.18 KB -155 B -0.73%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendRequest net6.0 84.1μs 165ns 638ns 0 0 0 18.97 KB
master SendRequest netcoreapp3.1 98.4μs 397ns 1.9μs 0 0 0 21.34 KB
master SendRequest net472 0ns 0ns 0ns 0 0 0 0 b
#7959 SendRequest net6.0 85.4μs 109ns 393ns 0 0 0 18.97 KB
#7959 SendRequest netcoreapp3.1 97.4μs 408ns 2.77μs 0 0 0 21.18 KB
#7959 SendRequest net472 0ns 0ns 0ns 0 0 0 0 b
Benchmarks.Trace.CharSliceBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #7959

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1 2.188 853,800.00 1,868,000.00
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑netcoreapp3.1 1.656 1,698,800.00 2,813,900.00

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master OriginalCharSlice net6.0 1.98ms 653ns 2.44μs 0 0 0 640 KB
master OriginalCharSlice netcoreapp3.1 3.92ms 1.18μs 4.43μs 0 0 0 640 KB
master OriginalCharSlice net472 2.71ms 365ns 1.31μs 0 0 0 638.98 KB
master OptimizedCharSlice net6.0 1.38ms 973ns 3.77μs 0 0 0 0 b
master OptimizedCharSlice netcoreapp3.1 1.71ms 9.48μs 60.7μs 0 0 0 0 b
master OptimizedCharSlice net472 2.06ms 642ns 2.49μs 0 0 0 0 b
master OptimizedCharSliceWithPool net6.0 1.01ms 559ns 2.17μs 0 0 0 0 b
master OptimizedCharSliceWithPool netcoreapp3.1 853μs 301ns 2.04μs 0 0 0 0 b
master OptimizedCharSliceWithPool net472 1.21ms 295ns 1.14μs 0 0 0 0 b
#7959 OriginalCharSlice net6.0 2.19ms 1.54μs 5.95μs 0 0 0 640 KB
#7959 OriginalCharSlice netcoreapp3.1 3.97ms 1.34μs 4.84μs 0 0 0 640.05 KB
#7959 OriginalCharSlice net472 2.76ms 1.41μs 5.29μs 0 0 0 638.98 KB
#7959 OptimizedCharSlice net6.0 1.41ms 271ns 939ns 0 0 0 0 b
#7959 OptimizedCharSlice netcoreapp3.1 2.81ms 774ns 2.9μs 0 0 0 0 b
#7959 OptimizedCharSlice net472 1.94ms 504ns 1.82μs 0 0 0 0 b
#7959 OptimizedCharSliceWithPool net6.0 1.03ms 216ns 778ns 0 0 0 0 b
#7959 OptimizedCharSliceWithPool netcoreapp3.1 1.87ms 1.94μs 7.52μs 0 0 0 0 b
#7959 OptimizedCharSliceWithPool net472 1.13ms 335ns 1.3μs 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Faster 🎉 More allocations ⚠️

Faster 🎉 in #7959

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 1.143 967,817.79 846,580.73

More allocations ⚠️ in #7959

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 55.73 KB 56.28 KB 551 B 0.99%
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 41.77 KB 42.05 KB 275 B 0.66%

Fewer allocations 🎉 in #7959

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 43.15 KB 41.98 KB -1.17 KB -2.70%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 655μs 3.22μs 13.3μs 0 0 0 41.77 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 795μs 4.42μs 26.5μs 0 0 0 43.15 KB
master WriteAndFlushEnrichedTraces net472 967μs 3.42μs 12.8μs 4.81 0 0 55.73 KB
#7959 WriteAndFlushEnrichedTraces net6.0 655μs 3.45μs 17.9μs 0 0 0 42.05 KB
#7959 WriteAndFlushEnrichedTraces netcoreapp3.1 731μs 4.25μs 38.9μs 0 0 0 41.98 KB
#7959 WriteAndFlushEnrichedTraces net472 849μs 3.14μs 11.8μs 5.21 0 0 56.28 KB
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteNonQuery net6.0 1.89μs 4.95ns 19.2ns 0 0 0 968 B
master ExecuteNonQuery netcoreapp3.1 2.42μs 9.13ns 35.4ns 0 0 0 960 B
master ExecuteNonQuery net472 2.63μs 3.05ns 11.4ns 0.147 0 0 931 B
#7959 ExecuteNonQuery net6.0 1.82μs 9.25ns 40.3ns 0 0 0 968 B
#7959 ExecuteNonQuery netcoreapp3.1 2.57μs 9.79ns 37.9ns 0 0 0 960 B
#7959 ExecuteNonQuery net472 2.69μs 0.973ns 3.51ns 0.148 0 0 931 B
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net6.0 1.64μs 8.49ns 41.6ns 0 0 0 952 B
master CallElasticsearch netcoreapp3.1 2.16μs 8.7ns 33.7ns 0 0 0 968 B
master CallElasticsearch net472 3.42μs 5.5ns 21.3ns 0.136 0 0 955 B
master CallElasticsearchAsync net6.0 1.76μs 3.13ns 11.3ns 0 0 0 928 B
master CallElasticsearchAsync netcoreapp3.1 2.28μs 10.8ns 44.7ns 0 0 0 1.02 KB
master CallElasticsearchAsync net472 3.54μs 3.34ns 12.5ns 0.16 0 0 1.01 KB
#7959 CallElasticsearch net6.0 1.67μs 7.63ns 29.6ns 0 0 0 952 B
#7959 CallElasticsearch netcoreapp3.1 2.23μs 7.73ns 29.9ns 0 0 0 968 B
#7959 CallElasticsearch net472 3.5μs 5.04ns 19.5ns 0.14 0 0 955 B
#7959 CallElasticsearchAsync net6.0 1.74μs 0.413ns 1.43ns 0 0 0 928 B
#7959 CallElasticsearchAsync netcoreapp3.1 2.36μs 12.4ns 60.6ns 0 0 0 1.02 KB
#7959 CallElasticsearchAsync net472 3.38μs 2.1ns 8.13ns 0.153 0 0 1.01 KB
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net6.0 1.89μs 0.552ns 1.99ns 0 0 0 896 B
master ExecuteAsync netcoreapp3.1 2.37μs 9.03ns 35ns 0 0 0 896 B
master ExecuteAsync net472 2.55μs 2.78ns 10.8ns 0.128 0 0 859 B
#7959 ExecuteAsync net6.0 1.83μs 7.74ns 30ns 0 0 0 896 B
#7959 ExecuteAsync netcoreapp3.1 2.36μs 11.6ns 46.2ns 0 0 0 896 B
#7959 ExecuteAsync net472 2.56μs 0.559ns 2.09ns 0.127 0 0 858 B
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendAsync net6.0 6.59μs 18.9ns 68.2ns 0 0 0 2.29 KB
master SendAsync netcoreapp3.1 8.38μs 24.9ns 96.3ns 0 0 0 2.83 KB
master SendAsync net472 12μs 10.7ns 41.3ns 0.478 0 0 3.08 KB
#7959 SendAsync net6.0 6.72μs 9.88ns 38.2ns 0 0 0 2.29 KB
#7959 SendAsync netcoreapp3.1 8.59μs 17.8ns 69ns 0 0 0 2.83 KB
#7959 SendAsync net472 11.9μs 8.08ns 31.3ns 0.473 0 0 3.08 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #7959

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 247.43 KB 258.73 KB 11.3 KB 4.57%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 250.07 KB 259.03 KB 8.96 KB 3.58%

Fewer allocations 🎉 in #7959

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 273.72 KB 270.34 KB -3.38 KB -1.24%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark net6.0 47.1μs 591ns 5.64μs 0 0 0 42.51 KB
master StringConcatBenchmark netcoreapp3.1 48.1μs 237ns 1.01μs 0 0 0 42.54 KB
master StringConcatBenchmark net472 59.3μs 289ns 1.15μs 0 0 0 49.15 KB
master StringConcatAspectBenchmark net6.0 463μs 2.42μs 12.4μs 0 0 0 250.07 KB
master StringConcatAspectBenchmark netcoreapp3.1 499μs 1.92μs 7.44μs 0 0 0 247.43 KB
master StringConcatAspectBenchmark net472 401μs 2.05μs 14.9μs 0 0 0 273.72 KB
#7959 StringConcatBenchmark net6.0 41.9μs 205ns 821ns 0 0 0 42.51 KB
#7959 StringConcatBenchmark netcoreapp3.1 49.7μs 287ns 2.11μs 0 0 0 42.54 KB
#7959 StringConcatBenchmark net472 56.9μs 120ns 431ns 0 0 0 49.15 KB
#7959 StringConcatAspectBenchmark net6.0 466μs 2.41μs 11.3μs 0 0 0 259.03 KB
#7959 StringConcatAspectBenchmark netcoreapp3.1 478μs 7.29μs 72.5μs 0 0 0 258.73 KB
#7959 StringConcatAspectBenchmark net472 395μs 2.04μs 9.79μs 0 0 0 270.34 KB
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 2.66μs 12.1ns 48.5ns 0 0 0 1.69 KB
master EnrichedLog netcoreapp3.1 3.63μs 12.9ns 50ns 0 0 0 1.7 KB
master EnrichedLog net472 3.8μs 3.12ns 11.7ns 0.248 0 0 1.6 KB
#7959 EnrichedLog net6.0 2.82μs 13.3ns 51.5ns 0 0 0 1.69 KB
#7959 EnrichedLog netcoreapp3.1 3.53μs 12.7ns 49ns 0 0 0 1.7 KB
#7959 EnrichedLog net472 3.83μs 3.56ns 13.3ns 0.249 0 0 1.6 KB
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 123μs 59.3ns 222ns 0 0 0 4.31 KB
master EnrichedLog netcoreapp3.1 127μs 213ns 767ns 0 0 0 4.31 KB
master EnrichedLog net472 166μs 49.5ns 192ns 0 0 0 4.51 KB
#7959 EnrichedLog net6.0 123μs 103ns 372ns 0 0 0 4.31 KB
#7959 EnrichedLog netcoreapp3.1 128μs 217ns 784ns 0 0 0 4.31 KB
#7959 EnrichedLog net472 166μs 63.6ns 246ns 0 0 0 4.51 KB
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 4.97μs 18.5ns 69.4ns 0 0 0 2.24 KB
master EnrichedLog netcoreapp3.1 6.72μs 18.2ns 70.7ns 0 0 0 2.26 KB
master EnrichedLog net472 7.62μs 3.24ns 12.6ns 0.304 0 0 2.05 KB
#7959 EnrichedLog net6.0 5.01μs 19.1ns 73.8ns 0 0 0 2.24 KB
#7959 EnrichedLog netcoreapp3.1 6.96μs 24ns 92.8ns 0 0 0 2.26 KB
#7959 EnrichedLog net472 7.55μs 7.75ns 30ns 0.301 0 0 2.05 KB
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendReceive net6.0 1.91μs 8.46ns 31.6ns 0 0 0 1.12 KB
master SendReceive netcoreapp3.1 2.58μs 10.7ns 41.3ns 0 0 0 1.14 KB
master SendReceive net472 2.97μs 2.29ns 8.57ns 0.164 0 0 1.12 KB
#7959 SendReceive net6.0 1.91μs 2.24ns 8.66ns 0 0 0 1.12 KB
#7959 SendReceive netcoreapp3.1 2.52μs 12.7ns 59.4ns 0 0 0 1.14 KB
#7959 SendReceive net472 2.82μs 2.21ns 8.54ns 0.172 0 0 1.12 KB
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 4.39μs 1.78ns 6.41ns 0 0 0 1.58 KB
master EnrichedLog netcoreapp3.1 6.19μs 13.9ns 53.7ns 0 0 0 1.63 KB
master EnrichedLog net472 6.81μs 7.88ns 30.5ns 0.304 0 0 2.03 KB
#7959 EnrichedLog net6.0 4.51μs 3.83ns 14.3ns 0 0 0 1.58 KB
#7959 EnrichedLog netcoreapp3.1 5.66μs 12.4ns 48.2ns 0 0 0 1.63 KB
#7959 EnrichedLog net472 6.8μs 11.6ns 45ns 0.305 0 0 2.03 KB
Benchmarks.Trace.SpanBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 767ns 1.89ns 7.33ns 0 0 0 520 B
master StartFinishSpan netcoreapp3.1 947ns 4.93ns 25.1ns 0 0 0 520 B
master StartFinishSpan net472 892ns 0.0506ns 0.196ns 0.0808 0 0 522 B
master StartFinishScope net6.0 916ns 4.25ns 17.5ns 0 0 0 640 B
master StartFinishScope netcoreapp3.1 1.14μs 5.74ns 25ns 0 0 0 640 B
master StartFinishScope net472 1.09μs 0.15ns 0.542ns 0.0928 0 0 602 B
master StartFinishTwoScopes net6.0 1.79μs 1.45ns 5.62ns 0 0 0 1.19 KB
master StartFinishTwoScopes netcoreapp3.1 2.19μs 9.43ns 36.5ns 0 0 0 1.19 KB
master StartFinishTwoScopes net472 2.14μs 3.45ns 13.3ns 0.161 0 0 1.08 KB
#7959 StartFinishSpan net6.0 786ns 0.553ns 2.14ns 0 0 0 520 B
#7959 StartFinishSpan netcoreapp3.1 987ns 5.28ns 28.5ns 0 0 0 520 B
#7959 StartFinishSpan net472 893ns 0.337ns 1.26ns 0.0806 0 0 522 B
#7959 StartFinishScope net6.0 921ns 3.42ns 13.3ns 0 0 0 640 B
#7959 StartFinishScope netcoreapp3.1 1.13μs 4.87ns 18.9ns 0 0 0 640 B
#7959 StartFinishScope net472 1.07μs 0.114ns 0.412ns 0.0916 0 0 602 B
#7959 StartFinishTwoScopes net6.0 1.8μs 2.36ns 9.15ns 0 0 0 1.19 KB
#7959 StartFinishTwoScopes netcoreapp3.1 2.2μs 10.6ns 42.3ns 0 0 0 1.19 KB
#7959 StartFinishTwoScopes net472 2.13μs 0.246ns 0.952ns 0.171 0 0 1.08 KB
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 1.04μs 4.92ns 20.3ns 0 0 0 640 B
master RunOnMethodBegin netcoreapp3.1 1.36μs 6.96ns 31.9ns 0 0 0 640 B
master RunOnMethodBegin net472 1.43μs 0.869ns 3.25ns 0.0934 0 0 602 B
#7959 RunOnMethodBegin net6.0 1.05μs 4.92ns 19.1ns 0 0 0 640 B
#7959 RunOnMethodBegin netcoreapp3.1 1.34μs 6.35ns 26.2ns 0 0 0 640 B
#7959 RunOnMethodBegin net472 1.44μs 3.27ns 12.7ns 0.0936 0 0 602 B

<!-- Based on actual runtime monitoring of packages requested during test execution -->

<!-- .NET Framework 4.8 -->
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' ">
Copy link
Member

Choose a reason for hiding this comment

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

Checking TargetFrameworkIdentifier works, but you could also use TargetFramework for consistency with the other checks below. (level of care: low)

<ItemGroup Condition=" '$(TargetFramework)' == 'net48' ">

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, it makes sense, thanks. On the other hand, we usually seem to use '$(TargetFrameworkIdentifier)' == '.NETFramework' in other projects and we dont have any '$(TargetFramework)' == 'net48' even though it's also valid, so I decided to go for that option as it seems to be the default one for this case.

@NachoEchevarria
Copy link
Collaborator Author

Thanks for your feedback and reviews!

@NachoEchevarria NachoEchevarria merged commit 0a75c01 into master Dec 18, 2025
151 checks passed
@NachoEchevarria NachoEchevarria deleted the nacho/CachePackagesForAnalyzerUnitTests branch December 18, 2025 12:49
@github-actions github-actions bot added this to the vNext-v3 milestone Dec 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:tests unit tests, integration tests type:flake-fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants