Skip to content

Conversation

@gleocadie
Copy link
Collaborator

Summary of changes

Reason for change

Implementation details

Test coverage

Other details

@github-actions github-actions bot added the area:profiler Issues related to the continous-profiler label Dec 23, 2025
@gleocadie gleocadie force-pushed the gleocadie/refactor-stackframescollector branch 2 times, most recently from e397d14 to 24d46df Compare December 23, 2025 14:30
@gleocadie gleocadie force-pushed the gleocadie/refactor-stackframescollector branch from 24d46df to 1cfafc5 Compare December 23, 2025 14:56
@pr-commenter
Copy link

pr-commenter bot commented Dec 23, 2025

Benchmarks

Benchmark execution time: 2025-12-23 15:53:52

Comparing candidate commit 1cfafc5 in PR branch gleocadie/refactor-stackframescollector with baseline commit 053addc in branch master.

Found 11 performance improvements and 2 performance regressions! Performance is the same for 158 metrics, 15 unstable metrics.

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

  • 🟩 throughput [+169269.676op/s; +175636.164op/s] or [+20.735%; +21.515%]

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

  • 🟩 execution_time [-21.384ms; -20.901ms] or [-10.518%; -10.280%]

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

  • 🟩 execution_time [-101.294ms; -99.882ms] or [-51.692%; -50.971%]

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

  • 🟩 execution_time [-14.013ms; -9.397ms] or [-9.225%; -6.187%]

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

  • 🟥 throughput [-155.945op/s; -109.776op/s] or [-31.513%; -22.183%]

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

  • 🟥 execution_time [+11.865ms; +15.727ms] or [+6.145%; +8.146%]

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

  • 🟩 execution_time [-27.669ms; -25.895ms] or [-13.824%; -12.938%]

scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net472

  • 🟩 throughput [+23909.557op/s; +26271.859op/s] or [+7.614%; +8.367%]

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

  • 🟩 throughput [+9864.240op/s; +12691.336op/s] or [+5.944%; +7.648%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net472

  • 🟩 throughput [+55955.751op/s; +57833.121op/s] or [+5.257%; +5.433%]

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

  • 🟩 execution_time [-16.976ms; -11.243ms] or [-7.989%; -5.291%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net472

  • 🟩 throughput [+30152.708op/s; +33071.483op/s] or [+6.907%; +7.576%]

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

  • 🟩 execution_time [-18.892ms; -13.315ms] or [-8.948%; -6.306%]

@datadog-official
Copy link

datadog-official bot commented Dec 23, 2025

⚠️ Tests

Fix all issues with Cursor

⚠️ Warnings

🧪 16 Tests failed

CheckCpuLimit from Datadog.Profiler.IntegrationTests.SmokeTests.CpuLimitTest (Datadog) (Fix with Cursor)
The test Samples.BuggyBits is running for too long or was lost
CheckCpuLimit from Datadog.Profiler.IntegrationTests.SmokeTests.CpuLimitTest (Datadog) (Fix with Cursor)
Exit code of "Samples.BuggyBits" should be 0 instead of 139 (= 0x8B)
Expected: True
Actual:   False
CheckCpuLimit from Datadog.Profiler.IntegrationTests.SmokeTests.CpuLimitTest (Datadog) (Fix with Cursor)
Exit code of "Samples.BuggyBits" should be 0 instead of 139 (= 0x8B)
Expected: True
Actual:   False
View all

ℹ️ Info

❄️ No new flaky tests detected

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

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

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8004) 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.44 ± (68.43 - 68.68) ms68.32 ± (68.32 - 68.54) ms-0.2%
.NET Framework 4.8 - Bailout
duration72.34 ± (72.34 - 72.53) ms72.16 ± (72.09 - 72.34) ms-0.2%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1005.31 ± (1010.97 - 1020.36) ms1008.26 ± (1008.57 - 1015.36) ms+0.3%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms21.93 ± (21.90 - 21.97) ms21.97 ± (21.94 - 22.00) ms+0.2%✅⬆️
process.time_to_main_ms78.76 ± (78.61 - 78.92) ms78.71 ± (78.55 - 78.88) ms-0.1%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.91 ± (10.91 - 10.91) MB10.91 ± (10.91 - 10.92) MB+0.0%✅⬆️
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms21.87 ± (21.84 - 21.90) ms21.85 ± (21.83 - 21.87) ms-0.1%
process.time_to_main_ms79.86 ± (79.78 - 79.94) ms79.65 ± (79.57 - 79.74) ms-0.3%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.96 ± (10.96 - 10.96) MB10.96 ± (10.96 - 10.96) MB-0.0%
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms210.19 ± (208.66 - 211.71) ms210.12 ± (208.77 - 211.48) ms-0.0%
process.time_to_main_ms471.17 ± (470.58 - 471.75) ms471.57 ± (470.96 - 472.18) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.10 ± (48.08 - 48.12) MB48.09 ± (48.07 - 48.12) MB-0.0%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.0%
.NET 6 - Baseline
process.internal_duration_ms20.70 ± (20.67 - 20.73) ms20.59 ± (20.56 - 20.62) ms-0.6%
process.time_to_main_ms68.40 ± (68.27 - 68.53) ms67.87 ± (67.75 - 67.99) ms-0.8%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.60 ± (10.60 - 10.60) MB10.65 ± (10.64 - 10.65) MB+0.4%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms20.56 ± (20.54 - 20.59) ms20.58 ± (20.56 - 20.60) ms+0.1%✅⬆️
process.time_to_main_ms68.85 ± (68.80 - 68.89) ms69.00 ± (68.93 - 69.07) ms+0.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.65 ± (10.65 - 10.66) MB10.69 ± (10.69 - 10.70) MB+0.4%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms198.56 ± (197.52 - 199.60) ms199.28 ± (198.27 - 200.29) ms+0.4%✅⬆️
process.time_to_main_ms437.99 ± (437.50 - 438.49) ms437.28 ± (436.74 - 437.82) ms-0.2%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.18 ± (48.12 - 48.25) MB48.21 ± (48.14 - 48.28) MB+0.0%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.0%
.NET 8 - Baseline
process.internal_duration_ms18.77 ± (18.75 - 18.79) ms18.85 ± (18.82 - 18.88) ms+0.4%✅⬆️
process.time_to_main_ms66.88 ± (66.76 - 67.00) ms67.04 ± (66.90 - 67.17) ms+0.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.69 ± (7.69 - 7.70) 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_ms18.83 ± (18.81 - 18.85) ms18.77 ± (18.75 - 18.80) ms-0.3%
process.time_to_main_ms68.30 ± (68.23 - 68.37) ms68.01 ± (67.95 - 68.06) ms-0.4%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.72 ± (7.72 - 7.73) MB7.74 ± (7.74 - 7.75) MB+0.3%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms180.01 ± (179.07 - 180.96) ms178.66 ± (178.08 - 179.24) ms-0.8%
process.time_to_main_ms424.89 ± (424.36 - 425.41) ms425.61 ± (424.72 - 426.50) ms+0.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed36.26 ± (36.23 - 36.28) MB36.37 ± (36.35 - 36.39) MB+0.3%✅⬆️
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)-0.0%

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration193.25 ± (193.49 - 194.46) ms194.07 ± (193.84 - 194.62) ms+0.4%✅⬆️
.NET Framework 4.8 - Bailout
duration197.63 ± (197.46 - 198.00) ms197.48 ± (197.21 - 197.93) ms-0.1%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1113.62 ± (1124.61 - 1135.50) ms1114.64 ± (1120.99 - 1131.02) ms+0.1%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms187.96 ± (187.52 - 188.40) ms188.66 ± (188.29 - 189.03) ms+0.4%✅⬆️
process.time_to_main_ms80.74 ± (80.54 - 80.95) ms80.75 ± (80.51 - 81.00) ms+0.0%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.10 ± (16.07 - 16.13) MB16.18 ± (16.15 - 16.20) MB+0.5%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+0.1%✅⬆️
.NET Core 3.1 - Bailout
process.internal_duration_ms187.33 ± (187.04 - 187.61) ms187.21 ± (186.91 - 187.51) ms-0.1%
process.time_to_main_ms81.78 ± (81.64 - 81.92) ms81.85 ± (81.72 - 81.98) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.16 ± (16.13 - 16.18) MB16.16 ± (16.13 - 16.19) MB+0.0%✅⬆️
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (21 - 21)-0.7%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms398.72 ± (395.86 - 401.58) ms400.90 ± (397.99 - 403.81) ms+0.5%✅⬆️
process.time_to_main_ms474.71 ± (474.05 - 475.38) ms476.07 ± (475.36 - 476.79) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed58.42 ± (58.27 - 58.57) MB58.43 ± (58.27 - 58.58) MB+0.0%✅⬆️
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 29)-0.0%
.NET 6 - Baseline
process.internal_duration_ms192.71 ± (192.28 - 193.14) ms193.04 ± (192.67 - 193.42) ms+0.2%✅⬆️
process.time_to_main_ms70.37 ± (70.11 - 70.62) ms69.97 ± (69.80 - 70.15) ms-0.6%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.22 ± (16.11 - 16.34) MB16.25 ± (16.14 - 16.36) MB+0.1%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-0.3%
.NET 6 - Bailout
process.internal_duration_ms191.90 ± (191.62 - 192.18) ms191.69 ± (191.30 - 192.07) ms-0.1%
process.time_to_main_ms70.97 ± (70.85 - 71.08) ms70.78 ± (70.67 - 70.89) ms-0.3%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.23 ± (16.11 - 16.36) MB16.42 ± (16.35 - 16.49) MB+1.2%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+0.5%✅⬆️
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms410.56 ± (408.41 - 412.71) ms412.42 ± (410.10 - 414.74) ms+0.5%✅⬆️
process.time_to_main_ms445.29 ± (444.74 - 445.85) ms445.53 ± (444.99 - 446.07) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed59.17 ± (59.03 - 59.31) MB59.11 ± (58.97 - 59.25) MB-0.1%
runtime.dotnet.threads.count30 ± (29 - 30)30 ± (29 - 30)+0.1%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms190.90 ± (190.58 - 191.22) ms190.46 ± (190.13 - 190.79) ms-0.2%
process.time_to_main_ms69.98 ± (69.75 - 70.21) ms69.69 ± (69.52 - 69.86) ms-0.4%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.77 ± (11.74 - 11.80) MB11.71 ± (11.68 - 11.74) MB-0.5%
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 18)+0.4%✅⬆️
.NET 8 - Bailout
process.internal_duration_ms191.54 ± (191.06 - 192.02) ms190.29 ± (190.01 - 190.56) ms-0.7%
process.time_to_main_ms71.04 ± (70.90 - 71.18) ms70.71 ± (70.60 - 70.82) ms-0.5%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.80 ± (11.77 - 11.83) MB11.78 ± (11.75 - 11.81) MB-0.1%
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-0.4%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms368.26 ± (366.90 - 369.62) ms365.86 ± (364.28 - 367.45) ms-0.7%
process.time_to_main_ms430.09 ± (429.45 - 430.72) ms429.49 ± (428.83 - 430.16) ms-0.1%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed47.91 ± (47.88 - 47.95) MB47.94 ± (47.90 - 47.98) MB+0.1%✅⬆️
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 29)+0.0%✅⬆️
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 (8004) - mean (68ms)  : 67, 70
    master - mean (69ms)  : 67, 70

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

    section CallTarget+Inlining+NGEN
    This PR (8004) - mean (1,012ms)  : 962, 1061
    master - mean (1,016ms)  : 947, 1084

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

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

    section CallTarget+Inlining+NGEN
    This PR (8004) - mean (707ms)  : 682, 732
    master - mean (712ms)  : 673, 752

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

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

    section CallTarget+Inlining+NGEN
    This PR (8004) - mean (663ms)  : 642, 684
    master - mean (665ms)  : 642, 688

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

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

    section CallTarget+Inlining+NGEN
    This PR (8004) - mean (632ms)  : 608, 657
    master - mean (631ms)  : 614, 649

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 (8004) - mean (194ms)  : 191, 198
    master - mean (194ms)  : 189, 199

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

    section CallTarget+Inlining+NGEN
    This PR (8004) - mean (1,126ms)  : 1048, 1204
    master - mean (1,130ms)  : 1045, 1215

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 (8004) - mean (277ms)  : 272, 283
    master - mean (277ms)  : 272, 283

    section Bailout
    This PR (8004) - mean (277ms)  : 273, 281
    master - mean (278ms)  : 275, 281

    section CallTarget+Inlining+NGEN
    This PR (8004) - mean (909ms)  : 867, 951
    master - mean (911ms)  : 868, 955

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

    section Bailout
    This PR (8004) - mean (270ms)  : 266, 275
    master - mean (271ms)  : 267, 274

    section CallTarget+Inlining+NGEN
    This PR (8004) - mean (891ms)  : 847, 935
    master - mean (891ms)  : 847, 935

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

    section Bailout
    This PR (8004) - mean (271ms)  : 267, 274
    master - mean (273ms)  : 267, 278

    section CallTarget+Inlining+NGEN
    This PR (8004) - mean (827ms)  : 810, 844
    master - mean (827ms)  : 811, 844

Loading

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.

2 participants