Skip to content

Conversation

@rithikanarayan
Copy link
Contributor

Summary of changes

Cast object state to CallTargetState earlier in its usage to add type safety. Added type checks combined with variable declarations when using the state and scope attributes of CallTargetState.

Reason for change

Merged earlier PR adding request id headers to start and end invocation calls to the lambda extension, needed to improve code quality post-merge.

Implementation details

Test coverage

Other details

Comment on lines 104 to +107
public async Task<TInnerReturn> OnDelegateEndAsync<TInnerReturn>(object sender, TInnerReturn returnValue, Exception exception, object state)
{
LambdaCommon.Log("DelegateWrapper Running OnDelegateEndAsync");
try
if (state is CallTargetState callTargetState)
Copy link
Member

@andrewlock andrewlock Nov 24, 2025

Choose a reason for hiding this comment

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

We should never pass CallTargetState to an object parameter, because it will cause boxing and extra allocation 🙂 Unfortunately I'm not very familiar with this integration, so I can't suggest a great alternative, but if you need to pass two different types of state object, it's probably best to just create two different methods with the two possible parameter types

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think it's possible to pass in CallTargetState directly (or avoid passing in an object) because this function comes from DelegateInstrumentation.cs, which is not a lambda-specific file and specifies that an object is passed in to this function. The state is already boxed when it comes to us.

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

dd-trace-dotnet-ci-bot bot commented Nov 24, 2025

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (7858) 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
duration74.99 ± (74.96 - 75.69) ms74.15 ± (74.28 - 75.05) ms-1.1%
.NET Framework 4.8 - Bailout
duration79.50 ± (79.08 - 79.63) ms79.11 ± (78.92 - 79.50) ms-0.5%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1054.21 ± (1054.88 - 1064.33) ms1044.99 ± (1049.42 - 1060.99) ms-0.9%
.NET Core 3.1 - Baseline
process.internal_duration_ms22.98 ± (22.90 - 23.06) ms22.89 ± (22.82 - 22.96) ms-0.4%
process.time_to_main_ms86.72 ± (86.39 - 87.04) ms88.13 ± (87.76 - 88.50) ms+1.6%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.92 ± (10.92 - 10.93) MB10.95 ± (10.94 - 10.95) MB+0.2%✅⬆️
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.88 ± (22.82 - 22.94) ms22.74 ± (22.67 - 22.81) ms-0.6%
process.time_to_main_ms89.60 ± (89.25 - 89.94) ms88.37 ± (88.02 - 88.72) ms-1.4%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.96 ± (10.96 - 10.97) MB10.98 ± (10.97 - 10.98) MB+0.1%✅⬆️
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms219.28 ± (218.00 - 220.56) ms220.72 ± (219.46 - 221.98) ms+0.7%✅⬆️
process.time_to_main_ms497.57 ± (496.51 - 498.63) ms495.83 ± (494.61 - 497.06) ms-0.3%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed47.73 ± (47.70 - 47.75) MB47.76 ± (47.74 - 47.78) MB+0.1%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.5%
.NET 6 - Baseline
process.internal_duration_ms21.93 ± (21.85 - 22.00) ms21.59 ± (21.52 - 21.65) ms-1.6%
process.time_to_main_ms77.47 ± (77.12 - 77.82) ms75.77 ± (75.43 - 76.10) ms-2.2%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.60 ± (10.59 - 10.60) MB10.63 ± (10.63 - 10.63) MB+0.3%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms21.67 ± (21.61 - 21.73) ms21.44 ± (21.38 - 21.49) ms-1.1%
process.time_to_main_ms76.84 ± (76.51 - 77.18) ms75.55 ± (75.21 - 75.89) ms-1.7%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.64 ± (10.64 - 10.65) MB10.67 ± (10.67 - 10.68) MB+0.3%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms210.56 ± (209.19 - 211.93) ms210.02 ± (208.64 - 211.39) ms-0.3%
process.time_to_main_ms465.15 ± (464.20 - 466.09) ms464.29 ± (463.31 - 465.28) ms-0.2%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.04 ± (48.02 - 48.07) MB48.08 ± (48.06 - 48.10) MB+0.1%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.0%
.NET 8 - Baseline
process.internal_duration_ms20.00 ± (19.92 - 20.07) ms19.84 ± (19.76 - 19.91) ms-0.8%
process.time_to_main_ms75.42 ± (75.06 - 75.78) ms75.10 ± (74.71 - 75.49) ms-0.4%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.65 ± (7.65 - 7.66) MB7.67 ± (7.66 - 7.67) MB+0.2%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.90 ± (19.84 - 19.95) ms19.77 ± (19.71 - 19.82) ms-0.7%
process.time_to_main_ms76.06 ± (75.78 - 76.33) ms76.03 ± (75.76 - 76.31) ms-0.0%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.70 ± (7.70 - 7.71) MB7.74 ± (7.73 - 7.74) MB+0.4%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms191.06 ± (190.13 - 191.98) ms190.38 ± (189.44 - 191.32) ms-0.4%
process.time_to_main_ms453.35 ± (452.57 - 454.14) ms451.84 ± (450.89 - 452.79) ms-0.3%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed36.36 ± (36.31 - 36.40) MB36.41 ± (36.37 - 36.44) MB+0.1%✅⬆️
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
duration191.33 ± (191.17 - 191.92) ms193.10 ± (193.03 - 193.77) ms+0.9%✅⬆️
.NET Framework 4.8 - Bailout
duration195.81 ± (195.54 - 196.39) ms197.22 ± (197.00 - 197.53) ms+0.7%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1102.50 ± (1107.10 - 1116.52) ms1105.22 ± (1111.87 - 1121.45) ms+0.2%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms186.75 ± (186.46 - 187.04) ms188.94 ± (188.62 - 189.27) ms+1.2%✅⬆️
process.time_to_main_ms80.21 ± (80.01 - 80.41) ms81.13 ± (80.89 - 81.38) ms+1.2%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.11 ± (16.08 - 16.13) MB16.09 ± (16.06 - 16.12) MB-0.1%
runtime.dotnet.threads.count20 ± (19 - 20)20 ± (19 - 20)-0.2%
.NET Core 3.1 - Bailout
process.internal_duration_ms186.61 ± (186.31 - 186.90) ms188.94 ± (188.59 - 189.28) ms+1.2%✅⬆️
process.time_to_main_ms81.47 ± (81.34 - 81.60) ms82.51 ± (82.33 - 82.69) ms+1.3%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.17 ± (16.14 - 16.20) MB16.19 ± (16.16 - 16.22) MB+0.1%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 21)21 ± (21 - 21)+0.6%✅⬆️
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms399.27 ± (396.73 - 401.82) ms400.42 ± (397.69 - 403.15) ms+0.3%✅⬆️
process.time_to_main_ms468.60 ± (467.86 - 469.34) ms471.87 ± (471.20 - 472.54) ms+0.7%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed58.59 ± (58.47 - 58.71) MB58.47 ± (58.34 - 58.60) MB-0.2%
runtime.dotnet.threads.count30 ± (29 - 30)29 ± (29 - 30)-0.1%
.NET 6 - Baseline
process.internal_duration_ms191.50 ± (191.19 - 191.80) ms192.98 ± (192.70 - 193.26) ms+0.8%✅⬆️
process.time_to_main_ms69.85 ± (69.68 - 70.02) ms70.14 ± (69.96 - 70.32) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed15.89 ± (15.72 - 16.06) MB16.42 ± (16.38 - 16.46) MB+3.4%✅⬆️
runtime.dotnet.threads.count18 ± (18 - 18)19 ± (19 - 19)+6.3%✅⬆️
.NET 6 - Bailout
process.internal_duration_ms190.10 ± (189.89 - 190.32) ms191.40 ± (191.20 - 191.60) ms+0.7%✅⬆️
process.time_to_main_ms70.42 ± (70.35 - 70.49) ms70.71 ± (70.63 - 70.78) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.24 ± (16.10 - 16.38) MB16.27 ± (16.14 - 16.40) MB+0.2%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)20 ± (20 - 20)+3.5%✅⬆️
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms415.11 ± (411.93 - 418.28) ms413.58 ± (410.73 - 416.43) ms-0.4%
process.time_to_main_ms439.76 ± (439.25 - 440.27) ms441.60 ± (440.96 - 442.23) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed58.68 ± (58.53 - 58.83) MB58.89 ± (58.76 - 59.03) MB+0.4%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+0.1%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms189.85 ± (189.48 - 190.22) ms192.88 ± (192.48 - 193.28) ms+1.6%✅⬆️
process.time_to_main_ms69.41 ± (69.22 - 69.60) ms70.07 ± (69.87 - 70.26) ms+0.9%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.79 ± (11.77 - 11.81) MB11.71 ± (11.69 - 11.73) MB-0.6%
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 18)-0.1%
.NET 8 - Bailout
process.internal_duration_ms188.25 ± (188.02 - 188.49) ms190.70 ± (190.41 - 191.00) ms+1.3%✅⬆️
process.time_to_main_ms70.20 ± (70.09 - 70.31) ms70.70 ± (70.59 - 70.81) ms+0.7%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.85 ± (11.78 - 11.91) MB11.80 ± (11.76 - 11.83) MB-0.4%
runtime.dotnet.threads.count19 ± (18 - 19)19 ± (19 - 19)+2.0%✅⬆️
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms363.66 ± (362.36 - 364.96) ms365.82 ± (364.37 - 367.26) ms+0.6%✅⬆️
process.time_to_main_ms427.55 ± (427.04 - 428.07) ms432.37 ± (431.63 - 433.11) ms+1.1%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed47.87 ± (47.83 - 47.90) MB47.87 ± (47.85 - 47.90) MB+0.0%✅⬆️
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 29)-0.3%
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 (7858) - mean (75ms)  : 69, 80
    master - mean (75ms)  : 70, 81

    section Bailout
    This PR (7858) - mean (79ms)  : 75, 84
    master - mean (79ms)  : 75, 83

    section CallTarget+Inlining+NGEN
    This PR (7858) - mean (1,055ms)  : 970, 1141
    master - mean (1,060ms)  : 992, 1127

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 (7858) - mean (119ms)  : 112, 125
    master - mean (117ms)  : 111, 123

    section Bailout
    This PR (7858) - mean (119ms)  : 112, 125
    master - mean (120ms)  : 114, 125

    section CallTarget+Inlining+NGEN
    This PR (7858) - mean (755ms)  : 718, 792
    master - mean (753ms)  : 720, 786

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7858) - mean (104ms)  : 98, 111
    master - mean (106ms)  : 100, 113

    section Bailout
    This PR (7858) - mean (104ms)  : 97, 111
    master - mean (106ms)  : 100, 111

    section CallTarget+Inlining+NGEN
    This PR (7858) - mean (707ms)  : 660, 753
    master - mean (704ms)  : 670, 738

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

    section Bailout
    This PR (7858) - mean (104ms)  : 97, 110
    master - mean (105ms)  : 99, 110

    section CallTarget+Inlining+NGEN
    This PR (7858) - mean (675ms)  : 641, 710
    master - mean (681ms)  : 649, 714

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 (7858) - mean (193ms)  : 190, 197
    master - mean (192ms)  : 188, 195

    section Bailout
    This PR (7858) - mean (197ms)  : 195, 200
    master - mean (196ms)  : 192, 200

    section CallTarget+Inlining+NGEN
    This PR (7858) - mean (1,117ms)  : 1047, 1186
    master - mean (1,112ms)  : 1040, 1184

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 (7858) - mean (279ms)  : 273, 285
    master - mean (275ms)  : 270, 280

    section Bailout
    This PR (7858) - mean (279ms)  : 275, 284
    master - mean (276ms)  : 272, 280

    section CallTarget+Inlining+NGEN
    This PR (7858) - mean (902ms)  : 860, 945
    master - mean (901ms)  : 854, 947

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

    section Bailout
    This PR (7858) - mean (270ms)  : 268, 273
    master - mean (268ms)  : 266, 270

    section CallTarget+Inlining+NGEN
    This PR (7858) - mean (886ms)  : 844, 929
    master - mean (888ms)  : 830, 946

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7858) - mean (273ms)  : 264, 281
    master - mean (269ms)  : 264, 274

    section Bailout
    This PR (7858) - mean (271ms)  : 267, 275
    master - mean (268ms)  : 265, 271

    section CallTarget+Inlining+NGEN
    This PR (7858) - mean (830ms)  : 806, 853
    master - mean (821ms)  : 798, 844

Loading

@pr-commenter
Copy link

pr-commenter bot commented Nov 24, 2025

Benchmarks

Benchmarks Report for benchmark platform 🐌

Benchmarks for #7858 compared to master:

  • 1 benchmarks are faster, with geometric mean 2.086
  • 2 benchmarks are slower, with geometric mean 1.679
  • 10 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 ✔️ Fewer allocations 🎉

Fewer allocations 🎉 in #7858

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net472 6.06 KB 6.02 KB -43 B -0.71%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 10.6μs 57ns 302ns 0 0 0 5.51 KB
master StartStopWithChild netcoreapp3.1 13.7μs 71.7ns 336ns 0 0 0 5.7 KB
master StartStopWithChild net472 22.4μs 126ns 829ns 0.994 0.331 0.11 6.06 KB
#7858 StartStopWithChild net6.0 10.6μs 58.2ns 329ns 0 0 0 5.5 KB
#7858 StartStopWithChild netcoreapp3.1 13.2μs 50.6ns 182ns 0 0 0 5.7 KB
#7858 StartStopWithChild net472 22.7μs 122ns 659ns 1.05 0.419 0.105 6.02 KB
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Fewer allocations 🎉

Fewer allocations 🎉 in #7858

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 3.35 KB 3.31 KB -46 B -1.37%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 944μs 322ns 1.25μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 1.04ms 270ns 1.04μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 1.21ms 61ns 236ns 0 0 0 3.35 KB
#7858 WriteAndFlushEnrichedTraces net6.0 970μs 159ns 615ns 0 0 0 2.7 KB
#7858 WriteAndFlushEnrichedTraces netcoreapp3.1 1.03ms 71.2ns 257ns 0 0 0 2.7 KB
#7858 WriteAndFlushEnrichedTraces net472 1.2ms 89.7ns 347ns 0 0 0 3.31 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.05μs 5.98ns 43.1ns 0 0 0 1.22 KB
master AllCycleSimpleBody netcoreapp3.1 1.39μs 7.22ns 36.8ns 0 0 0 1.2 KB
master AllCycleSimpleBody net472 1.02μs 0.294ns 1.1ns 0.192 0 0 1.23 KB
master AllCycleMoreComplexBody net6.0 7.06μs 37.2ns 200ns 0 0 0 4.72 KB
master AllCycleMoreComplexBody netcoreapp3.1 9.07μs 49ns 273ns 0 0 0 4.62 KB
master AllCycleMoreComplexBody net472 7.71μs 4ns 15.5ns 0.735 0 0 4.74 KB
master ObjectExtractorSimpleBody net6.0 322ns 1.72ns 8.94ns 0 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 397ns 2.03ns 8.13ns 0 0 0 272 B
master ObjectExtractorSimpleBody net472 299ns 0.0547ns 0.212ns 0.0442 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 6.22μs 31ns 142ns 0 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 7.98μs 40.1ns 175ns 0 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 6.7μs 2.24ns 8.39ns 0.57 0 0 3.8 KB
#7858 AllCycleSimpleBody net6.0 1.06μs 5.81ns 33.4ns 0 0 0 1.22 KB
#7858 AllCycleSimpleBody netcoreapp3.1 1.44μs 7.67ns 38.4ns 0 0 0 1.2 KB
#7858 AllCycleSimpleBody net472 1μs 0.615ns 2.22ns 0.195 0 0 1.23 KB
#7858 AllCycleMoreComplexBody net6.0 7.19μs 5.71ns 21.4ns 0 0 0 4.72 KB
#7858 AllCycleMoreComplexBody netcoreapp3.1 9.04μs 40.3ns 145ns 0 0 0 4.62 KB
#7858 AllCycleMoreComplexBody net472 7.6μs 3.06ns 11.4ns 0.732 0 0 4.74 KB
#7858 ObjectExtractorSimpleBody net6.0 321ns 0.308ns 1.19ns 0 0 0 280 B
#7858 ObjectExtractorSimpleBody netcoreapp3.1 400ns 1.92ns 8.15ns 0 0 0 272 B
#7858 ObjectExtractorSimpleBody net472 298ns 0.0277ns 0.1ns 0.0435 0 0 281 B
#7858 ObjectExtractorMoreComplexBody net6.0 6.4μs 6.86ns 26.6ns 0 0 0 3.78 KB
#7858 ObjectExtractorMoreComplexBody netcoreapp3.1 8μs 37.2ns 129ns 0 0 0 3.69 KB
#7858 ObjectExtractorMoreComplexBody net472 6.64μs 2.13ns 7.68ns 0.602 0 0 3.8 KB
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EncodeArgs net6.0 77.9μs 242ns 939ns 0 0 0 32.4 KB
master EncodeArgs netcoreapp3.1 97.9μs 284ns 1.1μs 0 0 0 32.4 KB
master EncodeArgs net472 109μs 19.8ns 76.8ns 4.93 0 0 32.5 KB
master EncodeLegacyArgs net6.0 145μs 201ns 778ns 0 0 0 2.15 KB
master EncodeLegacyArgs netcoreapp3.1 200μs 178ns 665ns 0 0 0 2.15 KB
master EncodeLegacyArgs net472 261μs 87.9ns 340ns 0 0 0 2.16 KB
#7858 EncodeArgs net6.0 77μs 212ns 733ns 0 0 0 32.4 KB
#7858 EncodeArgs netcoreapp3.1 96.8μs 273ns 1.06μs 0 0 0 32.4 KB
#7858 EncodeArgs net472 109μs 14.2ns 55.2ns 4.9 0 0 32.51 KB
#7858 EncodeLegacyArgs net6.0 143μs 183ns 708ns 0 0 0 2.15 KB
#7858 EncodeLegacyArgs netcoreapp3.1 200μs 101ns 390ns 0 0 0 2.14 KB
#7858 EncodeLegacyArgs net472 264μs 42.4ns 164ns 0 0 0 2.16 KB
Benchmarks.Trace.Asm.AppSecWafBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #7858

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1 2.433 297,405.64 723,602.36

Faster 🎉 in #7858

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑netcoreapp3.1 2.086 858,209.90 411,379.79

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunWafRealisticBenchmark net6.0 390μs 45.3ns 175ns 0 0 0 4.55 KB
master RunWafRealisticBenchmark netcoreapp3.1 852μs 5.43μs 54.1μs 0 0 0 4.48 KB
master RunWafRealisticBenchmark net472 431μs 56.4ns 218ns 0 0 0 4.66 KB
master RunWafRealisticBenchmarkWithAttack net6.0 284μs 34ns 127ns 0 0 0 2.24 KB
master RunWafRealisticBenchmarkWithAttack netcoreapp3.1 298μs 200ns 775ns 0 0 0 2.22 KB
master RunWafRealisticBenchmarkWithAttack net472 308μs 39.8ns 154ns 0 0 0 2.29 KB
#7858 RunWafRealisticBenchmark net6.0 390μs 59.8ns 224ns 0 0 0 4.55 KB
#7858 RunWafRealisticBenchmark netcoreapp3.1 411μs 50.2ns 181ns 0 0 0 4.48 KB
#7858 RunWafRealisticBenchmark net472 426μs 48.6ns 188ns 0 0 0 4.66 KB
#7858 RunWafRealisticBenchmarkWithAttack net6.0 285μs 40.1ns 139ns 0 0 0 2.24 KB
#7858 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 716μs 4.98μs 49.6μs 0 0 0 2.22 KB
#7858 RunWafRealisticBenchmarkWithAttack net472 309μs 32.7ns 127ns 0 0 0 2.29 KB
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendRequest net6.0 62.2μs 305ns 1.22μs 0 0 0 14.52 KB
master SendRequest netcoreapp3.1 71.4μs 94.4ns 353ns 0 0 0 17.42 KB
master SendRequest net472 0.0093ns 0.00283ns 0.011ns 0 0 0 0 b
#7858 SendRequest net6.0 60.7μs 92.7ns 347ns 0 0 0 14.52 KB
#7858 SendRequest netcoreapp3.1 71.1μs 65.4ns 253ns 0 0 0 17.42 KB
#7858 SendRequest net472 0.00429ns 0.00223ns 0.00865ns 0 0 0 0 b
Benchmarks.Trace.CharSliceBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #7858

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 4 B 6 B 2 B 50.00%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0 4 B 5 B 1 B 25.00%

Fewer allocations 🎉 in #7858

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net472 73 B 0 b -73 B -100.00%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1 1 B 0 b -1 B -100.00%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472 47 B 0 b -47 B -100.00%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master OriginalCharSlice net6.0 1.89ms 3.22μs 12.5μs 0 0 0 640.01 KB
master OriginalCharSlice netcoreapp3.1 2.1ms 1.4μs 5.41μs 0 0 0 640 KB
master OriginalCharSlice net472 2.6ms 107ns 415ns 100 0 0 641.95 KB
master OptimizedCharSlice net6.0 1.43ms 286ns 1.11μs 0 0 0 4 B
master OptimizedCharSlice netcoreapp3.1 1.73ms 492ns 1.91μs 0 0 0 1 B
master OptimizedCharSlice net472 1.97ms 298ns 1.07μs 0 0 0 73 B
master OptimizedCharSliceWithPool net6.0 820μs 46.5ns 180ns 0 0 0 4 B
master OptimizedCharSliceWithPool netcoreapp3.1 814μs 171ns 660ns 0 0 0 1 B
master OptimizedCharSliceWithPool net472 1.18ms 136ns 526ns 0 0 0 47 B
#7858 OriginalCharSlice net6.0 1.94ms 2.75μs 10.7μs 0 0 0 640.01 KB
#7858 OriginalCharSlice netcoreapp3.1 2.22ms 7.46μs 27.9μs 0 0 0 640 KB
#7858 OriginalCharSlice net472 2.69ms 667ns 2.4μs 100 0 0 641.95 KB
#7858 OptimizedCharSlice net6.0 1.39ms 561ns 2.17μs 0 0 0 6 B
#7858 OptimizedCharSlice netcoreapp3.1 1.84ms 609ns 2.36μs 0 0 0 1 B
#7858 OptimizedCharSlice net472 1.97ms 478ns 1.85μs 0 0 0 0 b
#7858 OptimizedCharSliceWithPool net6.0 886μs 48.5ns 188ns 0 0 0 5 B
#7858 OptimizedCharSliceWithPool netcoreapp3.1 813μs 228ns 884ns 0 0 0 0 b
#7858 OptimizedCharSliceWithPool net472 1.23ms 60.5ns 226ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Slower ⚠️ More allocations ⚠️

Slower ⚠️ in #7858

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 1.159 636,464.76 737,448.12

More allocations ⚠️ in #7858

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 41.7 KB 42.08 KB 377 B 0.90%

Fewer allocations 🎉 in #7858

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 56.42 KB 55.78 KB -639 B -1.13%
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 42.76 KB 41.76 KB -995 B -2.33%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 648μs 3.63μs 23.2μs 0 0 0 41.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 740μs 4.1μs 26.6μs 0 0 0 42.76 KB
master WriteAndFlushEnrichedTraces net472 861μs 1.45μs 5.03μs 8.33 0 0 56.42 KB
#7858 WriteAndFlushEnrichedTraces net6.0 731μs 3.56μs 14.3μs 0 0 0 42.08 KB
#7858 WriteAndFlushEnrichedTraces netcoreapp3.1 732μs 4.75μs 47.5μs 0 0 0 41.76 KB
#7858 WriteAndFlushEnrichedTraces net472 956μs 5.29μs 33.9μs 4.46 0 0 55.78 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.91μs 0.398ns 1.49ns 0 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 2.54μs 9.26ns 34.7ns 0 0 0 1.02 KB
master ExecuteNonQuery net472 2.86μs 4.12ns 15.9ns 0.144 0.0144 0 987 B
#7858 ExecuteNonQuery net6.0 1.93μs 0.767ns 2.97ns 0 0 0 1.02 KB
#7858 ExecuteNonQuery netcoreapp3.1 2.65μs 3.55ns 13.8ns 0 0 0 1.02 KB
#7858 ExecuteNonQuery net472 2.89μs 6.87ns 26.6ns 0.154 0.014 0 987 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.74μs 9.05ns 47ns 0 0 0 1.03 KB
master CallElasticsearch netcoreapp3.1 2.21μs 8.09ns 30.3ns 0 0 0 1.03 KB
master CallElasticsearch net472 3.62μs 3.06ns 11.8ns 0.162 0 0 1.04 KB
master CallElasticsearchAsync net6.0 1.85μs 9.22ns 39.1ns 0 0 0 1.01 KB
master CallElasticsearchAsync netcoreapp3.1 2.32μs 11.5ns 51.2ns 0 0 0 1.08 KB
master CallElasticsearchAsync net472 3.78μs 5.84ns 22.6ns 0.17 0 0 1.1 KB
#7858 CallElasticsearch net6.0 1.77μs 3.65ns 13.6ns 0 0 0 1.03 KB
#7858 CallElasticsearch netcoreapp3.1 2.28μs 9.73ns 37.7ns 0 0 0 1.03 KB
#7858 CallElasticsearch net472 3.59μs 5.68ns 22ns 0.16 0 0 1.04 KB
#7858 CallElasticsearchAsync net6.0 1.83μs 9.36ns 40.8ns 0 0 0 1.01 KB
#7858 CallElasticsearchAsync netcoreapp3.1 2.4μs 8.65ns 33.5ns 0 0 0 1.08 KB
#7858 CallElasticsearchAsync net472 3.84μs 6.89ns 26.7ns 0.172 0 0 1.1 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.88μs 8.7ns 33.7ns 0 0 0 952 B
master ExecuteAsync netcoreapp3.1 2.49μs 8.26ns 32ns 0 0 0 952 B
master ExecuteAsync net472 2.55μs 0.614ns 2.38ns 0.14 0 0 915 B
#7858 ExecuteAsync net6.0 1.83μs 0.609ns 2.11ns 0 0 0 952 B
#7858 ExecuteAsync netcoreapp3.1 2.45μs 8.81ns 34.1ns 0 0 0 952 B
#7858 ExecuteAsync net472 2.53μs 1.22ns 4.74ns 0.14 0 0 915 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.86μs 5.86ns 21.1ns 0 0 0 2.36 KB
master SendAsync netcoreapp3.1 8.71μs 22.3ns 86.2ns 0 0 0 2.9 KB
master SendAsync net472 12.1μs 6.59ns 25.5ns 0.484 0 0 3.18 KB
#7858 SendAsync net6.0 6.83μs 17.5ns 67.7ns 0 0 0 2.36 KB
#7858 SendAsync netcoreapp3.1 8.66μs 31.6ns 122ns 0 0 0 2.9 KB
#7858 SendAsync net472 12.1μs 4.52ns 16.9ns 0.479 0 0 3.18 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #7858

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 260.02 KB 276.17 KB 16.14 KB 6.21%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1 42.64 KB 43.19 KB 552 B 1.29%

Fewer allocations 🎉 in #7858

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 257.86 KB 255.59 KB -2.26 KB -0.88%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 44.14 KB 43.47 KB -672 B -1.52%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 286.72 KB 278.53 KB -8.19 KB -2.86%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark net6.0 46.9μs 283ns 2.71μs 0 0 0 44.14 KB
master StringConcatBenchmark netcoreapp3.1 50.5μs 266ns 1.46μs 0 0 0 42.64 KB
master StringConcatBenchmark net472 55.8μs 260ns 972ns 0 0 0 57.34 KB
master StringConcatAspectBenchmark net6.0 483μs 2.01μs 6.95μs 0 0 0 260.02 KB
master StringConcatAspectBenchmark netcoreapp3.1 503μs 2.48μs 10.2μs 0 0 0 257.86 KB
master StringConcatAspectBenchmark net472 406μs 2.02μs 8.55μs 0 0 0 286.72 KB
#7858 StringConcatBenchmark net6.0 46.1μs 229ns 1.33μs 0 0 0 43.47 KB
#7858 StringConcatBenchmark netcoreapp3.1 50.1μs 286ns 2.1μs 0 0 0 43.19 KB
#7858 StringConcatBenchmark net472 58.5μs 274ns 1.06μs 0 0 0 57.34 KB
#7858 StringConcatAspectBenchmark net6.0 475μs 2.05μs 7.09μs 0 0 0 276.17 KB
#7858 StringConcatAspectBenchmark netcoreapp3.1 501μs 1.09μs 3.79μs 0 0 0 255.59 KB
#7858 StringConcatAspectBenchmark net472 413μs 2.23μs 14.6μs 0 0 0 278.53 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.65μs 2.59ns 10ns 0 0 0 1.7 KB
master EnrichedLog netcoreapp3.1 3.61μs 17.4ns 73.8ns 0 0 0 1.71 KB
master EnrichedLog net472 3.91μs 3.8ns 14.2ns 0.253 0 0 1.64 KB
#7858 EnrichedLog net6.0 2.69μs 13.1ns 56.9ns 0 0 0 1.7 KB
#7858 EnrichedLog netcoreapp3.1 3.6μs 12ns 46.6ns 0 0 0 1.7 KB
#7858 EnrichedLog net472 3.95μs 3.23ns 12.5ns 0.256 0 0 1.64 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 125μs 267ns 1.03μs 0 0 0 4.31 KB
master EnrichedLog netcoreapp3.1 127μs 128ns 480ns 0 0 0 4.31 KB
master EnrichedLog net472 167μs 72.9ns 283ns 0 0 0 4.52 KB
#7858 EnrichedLog net6.0 122μs 109ns 408ns 0 0 0 4.31 KB
#7858 EnrichedLog netcoreapp3.1 128μs 179ns 644ns 0 0 0 4.31 KB
#7858 EnrichedLog net472 166μs 47.4ns 164ns 0 0 0 4.52 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 5.06μs 18.4ns 71.4ns 0 0 0 2.26 KB
master EnrichedLog netcoreapp3.1 6.84μs 21.1ns 81.8ns 0 0 0 2.26 KB
master EnrichedLog net472 7.57μs 9.61ns 37.2ns 0.305 0 0 2.08 KB
#7858 EnrichedLog net6.0 5.02μs 19.3ns 74.6ns 0 0 0 2.26 KB
#7858 EnrichedLog netcoreapp3.1 6.96μs 19.6ns 76ns 0 0 0 2.26 KB
#7858 EnrichedLog net472 7.5μs 6.05ns 23.4ns 0.3 0 0 2.08 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.93μs 8.24ns 31.9ns 0 0 0 1.2 KB
master SendReceive netcoreapp3.1 2.65μs 6.74ns 26.1ns 0 0 0 1.2 KB
master SendReceive net472 3.18μs 1.74ns 6.26ns 0.177 0 0 1.2 KB
#7858 SendReceive net6.0 2.06μs 0.811ns 3.14ns 0 0 0 1.2 KB
#7858 SendReceive netcoreapp3.1 2.57μs 4.51ns 16.9ns 0 0 0 1.2 KB
#7858 SendReceive net472 3.21μs 2.92ns 11.3ns 0.176 0 0 1.2 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.35μs 10.8ns 41.8ns 0 0 0 1.58 KB
master EnrichedLog netcoreapp3.1 5.73μs 12.1ns 46.8ns 0 0 0 1.63 KB
master EnrichedLog net472 6.74μs 14ns 54.2ns 0.303 0 0 2.03 KB
#7858 EnrichedLog net6.0 4.34μs 4.91ns 19ns 0 0 0 1.58 KB
#7858 EnrichedLog netcoreapp3.1 5.53μs 11.4ns 44ns 0 0 0 1.63 KB
#7858 EnrichedLog net472 6.56μs 5.36ns 20.1ns 0.294 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 770ns 3.51ns 13.6ns 0 0 0 576 B
master StartFinishSpan netcoreapp3.1 954ns 5.02ns 26.6ns 0 0 0 576 B
master StartFinishSpan net472 948ns 0.081ns 0.303ns 0.0907 0 0 578 B
master StartFinishScope net6.0 918ns 4.76ns 22.3ns 0 0 0 696 B
master StartFinishScope netcoreapp3.1 1.18μs 6.14ns 30.1ns 0 0 0 696 B
master StartFinishScope net472 1.18μs 0.511ns 1.91ns 0.1 0 0 658 B
#7858 StartFinishSpan net6.0 796ns 0.34ns 1.27ns 0 0 0 576 B
#7858 StartFinishSpan netcoreapp3.1 965ns 4.71ns 19.4ns 0 0 0 576 B
#7858 StartFinishSpan net472 939ns 0.0959ns 0.346ns 0.0892 0 0 578 B
#7858 StartFinishScope net6.0 901ns 4.87ns 28.8ns 0 0 0 696 B
#7858 StartFinishScope netcoreapp3.1 1.17μs 6.23ns 33ns 0 0 0 696 B
#7858 StartFinishScope net472 1.15μs 0.363ns 1.36ns 0.104 0 0 658 B
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.11μs 5.16ns 20ns 0 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 1.42μs 7.57ns 38.6ns 0 0 0 696 B
master RunOnMethodBegin net472 1.47μs 3.72ns 14.4ns 0.103 0 0 658 B
#7858 RunOnMethodBegin net6.0 1.07μs 5.76ns 31ns 0 0 0 696 B
#7858 RunOnMethodBegin netcoreapp3.1 1.47μs 1.61ns 6.23ns 0 0 0 696 B
#7858 RunOnMethodBegin net472 1.46μs 0.389ns 1.45ns 0.102 0 0 658 B

@rithikanarayan rithikanarayan force-pushed the rithika.narayan/APMSVLS-276-cleanup branch from 41a5c61 to 6528bbe Compare November 24, 2025 17:04
@DataDog DataDog deleted a comment from github-actions bot Nov 24, 2025
@dd-trace-dotnet-ci-bot
Copy link

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (7858) 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
duration74.99 ± (74.96 - 75.69) ms74.35 ± (74.58 - 75.27) ms-0.8%
.NET Framework 4.8 - Bailout
duration79.50 ± (79.08 - 79.63) ms80.41 ± (80.33 - 81.06) ms+1.1%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1054.21 ± (1054.88 - 1064.33) ms1062.63 ± (1067.40 - 1080.27) ms+0.8%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms22.98 ± (22.90 - 23.06) ms22.91 ± (22.84 - 22.97) ms-0.3%
process.time_to_main_ms86.72 ± (86.39 - 87.04) ms86.92 ± (86.50 - 87.33) ms+0.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.92 ± (10.92 - 10.93) MB10.92 ± (10.92 - 10.92) MB-0.0%
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.88 ± (22.82 - 22.94) ms22.89 ± (22.82 - 22.96) ms+0.0%✅⬆️
process.time_to_main_ms89.60 ± (89.25 - 89.94) ms89.13 ± (88.74 - 89.51) ms-0.5%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.96 ± (10.96 - 10.97) 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_ms219.28 ± (218.00 - 220.56) ms220.06 ± (218.67 - 221.44) ms+0.4%✅⬆️
process.time_to_main_ms497.57 ± (496.51 - 498.63) ms497.06 ± (495.87 - 498.26) ms-0.1%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed47.73 ± (47.70 - 47.75) MB47.73 ± (47.71 - 47.75) MB+0.0%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.1%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms21.93 ± (21.85 - 22.00) ms21.74 ± (21.65 - 21.82) ms-0.9%
process.time_to_main_ms77.47 ± (77.12 - 77.82) ms75.88 ± (75.48 - 76.28) ms-2.1%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.60 ± (10.59 - 10.60) MB10.62 ± (10.62 - 10.62) MB+0.2%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms21.67 ± (21.61 - 21.73) ms21.57 ± (21.50 - 21.63) ms-0.5%
process.time_to_main_ms76.84 ± (76.51 - 77.18) ms76.84 ± (76.50 - 77.18) ms-0.0%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.64 ± (10.64 - 10.65) MB10.66 ± (10.66 - 10.66) MB+0.1%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms210.56 ± (209.19 - 211.93) ms210.31 ± (208.61 - 212.01) ms-0.1%
process.time_to_main_ms465.15 ± (464.20 - 466.09) ms465.31 ± (464.26 - 466.37) ms+0.0%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.04 ± (48.02 - 48.07) MB48.02 ± (48.00 - 48.05) MB-0.0%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.0%
.NET 8 - Baseline
process.internal_duration_ms20.00 ± (19.92 - 20.07) ms19.86 ± (19.80 - 19.93) ms-0.7%
process.time_to_main_ms75.42 ± (75.06 - 75.78) ms75.11 ± (74.77 - 75.45) ms-0.4%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.65 ± (7.65 - 7.66) MB7.66 ± (7.65 - 7.67) MB+0.1%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.90 ± (19.84 - 19.95) ms19.89 ± (19.81 - 19.96) ms-0.1%
process.time_to_main_ms76.06 ± (75.78 - 76.33) ms76.35 ± (75.99 - 76.71) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.70 ± (7.70 - 7.71) MB7.71 ± (7.70 - 7.71) MB+0.1%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms191.06 ± (190.13 - 191.98) ms191.33 ± (190.36 - 192.30) ms+0.1%✅⬆️
process.time_to_main_ms453.35 ± (452.57 - 454.14) ms456.90 ± (455.86 - 457.95) ms+0.8%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed36.36 ± (36.31 - 36.40) MB36.45 ± (36.42 - 36.49) 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
duration191.33 ± (191.17 - 191.92) ms195.65 ± (195.59 - 196.57) ms+2.3%✅⬆️
.NET Framework 4.8 - Bailout
duration195.81 ± (195.54 - 196.39) ms200.64 ± (200.14 - 201.20) ms+2.5%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1102.50 ± (1107.10 - 1116.52) ms1111.96 ± (1117.09 - 1126.62) ms+0.9%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms186.75 ± (186.46 - 187.04) ms191.06 ± (190.57 - 191.54) ms+2.3%✅⬆️
process.time_to_main_ms80.21 ± (80.01 - 80.41) ms81.91 ± (81.68 - 82.15) ms+2.1%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.11 ± (16.08 - 16.13) MB16.04 ± (16.02 - 16.05) MB-0.4%
runtime.dotnet.threads.count20 ± (19 - 20)20 ± (20 - 20)+0.0%✅⬆️
.NET Core 3.1 - Bailout
process.internal_duration_ms186.61 ± (186.31 - 186.90) ms189.19 ± (188.74 - 189.64) ms+1.4%✅⬆️
process.time_to_main_ms81.47 ± (81.34 - 81.60) ms82.81 ± (82.58 - 83.04) ms+1.7%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.17 ± (16.14 - 16.20) MB16.12 ± (16.09 - 16.14) MB-0.3%
runtime.dotnet.threads.count20 ± (20 - 21)21 ± (20 - 21)+0.4%✅⬆️
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms399.27 ± (396.73 - 401.82) ms401.60 ± (398.63 - 404.57) ms+0.6%✅⬆️
process.time_to_main_ms468.60 ± (467.86 - 469.34) ms473.79 ± (473.02 - 474.57) ms+1.1%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed58.59 ± (58.47 - 58.71) MB58.71 ± (58.60 - 58.82) MB+0.2%✅⬆️
runtime.dotnet.threads.count30 ± (29 - 30)29 ± (29 - 30)-0.1%
.NET 6 - Baseline
process.internal_duration_ms191.50 ± (191.19 - 191.80) ms193.11 ± (192.69 - 193.53) ms+0.8%✅⬆️
process.time_to_main_ms69.85 ± (69.68 - 70.02) ms70.21 ± (69.99 - 70.43) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed15.89 ± (15.72 - 16.06) MB16.35 ± (16.29 - 16.41) MB+2.9%✅⬆️
runtime.dotnet.threads.count18 ± (18 - 18)19 ± (19 - 19)+6.3%✅⬆️
.NET 6 - Bailout
process.internal_duration_ms190.10 ± (189.89 - 190.32) ms192.24 ± (191.89 - 192.59) ms+1.1%✅⬆️
process.time_to_main_ms70.42 ± (70.35 - 70.49) ms70.99 ± (70.90 - 71.08) ms+0.8%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.24 ± (16.10 - 16.38) MB16.07 ± (15.92 - 16.23) MB-1.1%
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+0.4%✅⬆️
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms415.11 ± (411.93 - 418.28) ms411.55 ± (408.55 - 414.55) ms-0.9%
process.time_to_main_ms439.76 ± (439.25 - 440.27) ms441.65 ± (441.00 - 442.31) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed58.68 ± (58.53 - 58.83) MB58.73 ± (58.58 - 58.87) MB+0.1%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (29 - 30)-0.0%
.NET 8 - Baseline
process.internal_duration_ms189.85 ± (189.48 - 190.22) ms190.26 ± (189.96 - 190.56) ms+0.2%✅⬆️
process.time_to_main_ms69.41 ± (69.22 - 69.60) ms69.71 ± (69.47 - 69.94) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.79 ± (11.77 - 11.81) MB11.68 ± (11.66 - 11.71) MB-0.9%
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 18)+0.0%✅⬆️
.NET 8 - Bailout
process.internal_duration_ms188.25 ± (188.02 - 188.49) ms189.41 ± (189.13 - 189.70) ms+0.6%✅⬆️
process.time_to_main_ms70.20 ± (70.09 - 70.31) ms70.15 ± (70.04 - 70.26) ms-0.1%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.85 ± (11.78 - 11.91) MB11.76 ± (11.73 - 11.79) MB-0.7%
runtime.dotnet.threads.count19 ± (18 - 19)19 ± (19 - 19)+2.7%✅⬆️
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms363.66 ± (362.36 - 364.96) ms367.50 ± (366.04 - 368.97) ms+1.1%✅⬆️
process.time_to_main_ms427.55 ± (427.04 - 428.07) ms431.08 ± (430.43 - 431.72) ms+0.8%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed47.87 ± (47.83 - 47.90) MB47.84 ± (47.81 - 47.88) MB-0.1%
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 29)-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 (7858) - mean (75ms)  : 70, 80
    master - mean (75ms)  : 70, 81

    section Bailout
    This PR (7858) - mean (81ms)  : 76, 86
    master - mean (79ms)  : 75, 83

    section CallTarget+Inlining+NGEN
    This PR (7858) - mean (1,074ms)  : 974, 1174
    master - mean (1,060ms)  : 992, 1127

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 (7858) - mean (117ms)  : 109, 126
    master - mean (117ms)  : 111, 123

    section Bailout
    This PR (7858) - mean (119ms)  : 113, 126
    master - mean (120ms)  : 114, 125

    section CallTarget+Inlining+NGEN
    This PR (7858) - mean (752ms)  : 705, 799
    master - mean (753ms)  : 720, 786

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7858) - mean (105ms)  : 96, 113
    master - mean (106ms)  : 100, 113

    section Bailout
    This PR (7858) - mean (105ms)  : 100, 111
    master - mean (106ms)  : 100, 111

    section CallTarget+Inlining+NGEN
    This PR (7858) - mean (708ms)  : 669, 747
    master - mean (704ms)  : 670, 738

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7858) - mean (103ms)  : 97, 109
    master - mean (104ms)  : 97, 111

    section Bailout
    This PR (7858) - mean (105ms)  : 98, 111
    master - mean (105ms)  : 99, 110

    section CallTarget+Inlining+NGEN
    This PR (7858) - mean (681ms)  : 651, 712
    master - mean (681ms)  : 649, 714

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 (7858) - mean (196ms)  : 189, 203
    master - mean (192ms)  : 188, 195

    section Bailout
    This PR (7858) - mean (201ms)  : 193, 208
    master - mean (196ms)  : 192, 200

    section CallTarget+Inlining+NGEN
    This PR (7858) - mean (1,122ms)  : 1054, 1190
    master - mean (1,112ms)  : 1040, 1184

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 (7858) - mean (282ms)  : 270, 293
    master - mean (275ms)  : 270, 280

    section Bailout
    This PR (7858) - mean (280ms)  : 274, 287
    master - mean (276ms)  : 272, 280

    section CallTarget+Inlining+NGEN
    This PR (7858) - mean (910ms)  : 863, 957
    master - mean (901ms)  : 854, 947

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7858) - mean (272ms)  : 265, 278
    master - mean (270ms)  : 265, 274

    section Bailout
    This PR (7858) - mean (271ms)  : 266, 276
    master - mean (268ms)  : 266, 270

    section CallTarget+Inlining+NGEN
    This PR (7858) - mean (884ms)  : 838, 929
    master - mean (888ms)  : 830, 946

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

    section Bailout
    This PR (7858) - mean (269ms)  : 265, 273
    master - mean (268ms)  : 265, 271

    section CallTarget+Inlining+NGEN
    This PR (7858) - mean (828ms)  : 804, 852
    master - mean (821ms)  : 798, 844

Loading

@datadog-official
Copy link

datadog-official bot commented Nov 24, 2025

⚠️ Tests

⚠️ Warnings

❄️ 1 New flaky test detected

AfterInitialSuccessThenMultipleFailures_SinkIsTemporarilyDisabled from Datadog.Trace.Tests.Logging.DirectSubmission.Sink.PeriodicBatching.BatchingSinkTests (Datadog)
Expected sink.Batches.Count to be 11, but found 12 (difference of 1).

ℹ️ Info

🧪 All tests passed

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants