Skip to content

Gleocadie/add more tests for managed code cache#8308

Draft
gleocadie wants to merge 6 commits intomasterfrom
gleocadie/add_more_tests_for_managed_code_cache
Draft

Gleocadie/add more tests for managed code cache#8308
gleocadie wants to merge 6 commits intomasterfrom
gleocadie/add_more_tests_for_managed_code_cache

Conversation

@gleocadie
Copy link
Collaborator

Summary of changes

Reason for change

Implementation details

Test coverage

Other details

@gleocadie gleocadie added the area:profiler Issues related to the continous-profiler label Mar 16, 2026
@pr-commenter
Copy link

pr-commenter bot commented Mar 16, 2026

Benchmarks

Benchmark execution time: 2026-03-18 17:20:38

Comparing candidate commit d8e77ff in PR branch gleocadie/add_more_tests_for_managed_code_cache with baseline commit 31d5db8 in branch master.

Found 5 performance improvements and 7 performance regressions! Performance is the same for 161 metrics, 19 unstable metrics.

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

  • 🟥 execution_time [+20.812ms; +20.867ms] or [+20.568%; +20.623%]

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

  • 🟥 execution_time [+12.198ms; +18.289ms] or [+6.158%; +9.233%]

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

  • 🟥 execution_time [+9.941ms; +13.437ms] or [+5.004%; +6.764%]

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

  • 🟩 execution_time [-19.148ms; -15.126ms] or [-10.116%; -7.991%]
  • 🟩 throughput [+211.809op/s; +242.843op/s] or [+15.656%; +17.950%]

scenario:Benchmarks.Trace.DbCommandBenchmark.ExecuteNonQuery net6.0

  • 🟩 execution_time [-16.418ms; -12.502ms] or [-7.732%; -5.888%]

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

  • 🟩 execution_time [-107.698ms; -103.416ms] or [-53.439%; -51.314%]

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

  • 🟥 throughput [-14986625.689op/s; -13667278.576op/s] or [-6.254%; -5.703%]

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

  • 🟩 execution_time [-20.058ms; -14.629ms] or [-9.389%; -6.848%]

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

  • 🟥 execution_time [+11.806ms; +16.843ms] or [+5.956%; +8.498%]

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

  • 🟥 execution_time [+11.883ms; +17.556ms] or [+6.063%; +8.957%]

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

  • 🟥 execution_time [+12.198ms; +17.143ms] or [+6.176%; +8.680%]

@gleocadie gleocadie force-pushed the gleocadie/add_more_tests_for_managed_code_cache branch from 0978f63 to f62e8a8 Compare March 17, 2026 08:24
@dd-trace-dotnet-ci-bot
Copy link

dd-trace-dotnet-ci-bot bot commented Mar 17, 2026

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8308) 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
duration71.33 ± (71.37 - 71.59) ms74.02 ± (74.04 - 74.35) ms+3.8%✅⬆️
.NET Framework 4.8 - Bailout
duration75.64 ± (75.53 - 75.77) ms78.57 ± (78.52 - 78.90) ms+3.9%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1058.55 ± (1058.16 - 1063.44) ms1092.49 ± (1092.88 - 1099.63) ms+3.2%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms22.31 ± (22.27 - 22.35) ms23.00 ± (22.95 - 23.05) ms+3.1%✅⬆️
process.time_to_main_ms82.43 ± (82.29 - 82.57) ms86.95 ± (86.76 - 87.13) ms+5.5%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.90 ± (10.89 - 10.90) MB10.92 ± (10.92 - 10.92) MB+0.2%✅⬆️
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.26 ± (22.23 - 22.30) ms22.97 ± (22.91 - 23.02) ms+3.2%✅⬆️
process.time_to_main_ms84.15 ± (84.02 - 84.29) ms88.59 ± (88.36 - 88.81) ms+5.3%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.93 ± (10.93 - 10.94) MB10.95 ± (10.94 - 10.95) MB+0.1%✅⬆️
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms223.99 ± (222.77 - 225.21) ms225.92 ± (224.72 - 227.11) ms+0.9%✅⬆️
process.time_to_main_ms481.26 ± (480.48 - 482.04) ms498.97 ± (498.21 - 499.74) ms+3.7%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed47.15 ± (47.12 - 47.18) MB47.15 ± (47.12 - 47.18) MB-0.0%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.0%
.NET 6 - Baseline
process.internal_duration_ms21.02 ± (20.99 - 21.06) ms21.65 ± (21.61 - 21.69) ms+3.0%✅⬆️
process.time_to_main_ms72.00 ± (71.84 - 72.17) ms75.82 ± (75.64 - 76.00) ms+5.3%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.62 ± (10.62 - 10.62) MB10.63 ± (10.63 - 10.63) MB+0.1%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms20.93 ± (20.89 - 20.97) ms21.66 ± (21.61 - 21.71) ms+3.5%✅⬆️
process.time_to_main_ms72.61 ± (72.48 - 72.74) ms77.09 ± (76.89 - 77.30) ms+6.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.73 ± (10.72 - 10.73) MB10.74 ± (10.73 - 10.74) MB+0.1%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms207.09 ± (205.55 - 208.63) ms210.40 ± (208.93 - 211.88) ms+1.6%✅⬆️
process.time_to_main_ms482.32 ± (481.68 - 482.96) ms496.27 ± (495.40 - 497.14) ms+2.9%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed49.09 ± (49.04 - 49.14) MB49.19 ± (49.15 - 49.23) MB+0.2%✅⬆️
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 29)+0.1%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms19.26 ± (19.23 - 19.30) ms19.77 ± (19.73 - 19.81) ms+2.6%✅⬆️
process.time_to_main_ms71.03 ± (70.90 - 71.15) ms74.31 ± (74.16 - 74.46) ms+4.6%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.67 ± (7.66 - 7.67) MB7.68 ± (7.68 - 7.69) MB+0.2%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.28 ± (19.24 - 19.31) ms19.83 ± (19.79 - 19.88) ms+2.9%✅⬆️
process.time_to_main_ms72.66 ± (72.52 - 72.79) ms76.12 ± (75.96 - 76.27) ms+4.8%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.72 ± (7.71 - 7.73) MB7.73 ± (7.72 - 7.74) MB+0.2%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms161.71 ± (160.76 - 162.66) ms164.43 ± (163.44 - 165.42) ms+1.7%✅⬆️
process.time_to_main_ms459.59 ± (459.01 - 460.18) ms476.15 ± (475.34 - 476.96) ms+3.6%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed36.44 ± (36.43 - 36.46) MB36.45 ± (36.43 - 36.47) MB+0.0%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.2%

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration193.87 ± (193.82 - 194.73) ms201.60 ± (201.46 - 202.89) ms+4.0%✅⬆️
.NET Framework 4.8 - Bailout
duration196.84 ± (196.71 - 197.49) ms199.29 ± (199.60 - 200.51) ms+1.2%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1153.98 ± (1157.03 - 1166.64) ms1180.53 ± (1179.64 - 1187.77) ms+2.3%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms187.96 ± (187.65 - 188.27) ms191.09 ± (190.63 - 191.56) ms+1.7%✅⬆️
process.time_to_main_ms80.85 ± (80.61 - 81.10) ms82.63 ± (82.38 - 82.89) ms+2.2%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.18 ± (16.15 - 16.21) MB16.06 ± (16.04 - 16.08) MB-0.8%
runtime.dotnet.threads.count20 ± (19 - 20)20 ± (20 - 20)+0.5%✅⬆️
.NET Core 3.1 - Bailout
process.internal_duration_ms188.29 ± (187.93 - 188.64) ms190.69 ± (190.21 - 191.16) ms+1.3%✅⬆️
process.time_to_main_ms82.32 ± (82.18 - 82.45) ms83.87 ± (83.66 - 84.08) ms+1.9%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.26 ± (16.23 - 16.28) MB16.12 ± (16.09 - 16.14) MB-0.9%
runtime.dotnet.threads.count21 ± (20 - 21)21 ± (21 - 21)-0.1%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms396.19 ± (394.49 - 397.88) ms398.60 ± (396.96 - 400.24) ms+0.6%✅⬆️
process.time_to_main_ms474.53 ± (473.93 - 475.14) ms482.59 ± (481.61 - 483.56) ms+1.7%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed57.86 ± (57.70 - 58.01) MB58.13 ± (58.03 - 58.24) MB+0.5%✅⬆️
runtime.dotnet.threads.count30 ± (29 - 30)30 ± (30 - 30)+0.3%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms192.80 ± (192.38 - 193.22) ms194.17 ± (193.72 - 194.62) ms+0.7%✅⬆️
process.time_to_main_ms70.31 ± (70.15 - 70.47) ms71.09 ± (70.92 - 71.26) ms+1.1%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.18 ± (16.06 - 16.30) MB16.38 ± (16.35 - 16.41) MB+1.2%✅⬆️
runtime.dotnet.threads.count18 ± (18 - 18)19 ± (19 - 19)+4.0%✅⬆️
.NET 6 - Bailout
process.internal_duration_ms191.71 ± (191.43 - 191.99) ms194.89 ± (194.43 - 195.35) ms+1.7%✅⬆️
process.time_to_main_ms71.09 ± (71.01 - 71.17) ms72.52 ± (72.33 - 72.70) ms+2.0%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.17 ± (16.03 - 16.31) MB16.37 ± (16.35 - 16.39) MB+1.2%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)20 ± (20 - 20)+5.3%✅⬆️
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms428.17 ± (426.41 - 429.94) ms428.82 ± (427.25 - 430.38) ms+0.2%✅⬆️
process.time_to_main_ms476.75 ± (475.94 - 477.56) ms480.47 ± (479.55 - 481.39) ms+0.8%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed60.31 ± (60.25 - 60.37) MB60.34 ± (60.28 - 60.41) MB+0.0%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)-0.1%
.NET 8 - Baseline
process.internal_duration_ms190.92 ± (190.53 - 191.32) ms191.51 ± (191.12 - 191.89) ms+0.3%✅⬆️
process.time_to_main_ms70.34 ± (70.13 - 70.55) ms70.36 ± (70.16 - 70.56) ms+0.0%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.71 ± (11.68 - 11.73) MB11.74 ± (11.72 - 11.77) MB+0.3%✅⬆️
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 18)-0.1%
.NET 8 - Bailout
process.internal_duration_ms190.05 ± (189.61 - 190.49) ms190.16 ± (189.76 - 190.57) ms+0.1%✅⬆️
process.time_to_main_ms71.08 ± (70.91 - 71.25) ms71.32 ± (71.17 - 71.47) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.80 ± (11.77 - 11.83) MB11.77 ± (11.75 - 11.80) MB-0.2%
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+0.1%✅⬆️
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms353.81 ± (352.52 - 355.11) ms357.55 ± (356.25 - 358.86) ms+1.1%✅⬆️
process.time_to_main_ms453.97 ± (453.38 - 454.57) ms458.48 ± (457.66 - 459.30) ms+1.0%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed48.35 ± (48.32 - 48.38) MB48.42 ± (48.39 - 48.45) MB+0.1%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+0.1%✅⬆️
Comparison explanation

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

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

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

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

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

    section Bailout
    This PR (8308) - mean (79ms)  : 77, 81
    master - mean (76ms)  : 75, 77

    section CallTarget+Inlining+NGEN
    This PR (8308) - mean (1,096ms)  : 1048, 1145
    master - mean (1,061ms)  : 1023, 1099

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 (8308) - mean (117ms)  : 113, 121
    master - mean (111ms)  : 109, 114

    section Bailout
    This PR (8308) - mean (119ms)  : 115, 122
    master - mean (113ms)  : 111, 114

    section CallTarget+Inlining+NGEN
    This PR (8308) - mean (759ms)  : 733, 786
    master - mean (744ms)  : 724, 764

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8308) - mean (104ms)  : 101, 107
    master - mean (99ms)  : 96, 102

    section Bailout
    This PR (8308) - mean (105ms)  : crit, 103, 108
    master - mean (99ms)  : 97, 101

    section CallTarget+Inlining+NGEN
    This PR (8308) - mean (742ms)  : 707, 778
    master - mean (723ms)  : 676, 769

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8308) - mean (102ms)  : 98, 106
    master - mean (98ms)  : 95, 100

    section Bailout
    This PR (8308) - mean (104ms)  : 101, 107
    master - mean (99ms)  : 98, 101

    section CallTarget+Inlining+NGEN
    This PR (8308) - mean (680ms)  : 644, 716
    master - mean (657ms)  : 634, 681

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 (8308) - mean (202ms)  : 191, 213
    master - mean (194ms)  : 189, 200

    section Bailout
    This PR (8308) - mean (200ms)  : 194, 207
    master - mean (197ms)  : 193, 201

    section CallTarget+Inlining+NGEN
    This PR (8308) - mean (1,184ms)  : 1126, 1242
    master - mean (1,162ms)  : 1090, 1233

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 (8308) - mean (283ms)  : 274, 292
    master - mean (277ms)  : 273, 282

    section Bailout
    This PR (8308) - mean (284ms)  : 274, 294
    master - mean (279ms)  : 273, 285

    section CallTarget+Inlining+NGEN
    This PR (8308) - mean (915ms)  : 881, 949
    master - mean (904ms)  : 873, 936

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8308) - mean (274ms)  : 267, 281
    master - mean (271ms)  : 265, 277

    section Bailout
    This PR (8308) - mean (276ms)  : 266, 285
    master - mean (271ms)  : 268, 274

    section CallTarget+Inlining+NGEN
    This PR (8308) - mean (941ms)  : 914, 968
    master - mean (938ms)  : 903, 973

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

    section Bailout
    This PR (8308) - mean (271ms)  : 265, 276
    master - mean (271ms)  : 265, 276

    section CallTarget+Inlining+NGEN
    This PR (8308) - mean (846ms)  : 816, 876
    master - mean (840ms)  : 810, 870

Loading

@gleocadie gleocadie force-pushed the gleocadie/add_more_tests_for_managed_code_cache branch from 374e609 to d8e77ff Compare March 18, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:profiler Issues related to the continous-profiler

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant