Skip to content

Conversation

@NachoEchevarria
Copy link
Collaborator

Summary of changes

Reason for change

Implementation details

Test coverage

Other details

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

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

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (7803) 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
duration75.32 ± (75.49 - 76.23) ms74.19 ± (74.18 - 74.81) ms-1.5%
.NET Framework 4.8 - Bailout
duration78.93 ± (78.84 - 79.32) ms78.86 ± (78.58 - 79.08) ms-0.1%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1113.68 ± (1118.11 - 1128.98) ms1111.10 ± (1117.87 - 1128.35) ms-0.2%
.NET Core 3.1 - Baseline
process.internal_duration_ms22.85 ± (22.77 - 22.94) ms23.03 ± (22.92 - 23.14) ms+0.8%✅⬆️
process.time_to_main_ms86.64 ± (86.27 - 87.00) ms89.13 ± (88.59 - 89.67) ms+2.9%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.91 ± (10.91 - 10.92) MB10.91 ± (10.90 - 10.91) MB-0.1%
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.96 ± (22.88 - 23.03) ms23.37 ± (23.26 - 23.48) ms+1.8%✅⬆️
process.time_to_main_ms89.11 ± (88.75 - 89.48) ms92.21 ± (91.76 - 92.65) ms+3.5%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.95 ± (10.94 - 10.95) MB10.95 ± (10.95 - 10.95) MB+0.0%✅⬆️
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms218.63 ± (217.22 - 220.04) ms219.67 ± (218.14 - 221.19) ms+0.5%✅⬆️
process.time_to_main_ms548.80 ± (547.58 - 550.02) ms548.07 ± (546.86 - 549.28) ms-0.1%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed52.48 ± (52.46 - 52.50) MB52.43 ± (52.41 - 52.45) MB-0.1%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.1%
.NET 6 - Baseline
process.internal_duration_ms21.68 ± (21.62 - 21.74) ms21.72 ± (21.65 - 21.79) ms+0.2%✅⬆️
process.time_to_main_ms75.70 ± (75.38 - 76.02) ms75.96 ± (75.59 - 76.33) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.59 ± (10.58 - 10.59) MB10.62 ± (10.62 - 10.62) MB+0.3%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms21.65 ± (21.57 - 21.74) ms21.56 ± (21.50 - 21.62) ms-0.4%
process.time_to_main_ms77.11 ± (76.77 - 77.46) ms76.80 ± (76.50 - 77.10) ms-0.4%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.65 ± (10.65 - 10.66) MB10.65 ± (10.65 - 10.66) MB+0.0%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms206.78 ± (205.52 - 208.05) ms210.07 ± (208.00 - 212.14) ms+1.6%✅⬆️
process.time_to_main_ms513.55 ± (512.54 - 514.56) ms507.73 ± (506.69 - 508.76) ms-1.1%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed51.68 ± (51.64 - 51.71) MB51.55 ± (51.52 - 51.58) MB-0.3%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.0%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms19.89 ± (19.83 - 19.96) ms19.67 ± (19.61 - 19.73) ms-1.1%
process.time_to_main_ms75.48 ± (75.14 - 75.82) ms74.09 ± (73.76 - 74.43) ms-1.8%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.64 ± (7.63 - 7.64) MB7.66 ± (7.65 - 7.67) MB+0.3%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.62 ± (19.57 - 19.68) ms19.87 ± (19.81 - 19.93) ms+1.3%✅⬆️
process.time_to_main_ms75.41 ± (75.12 - 75.69) ms76.01 ± (75.72 - 76.31) ms+0.8%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.68 ± (7.67 - 7.69) MB7.73 ± (7.72 - 7.74) MB+0.6%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms191.98 ± (191.10 - 192.85) ms191.23 ± (190.37 - 192.10) ms-0.4%
process.time_to_main_ms494.50 ± (493.35 - 495.65) ms485.86 ± (484.83 - 486.90) ms-1.7%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed38.89 ± (38.86 - 38.93) MB38.81 ± (38.78 - 38.85) MB-0.2%
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
duration192.24 ± (192.21 - 192.99) ms191.90 ± (191.98 - 192.75) ms-0.2%
.NET Framework 4.8 - Bailout
duration194.95 ± (194.79 - 195.19) ms197.01 ± (196.83 - 197.75) ms+1.1%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1159.72 ± (1162.21 - 1170.75) ms1161.41 ± (1165.03 - 1174.47) ms+0.1%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms188.05 ± (187.61 - 188.49) ms190.52 ± (190.09 - 190.94) ms+1.3%✅⬆️
process.time_to_main_ms80.48 ± (80.28 - 80.67) ms81.37 ± (81.16 - 81.59) ms+1.1%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.09 ± (16.06 - 16.12) MB16.14 ± (16.12 - 16.16) MB+0.3%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (19 - 20)-0.2%
.NET Core 3.1 - Bailout
process.internal_duration_ms186.99 ± (186.58 - 187.40) ms188.86 ± (188.41 - 189.32) ms+1.0%✅⬆️
process.time_to_main_ms81.82 ± (81.58 - 82.06) ms82.35 ± (82.15 - 82.55) ms+0.6%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.18 ± (16.16 - 16.21) MB16.18 ± (16.15 - 16.21) MB-0.0%
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (20 - 21)-0.5%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms396.60 ± (393.96 - 399.24) ms396.49 ± (394.17 - 398.81) ms-0.0%
process.time_to_main_ms516.01 ± (515.32 - 516.70) ms521.27 ± (520.39 - 522.15) ms+1.0%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed63.00 ± (62.84 - 63.16) MB62.99 ± (62.84 - 63.13) MB-0.0%
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 29)+0.0%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms191.69 ± (191.33 - 192.04) ms193.30 ± (192.81 - 193.80) ms+0.8%✅⬆️
process.time_to_main_ms69.52 ± (69.36 - 69.67) ms69.99 ± (69.78 - 70.20) ms+0.7%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed15.92 ± (15.77 - 16.08) MB16.36 ± (16.33 - 16.39) MB+2.8%✅⬆️
runtime.dotnet.threads.count18 ± (18 - 19)19 ± (19 - 19)+2.8%✅⬆️
.NET 6 - Bailout
process.internal_duration_ms190.56 ± (190.26 - 190.86) ms192.80 ± (192.44 - 193.17) ms+1.2%✅⬆️
process.time_to_main_ms70.49 ± (70.38 - 70.60) ms70.90 ± (70.76 - 71.05) ms+0.6%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.05 ± (15.90 - 16.20) MB16.15 ± (16.02 - 16.28) MB+0.6%✅⬆️
runtime.dotnet.threads.count20 ± (19 - 20)20 ± (20 - 20)+0.6%✅⬆️
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms411.64 ± (408.68 - 414.61) ms420.87 ± (417.82 - 423.93) ms+2.2%✅⬆️
process.time_to_main_ms487.44 ± (486.79 - 488.09) ms489.93 ± (488.58 - 491.27) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed62.26 ± (62.12 - 62.39) MB62.48 ± (62.35 - 62.60) MB+0.4%✅⬆️
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 30)+0.1%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms189.30 ± (189.03 - 189.57) ms192.74 ± (192.27 - 193.21) ms+1.8%✅⬆️
process.time_to_main_ms69.03 ± (68.83 - 69.24) ms69.82 ± (69.64 - 70.00) ms+1.1%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.82 ± (11.78 - 11.86) MB11.77 ± (11.74 - 11.79) MB-0.5%
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 18)+0.6%✅⬆️
.NET 8 - Bailout
process.internal_duration_ms188.88 ± (188.60 - 189.16) ms191.79 ± (191.38 - 192.21) ms+1.5%✅⬆️
process.time_to_main_ms69.78 ± (69.70 - 69.87) ms70.77 ± (70.61 - 70.94) ms+1.4%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.87 ± (11.83 - 11.91) MB11.84 ± (11.82 - 11.86) MB-0.2%
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+0.8%✅⬆️
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms359.40 ± (357.90 - 360.90) ms364.82 ± (362.81 - 366.83) ms+1.5%✅⬆️
process.time_to_main_ms463.50 ± (462.76 - 464.24) ms461.12 ± (459.96 - 462.29) ms-0.5%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed50.31 ± (50.27 - 50.35) MB50.28 ± (50.24 - 50.32) MB-0.1%
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 29)+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 (7803) - mean (74ms)  : 70, 79
    master - mean (76ms)  : 71, 81

    section Bailout
    This PR (7803) - mean (79ms)  : 75, 82
    master - mean (79ms)  : 76, 82

    section CallTarget+Inlining+NGEN
    This PR (7803) - mean (1,123ms)  : 1048, 1198
    master - mean (1,124ms)  : 1044, 1203

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 (7803) - mean (120ms)  : 109, 131
    master - mean (117ms)  : 110, 123

    section Bailout
    This PR (7803) - mean (124ms)  : 116, 131
    master - mean (119ms)  : 112, 127

    section CallTarget+Inlining+NGEN
    This PR (7803) - mean (804ms)  : 757, 851
    master - mean (801ms)  : 754, 847

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7803) - mean (105ms)  : 97, 112
    master - mean (104ms)  : 98, 110

    section Bailout
    This PR (7803) - mean (105ms)  : 100, 110
    master - mean (105ms)  : 100, 111

    section CallTarget+Inlining+NGEN
    This PR (7803) - mean (753ms)  : 701, 806
    master - mean (750ms)  : 717, 783

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

    section Bailout
    This PR (7803) - mean (104ms)  : 98, 111
    master - mean (103ms)  : 98, 108

    section CallTarget+Inlining+NGEN
    This PR (7803) - mean (707ms)  : 681, 733
    master - mean (716ms)  : 688, 744

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 (7803) - mean (192ms)  : 189, 196
    master - mean (193ms)  : 189, 196

    section Bailout
    This PR (7803) - mean (197ms)  : 193, 202
    master - mean (195ms)  : 193, 197

    section CallTarget+Inlining+NGEN
    This PR (7803) - mean (1,170ms)  : 1099, 1240
    master - mean (1,166ms)  : 1106, 1227

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 (7803) - mean (280ms)  : 272, 288
    master - mean (277ms)  : 271, 282

    section Bailout
    This PR (7803) - mean (279ms)  : 273, 286
    master - mean (277ms)  : 271, 283

    section CallTarget+Inlining+NGEN
    This PR (7803) - mean (950ms)  : 899, 1000
    master - mean (942ms)  : 895, 988

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

    section Bailout
    This PR (7803) - mean (272ms)  : 267, 276
    master - mean (269ms)  : 264, 274

    section CallTarget+Inlining+NGEN
    This PR (7803) - mean (944ms)  : 889, 999
    master - mean (930ms)  : 877, 983

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7803) - mean (272ms)  : 264, 280
    master - mean (268ms)  : 263, 272

    section Bailout
    This PR (7803) - mean (272ms)  : 264, 280
    master - mean (268ms)  : 264, 272

    section CallTarget+Inlining+NGEN
    This PR (7803) - mean (857ms)  : 818, 896
    master - mean (855ms)  : 829, 880

Loading

@datadog-datadog-prod-us1

This comment has been minimized.

@pr-commenter
Copy link

pr-commenter bot commented Nov 12, 2025

Benchmarks

Benchmarks Report for benchmark platform 🐌

Benchmarks for #7803 compared to master:

  • 1 benchmarks are faster, with geometric mean 1.156
  • 1 benchmarks are slower, with geometric mean 1.704
  • 5 benchmarks have fewer allocations
  • 4 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 #7803

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net472 6.04 KB 5.99 KB -53 B -0.88%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 10.5μs 58.7ns 372ns 0 0 0 5.52 KB
master StartStopWithChild netcoreapp3.1 13.7μs 70.8ns 361ns 0 0 0 5.74 KB
master StartStopWithChild net472 22μs 106ns 562ns 0.978 0.326 0.109 6.04 KB
#7803 StartStopWithChild net6.0 10.6μs 59.2ns 360ns 0 0 0 5.53 KB
#7803 StartStopWithChild netcoreapp3.1 13.4μs 69.7ns 356ns 0 0 0 5.74 KB
#7803 StartStopWithChild net472 22μs 114ns 559ns 0.963 0.321 0.107 5.99 KB
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 932μs 26.8ns 104ns 0 0 0 2.71 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 1.02ms 108ns 420ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 1.23ms 507ns 1.9μs 0 0 0 3.31 KB
#7803 WriteAndFlushEnrichedTraces net6.0 947μs 68ns 255ns 0 0 0 2.71 KB
#7803 WriteAndFlushEnrichedTraces netcoreapp3.1 1.02ms 1.03μs 3.98μs 0 0 0 2.7 KB
#7803 WriteAndFlushEnrichedTraces net472 1.21ms 762ns 2.95μs 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.06μs 6.2ns 61.4ns 0 0 0 1.22 KB
master AllCycleSimpleBody netcoreapp3.1 1.47μs 7.19ns 30.5ns 0 0 0 1.2 KB
master AllCycleSimpleBody net472 1.04μs 3.01ns 11.6ns 0.19 0 0 1.23 KB
master AllCycleMoreComplexBody net6.0 6.96μs 38.4ns 230ns 0 0 0 4.72 KB
master AllCycleMoreComplexBody netcoreapp3.1 8.89μs 42.2ns 169ns 0 0 0 4.62 KB
master AllCycleMoreComplexBody net472 7.65μs 6.65ns 25.7ns 0.723 0 0 4.74 KB
master ObjectExtractorSimpleBody net6.0 319ns 1.71ns 9.2ns 0 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 404ns 0.179ns 0.695ns 0 0 0 272 B
master ObjectExtractorSimpleBody net472 303ns 0.0288ns 0.108ns 0.0442 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 6.27μs 30.9ns 135ns 0 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 7.76μs 34.9ns 135ns 0 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 6.75μs 6.02ns 23.3ns 0.572 0 0 3.8 KB
#7803 AllCycleSimpleBody net6.0 1.06μs 6.01ns 40.3ns 0 0 0 1.22 KB
#7803 AllCycleSimpleBody netcoreapp3.1 1.4μs 7.31ns 35.8ns 0 0 0 1.2 KB
#7803 AllCycleSimpleBody net472 1.05μs 0.599ns 2.32ns 0.194 0 0 1.23 KB
#7803 AllCycleMoreComplexBody net6.0 7.05μs 36.2ns 162ns 0 0 0 4.72 KB
#7803 AllCycleMoreComplexBody netcoreapp3.1 8.98μs 44.1ns 187ns 0 0 0 4.62 KB
#7803 AllCycleMoreComplexBody net472 7.61μs 4.34ns 16.8ns 0.724 0 0 4.74 KB
#7803 ObjectExtractorSimpleBody net6.0 322ns 0.171ns 0.639ns 0 0 0 280 B
#7803 ObjectExtractorSimpleBody netcoreapp3.1 404ns 1.9ns 7.83ns 0 0 0 272 B
#7803 ObjectExtractorSimpleBody net472 295ns 0.0296ns 0.107ns 0.0432 0 0 281 B
#7803 ObjectExtractorMoreComplexBody net6.0 6.33μs 13.8ns 53.4ns 0 0 0 3.78 KB
#7803 ObjectExtractorMoreComplexBody netcoreapp3.1 7.87μs 30.1ns 117ns 0 0 0 3.69 KB
#7803 ObjectExtractorMoreComplexBody net472 6.69μs 1.31ns 4.88ns 0.573 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 78.6μs 56.1ns 210ns 0 0 0 32.4 KB
master EncodeArgs netcoreapp3.1 97.4μs 35.4ns 132ns 0 0 0 32.4 KB
master EncodeArgs net472 109μs 16.3ns 63.1ns 4.91 0 0 32.51 KB
master EncodeLegacyArgs net6.0 141μs 26.8ns 104ns 0 0 0 2.15 KB
master EncodeLegacyArgs netcoreapp3.1 200μs 153ns 573ns 0 0 0 2.14 KB
master EncodeLegacyArgs net472 264μs 183ns 708ns 0 0 0 2.16 KB
#7803 EncodeArgs net6.0 79μs 13.4ns 48.3ns 0 0 0 32.4 KB
#7803 EncodeArgs netcoreapp3.1 97.8μs 27.2ns 102ns 0 0 0 32.4 KB
#7803 EncodeArgs net472 109μs 33.3ns 129ns 4.93 0 0 32.5 KB
#7803 EncodeLegacyArgs net6.0 145μs 9.79ns 35.3ns 0 0 0 2.15 KB
#7803 EncodeLegacyArgs netcoreapp3.1 202μs 580ns 2.25μs 0 0 0 2.14 KB
#7803 EncodeLegacyArgs net472 264μs 39.1ns 152ns 0 0 0 2.16 KB
Benchmarks.Trace.Asm.AppSecWafBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #7803

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1 1.704 297,618.90 507,170.66

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunWafRealisticBenchmark net6.0 392μs 104ns 390ns 0 0 0 4.55 KB
master RunWafRealisticBenchmark netcoreapp3.1 411μs 96.6ns 348ns 0 0 0 4.48 KB
master RunWafRealisticBenchmark net472 427μs 57.7ns 224ns 0 0 0 4.66 KB
master RunWafRealisticBenchmarkWithAttack net6.0 285μs 59.1ns 213ns 0 0 0 2.24 KB
master RunWafRealisticBenchmarkWithAttack netcoreapp3.1 297μs 118ns 424ns 0 0 0 2.22 KB
master RunWafRealisticBenchmarkWithAttack net472 316μs 17.5ns 67.8ns 0 0 0 2.29 KB
#7803 RunWafRealisticBenchmark net6.0 410μs 53ns 198ns 0 0 0 4.56 KB
#7803 RunWafRealisticBenchmark netcoreapp3.1 413μs 44.2ns 153ns 0 0 0 4.48 KB
#7803 RunWafRealisticBenchmark net472 428μs 55.4ns 215ns 0 0 0 4.66 KB
#7803 RunWafRealisticBenchmarkWithAttack net6.0 285μs 24.2ns 93.7ns 0 0 0 2.24 KB
#7803 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 505μs 2.28μs 8.55μs 0 0 0 2.22 KB
#7803 RunWafRealisticBenchmarkWithAttack net472 309μs 41.5ns 161ns 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 61.5μs 64ns 231ns 0 0 0 14.52 KB
master SendRequest netcoreapp3.1 71.9μs 259ns 971ns 0 0 0 17.42 KB
master SendRequest net472 0.0123ns 0.00264ns 0.0102ns 0 0 0 0 b
#7803 SendRequest net6.0 61.2μs 53.6ns 186ns 0 0 0 14.52 KB
#7803 SendRequest netcoreapp3.1 72.7μs 134ns 500ns 0 0 0 17.42 KB
#7803 SendRequest net472 0.0071ns 0.00226ns 0.00875ns 0 0 0 0 b
Benchmarks.Trace.CharSliceBenchmark - Faster 🎉 More allocations ⚠️

Faster 🎉 in #7803

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0 1.156 921,921.09 797,499.52

More allocations ⚠️ in #7803

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 2 B 7 B 5 B 250.00%

Fewer allocations 🎉 in #7803

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0 4 B 3 B -1 B -25.00%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net472 73 B 0 b -73 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.98ms 651ns 2.43μs 0 0 0 640.01 KB
master OriginalCharSlice netcoreapp3.1 2.1ms 3.81μs 14.3μs 0 0 0 640 KB
master OriginalCharSlice net472 2.71ms 2.22μs 8.58μs 100 0 0 641.95 KB
master OptimizedCharSlice net6.0 1.37ms 60.2ns 225ns 0 0 0 2 B
master OptimizedCharSlice netcoreapp3.1 1.84ms 333ns 1.29μs 0 0 0 1 B
master OptimizedCharSlice net472 1.94ms 544ns 2.11μs 0 0 0 73 B
master OptimizedCharSliceWithPool net6.0 922μs 28.6ns 111ns 0 0 0 4 B
master OptimizedCharSliceWithPool netcoreapp3.1 874μs 78.3ns 303ns 0 0 0 0 b
master OptimizedCharSliceWithPool net472 1.15ms 152ns 587ns 0 0 0 47 B
#7803 OriginalCharSlice net6.0 1.92ms 4.45μs 16.6μs 0 0 0 640.01 KB
#7803 OriginalCharSlice netcoreapp3.1 2.16ms 4.26μs 15.4μs 0 0 0 640 KB
#7803 OriginalCharSlice net472 2.72ms 133ns 479ns 100 0 0 641.95 KB
#7803 OptimizedCharSlice net6.0 1.44ms 338ns 1.31μs 0 0 0 7 B
#7803 OptimizedCharSlice netcoreapp3.1 1.67ms 285ns 1.1μs 0 0 0 1 B
#7803 OptimizedCharSlice net472 1.94ms 243ns 940ns 0 0 0 0 b
#7803 OptimizedCharSliceWithPool net6.0 797μs 50.8ns 190ns 0 0 0 3 B
#7803 OptimizedCharSliceWithPool netcoreapp3.1 851μs 101ns 391ns 0 0 0 0 b
#7803 OptimizedCharSliceWithPool net472 1.13ms 91.1ns 341ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 676μs 2.35μs 9.09μs 0 0 0 41.77 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 652μs 565ns 2.04μs 0 0 0 41.93 KB
master WriteAndFlushEnrichedTraces net472 885μs 3.13μs 12.1μs 4.46 0 0 56.08 KB
#7803 WriteAndFlushEnrichedTraces net6.0 678μs 1.47μs 5.7μs 0 0 0 41.74 KB
#7803 WriteAndFlushEnrichedTraces netcoreapp3.1 659μs 3.12μs 14.9μs 0 0 0 41.88 KB
#7803 WriteAndFlushEnrichedTraces net472 843μs 3.03μs 11.7μs 8.33 0 0 56.12 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.94μs 0.663ns 2.57ns 0 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 2.62μs 11.9ns 46.1ns 0 0 0 1.02 KB
master ExecuteNonQuery net472 2.79μs 3.49ns 13.5ns 0.151 0.0138 0 987 B
#7803 ExecuteNonQuery net6.0 1.91μs 9.55ns 42.7ns 0 0 0 1.02 KB
#7803 ExecuteNonQuery netcoreapp3.1 2.7μs 12.7ns 50.8ns 0 0 0 1.02 KB
#7803 ExecuteNonQuery net472 2.79μs 5.11ns 19.8ns 0.147 0.0147 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.7μs 1.02ns 3.97ns 0 0 0 1.03 KB
master CallElasticsearch netcoreapp3.1 2.31μs 3.83ns 14.8ns 0 0 0 1.03 KB
master CallElasticsearch net472 3.44μs 1.3ns 4.51ns 0.156 0 0 1.04 KB
master CallElasticsearchAsync net6.0 1.87μs 8.88ns 33.2ns 0 0 0 1.01 KB
master CallElasticsearchAsync netcoreapp3.1 2.42μs 6.61ns 25.6ns 0 0 0 1.08 KB
master CallElasticsearchAsync net472 3.58μs 1.48ns 5.75ns 0.161 0 0 1.1 KB
#7803 CallElasticsearch net6.0 1.74μs 6.99ns 27.1ns 0 0 0 1.03 KB
#7803 CallElasticsearch netcoreapp3.1 2.17μs 10.8ns 43.2ns 0 0 0 1.03 KB
#7803 CallElasticsearch net472 3.46μs 5.6ns 21.7ns 0.155 0 0 1.04 KB
#7803 CallElasticsearchAsync net6.0 1.83μs 1.91ns 7.39ns 0 0 0 1.01 KB
#7803 CallElasticsearchAsync netcoreapp3.1 2.41μs 10.3ns 37.2ns 0 0 0 1.08 KB
#7803 CallElasticsearchAsync net472 3.6μs 4.6ns 17.8ns 0.162 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.8μs 7.84ns 27.1ns 0 0 0 952 B
master ExecuteAsync netcoreapp3.1 2.47μs 9.16ns 35.5ns 0 0 0 952 B
master ExecuteAsync net472 2.61μs 1.22ns 4.58ns 0.145 0 0 915 B
#7803 ExecuteAsync net6.0 1.86μs 3.98ns 15.4ns 0 0 0 952 B
#7803 ExecuteAsync netcoreapp3.1 2.4μs 11ns 42.6ns 0 0 0 952 B
#7803 ExecuteAsync net472 2.59μs 1.51ns 5.63ns 0.143 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.98μs 11.5ns 44.4ns 0 0 0 2.36 KB
master SendAsync netcoreapp3.1 8.71μs 14.8ns 57.2ns 0 0 0 2.9 KB
master SendAsync net472 12μs 10.7ns 41.5ns 0.478 0 0 3.18 KB
#7803 SendAsync net6.0 6.94μs 30.9ns 120ns 0 0 0 2.36 KB
#7803 SendAsync netcoreapp3.1 8.77μs 20.9ns 78.3ns 0 0 0 2.9 KB
#7803 SendAsync net472 12μs 8.41ns 31.5ns 0.476 0 0 3.18 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #7803

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 275.84 KB 286.72 KB 10.88 KB 3.94%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 43.3 KB 44.84 KB 1.54 KB 3.55%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1 42.64 KB 44.04 KB 1.4 KB 3.28%

Fewer allocations 🎉 in #7803

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 277.62 KB 274.96 KB -2.66 KB -0.96%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark net6.0 40μs 191ns 810ns 0 0 0 43.3 KB
master StringConcatBenchmark netcoreapp3.1 48.7μs 241ns 963ns 0 0 0 42.64 KB
master StringConcatBenchmark net472 56.7μs 274ns 1.16μs 0 0 0 57.34 KB
master StringConcatAspectBenchmark net6.0 493μs 1.97μs 6.83μs 0 0 0 276.32 KB
master StringConcatAspectBenchmark netcoreapp3.1 576μs 2.25μs 8.42μs 0 0 0 277.62 KB
master StringConcatAspectBenchmark net472 405μs 2.28μs 14.6μs 0 0 0 275.84 KB
#7803 StringConcatBenchmark net6.0 42.2μs 197ns 710ns 0 0 0 44.84 KB
#7803 StringConcatBenchmark netcoreapp3.1 46.6μs 235ns 967ns 0 0 0 44.04 KB
#7803 StringConcatBenchmark net472 56.7μs 286ns 1.24μs 0 0 0 57.34 KB
#7803 StringConcatAspectBenchmark net6.0 540μs 1.09μs 3.79μs 0 0 0 277.26 KB
#7803 StringConcatAspectBenchmark netcoreapp3.1 595μs 2.62μs 10.5μs 0 0 0 274.96 KB
#7803 StringConcatAspectBenchmark net472 405μs 2.1μs 10.5μs 0 0 0 286.72 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.59μs 12.9ns 53.3ns 0 0 0 1.7 KB
master EnrichedLog netcoreapp3.1 3.58μs 14.8ns 57.3ns 0 0 0 1.7 KB
master EnrichedLog net472 3.89μs 5.37ns 20.8ns 0.253 0 0 1.64 KB
#7803 EnrichedLog net6.0 2.67μs 1.28ns 4.95ns 0 0 0 1.7 KB
#7803 EnrichedLog netcoreapp3.1 3.57μs 18ns 84.2ns 0 0 0 1.7 KB
#7803 EnrichedLog net472 3.86μs 2.99ns 11.6ns 0.25 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 122μs 41.8ns 145ns 0 0 0 4.31 KB
master EnrichedLog netcoreapp3.1 127μs 170ns 635ns 0 0 0 4.31 KB
master EnrichedLog net472 167μs 21.6ns 80.7ns 0 0 0 4.52 KB
#7803 EnrichedLog net6.0 123μs 371ns 1.39μs 0 0 0 4.31 KB
#7803 EnrichedLog netcoreapp3.1 127μs 67.1ns 251ns 0 0 0 4.31 KB
#7803 EnrichedLog net472 167μs 90.9ns 352ns 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.01μs 4.94ns 19.1ns 0 0 0 2.26 KB
master EnrichedLog netcoreapp3.1 6.81μs 20.7ns 80.2ns 0 0 0 2.26 KB
master EnrichedLog net472 7.55μs 5.98ns 23.1ns 0.302 0 0 2.08 KB
#7803 EnrichedLog net6.0 4.95μs 15ns 57.9ns 0 0 0 2.26 KB
#7803 EnrichedLog netcoreapp3.1 7.02μs 10.9ns 40.6ns 0 0 0 2.26 KB
#7803 EnrichedLog net472 7.54μs 10.7ns 41.6ns 0.301 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.97μs 8.28ns 32.1ns 0 0 0 1.2 KB
master SendReceive netcoreapp3.1 2.62μs 12.8ns 56ns 0 0 0 1.2 KB
master SendReceive net472 3.07μs 1.55ns 5.59ns 0.185 0 0 1.2 KB
#7803 SendReceive net6.0 2μs 3.43ns 13.3ns 0 0 0 1.2 KB
#7803 SendReceive netcoreapp3.1 2.62μs 7.31ns 28.3ns 0 0 0 1.2 KB
#7803 SendReceive net472 3.12μs 3.76ns 14.6ns 0.188 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.27μs 11.1ns 43ns 0 0 0 1.58 KB
master EnrichedLog netcoreapp3.1 5.96μs 8.9ns 34.5ns 0 0 0 1.63 KB
master EnrichedLog net472 6.85μs 8.15ns 31.6ns 0.31 0 0 2.03 KB
#7803 EnrichedLog net6.0 4.31μs 8.51ns 33ns 0 0 0 1.58 KB
#7803 EnrichedLog netcoreapp3.1 5.59μs 20ns 77.3ns 0 0 0 1.63 KB
#7803 EnrichedLog net472 6.61μs 7.97ns 30.9ns 0.299 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 794ns 3.96ns 16.8ns 0 0 0 576 B
master StartFinishSpan netcoreapp3.1 964ns 0.776ns 3ns 0 0 0 576 B
master StartFinishSpan net472 958ns 0.0916ns 0.33ns 0.0914 0 0 578 B
master StartFinishScope net6.0 933ns 0.203ns 0.786ns 0 0 0 696 B
master StartFinishScope netcoreapp3.1 1.2μs 5.72ns 22.2ns 0 0 0 696 B
master StartFinishScope net472 1.14μs 0.188ns 0.677ns 0.103 0 0 658 B
#7803 StartFinishSpan net6.0 783ns 3.58ns 14.3ns 0 0 0 576 B
#7803 StartFinishSpan netcoreapp3.1 972ns 2.11ns 8.17ns 0 0 0 576 B
#7803 StartFinishSpan net472 951ns 0.062ns 0.215ns 0.0903 0 0 578 B
#7803 StartFinishScope net6.0 951ns 4.45ns 17.8ns 0 0 0 696 B
#7803 StartFinishScope netcoreapp3.1 1.2μs 5.54ns 22.1ns 0 0 0 696 B
#7803 StartFinishScope net472 1.15μs 0.457ns 1.77ns 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.1μs 0.929ns 3.6ns 0 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 1.38μs 7.09ns 32.5ns 0 0 0 696 B
master RunOnMethodBegin net472 1.48μs 1.24ns 4.78ns 0.103 0 0 658 B
#7803 RunOnMethodBegin net6.0 1.1μs 4.99ns 20ns 0 0 0 696 B
#7803 RunOnMethodBegin netcoreapp3.1 1.43μs 7.02ns 29.8ns 0 0 0 696 B
#7803 RunOnMethodBegin net472 1.46μs 0.822ns 3.19ns 0.103 0 0 658 B

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants