Skip to content

Conversation

@bouwkast
Copy link
Collaborator

Summary of changes

Adds some additional null checks to try and prevent a NullReferenceException happening in log4net

Reason for change

Error : Exception occurred when calling the CallTarget integration continuation.
System.NullReferenceException
   at Datadog.Trace.ClrProfiler.CallTarget.Handlers.BeginMethodHandler`3.Invoke(TTarget instance, TArg1& arg1)
   at Datadog.Trace.ClrProfiler.CallTarget.CallTargetInvoker.BeginMethod[TIntegration,TTarget,TArg1](TTarget instance, TArg1& arg1)
   at log4net.Util.AppenderAttachedImpl.AppendLoopOnAppenders(LoggingEvent loggingEvent)

Implementation details

  • Made ILoggingEvent implement IDuckType
  • Checked for whether the duck-typed loggingEvent is null or not
  • Checked if the properties on the event are null or not

Test coverage

🤷

I didn't see exactly how to replicate this TBH

Other details

@bouwkast bouwkast requested a review from a team as a code owner October 29, 2025 12:43
@bouwkast bouwkast requested a review from a team as a code owner October 29, 2025 12:43
@datadog-official

This comment has been minimized.

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

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing the following branches/commits:

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 shown 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).

gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7735) - mean (72ms)  : 71, 73
     .   : milestone, 72,
    master - mean (72ms)  : 71, 73
     .   : milestone, 72,

    section Baseline
    This PR (7735) - mean (68ms)  : 67, 70
     .   : milestone, 68,
    master - mean (68ms)  : 67, 70
     .   : milestone, 68,

    section CallTarget+Inlining+NGEN
    This PR (7735) - mean (1,046ms)  : 990, 1102
     .   : milestone, 1046,
    master - mean (1,045ms)  : 1005, 1084
     .   : milestone, 1045,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7735) - mean (106ms)  : 105, 108
     .   : milestone, 106,
    master - mean (107ms)  : 106, 108
     .   : milestone, 107,

    section Baseline
    This PR (7735) - mean (105ms)  : 102, 109
     .   : milestone, 105,
    master - mean (107ms)  : 104, 109
     .   : milestone, 107,

    section CallTarget+Inlining+NGEN
    This PR (7735) - mean (745ms)  : 724, 766
     .   : milestone, 745,
    master - mean (749ms)  : 724, 774
     .   : milestone, 749,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7735) - mean (94ms)  : 93, 95
     .   : milestone, 94,
    master - mean (95ms)  : 94, 96
     .   : milestone, 95,

    section Baseline
    This PR (7735) - mean (93ms)  : 91, 96
     .   : milestone, 93,
    master - mean (94ms)  : 92, 95
     .   : milestone, 94,

    section CallTarget+Inlining+NGEN
    This PR (7735) - mean (701ms)  : 677, 725
     .   : milestone, 701,
    master - mean (711ms)  : 670, 751
     .   : milestone, 711,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7735) - mean (96ms)  : 94, 98
     .   : milestone, 96,
    master - mean (93ms)  : 91, 94
     .   : milestone, 93,

    section Baseline
    This PR (7735) - mean (94ms)  : 92, 97
     .   : milestone, 94,
    master - mean (92ms)  : 90, 94
     .   : milestone, 92,

    section CallTarget+Inlining+NGEN
    This PR (7735) - mean (671ms)  : 654, 688
     .   : milestone, 671,
    master - mean (662ms)  : 647, 677
     .   : milestone, 662,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7735) - mean (197ms)  : 194, 200
     .   : milestone, 197,
    master - mean (197ms)  : 194, 199
     .   : milestone, 197,

    section Baseline
    This PR (7735) - mean (193ms)  : 189, 196
     .   : milestone, 193,
    master - mean (193ms)  : 190, 195
     .   : milestone, 193,

    section CallTarget+Inlining+NGEN
    This PR (7735) - mean (1,167ms)  : 1105, 1228
     .   : milestone, 1167,
    master - mean (1,170ms)  : 1104, 1236
     .   : milestone, 1170,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7735) - mean (277ms)  : 274, 281
     .   : milestone, 277,
    master - mean (277ms)  : 273, 282
     .   : milestone, 277,

    section Baseline
    This PR (7735) - mean (278ms)  : 270, 285
     .   : milestone, 278,
    master - mean (278ms)  : 272, 284
     .   : milestone, 278,

    section CallTarget+Inlining+NGEN
    This PR (7735) - mean (965ms)  : 911, 1018
     .   : milestone, 965,
    master - mean (950ms)  : 906, 994
     .   : milestone, 950,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7735) - mean (272ms)  : 266, 278
     .   : milestone, 272,
    master - mean (270ms)  : 266, 273
     .   : milestone, 270,

    section Baseline
    This PR (7735) - mean (272ms)  : 265, 279
     .   : milestone, 272,
    master - mean (270ms)  : 265, 274
     .   : milestone, 270,

    section CallTarget+Inlining+NGEN
    This PR (7735) - mean (938ms)  : 875, 1000
     .   : milestone, 938,
    master - mean (937ms)  : 879, 994
     .   : milestone, 937,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7735) - mean (274ms)  : 267, 282
     .   : milestone, 274,
    master - mean (270ms)  : 264, 276
     .   : milestone, 270,

    section Baseline
    This PR (7735) - mean (276ms)  : 266, 285
     .   : milestone, 276,
    master - mean (270ms)  : 263, 277
     .   : milestone, 270,

    section CallTarget+Inlining+NGEN
    This PR (7735) - mean (863ms)  : 833, 892
     .   : milestone, 863,
    master - mean (861ms)  : 833, 888
     .   : milestone, 861,

Loading

@pr-commenter
Copy link

pr-commenter bot commented Oct 29, 2025

Benchmarks

Benchmarks Report for benchmark platform 🐌

Benchmarks for #7735 compared to master:

  • 3 benchmarks are faster, with geometric mean 1.235
  • 1 benchmarks are slower, with geometric mean 1.178
  • 7 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 #7735

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net472 6.03 KB 5.99 KB -39 B -0.65%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 10.8μs 56.7ns 305ns 0 0 0 5.53 KB
master StartStopWithChild netcoreapp3.1 13.8μs 67.5ns 278ns 0 0 0 5.72 KB
master StartStopWithChild net472 21.8μs 117ns 631ns 0.98 0.327 0.109 6.03 KB
#7735 StartStopWithChild net6.0 10.4μs 58.4ns 379ns 0 0 0 5.53 KB
#7735 StartStopWithChild netcoreapp3.1 14μs 64.1ns 256ns 0 0 0 5.74 KB
#7735 StartStopWithChild net472 22.7μs 121ns 639ns 1.03 0.308 0.103 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 945μs 667ns 2.58μs 0 0 0 2.71 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 1.03ms 66.7ns 231ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 1.2ms 87.7ns 304ns 0 0 0 3.31 KB
#7735 WriteAndFlushEnrichedTraces net6.0 939μs 165ns 593ns 0 0 0 2.71 KB
#7735 WriteAndFlushEnrichedTraces netcoreapp3.1 1.05ms 152ns 568ns 0 0 0 2.7 KB
#7735 WriteAndFlushEnrichedTraces net472 1.22ms 671ns 2.6μs 0 0 0 3.31 KB
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Unknown 🤷 Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody net6.0 N/A N/A N/A NaN NaN NaN 0 b
master AllCycleSimpleBody netcoreapp3.1 N/A N/A N/A NaN NaN NaN 0 b
master AllCycleSimpleBody net472 N/A N/A N/A NaN NaN NaN 0 b
master AllCycleMoreComplexBody net6.0 N/A N/A N/A NaN NaN NaN 0 b
master AllCycleMoreComplexBody netcoreapp3.1 N/A N/A N/A NaN NaN NaN 0 b
master AllCycleMoreComplexBody net472 N/A N/A N/A NaN NaN NaN 0 b
master ObjectExtractorSimpleBody net6.0 326ns 1.61ns 7.22ns 0 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 392ns 2.22ns 14.2ns 0 0 0 272 B
master ObjectExtractorSimpleBody net472 302ns 0.0192ns 0.0694ns 0.0441 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 6.4μs 29.1ns 113ns 0 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 7.82μs 36.1ns 140ns 0 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 6.67μs 1.91ns 7.38ns 0.601 0 0 3.8 KB
#7735 AllCycleSimpleBody net6.0 N/A N/A N/A NaN NaN NaN 0 b
#7735 AllCycleSimpleBody netcoreapp3.1 N/A N/A N/A NaN NaN NaN 0 b
#7735 AllCycleSimpleBody net472 N/A N/A N/A NaN NaN NaN 0 b
#7735 AllCycleMoreComplexBody net6.0 N/A N/A N/A NaN NaN NaN 0 b
#7735 AllCycleMoreComplexBody netcoreapp3.1 N/A N/A N/A NaN NaN NaN 0 b
#7735 AllCycleMoreComplexBody net472 N/A N/A N/A NaN NaN NaN 0 b
#7735 ObjectExtractorSimpleBody net6.0 325ns 1.79ns 10.4ns 0 0 0 280 B
#7735 ObjectExtractorSimpleBody netcoreapp3.1 399ns 2.15ns 11.6ns 0 0 0 272 B
#7735 ObjectExtractorSimpleBody net472 299ns 0.0368ns 0.142ns 0.0435 0 0 281 B
#7735 ObjectExtractorMoreComplexBody net6.0 6.26μs 32.4ns 165ns 0 0 0 3.78 KB
#7735 ObjectExtractorMoreComplexBody netcoreapp3.1 7.9μs 28.6ns 111ns 0 0 0 3.69 KB
#7735 ObjectExtractorMoreComplexBody net472 6.61μs 0.657ns 2.46ns 0.596 0 0 3.8 KB
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed ✔️ Fewer allocations 🎉

Fewer allocations 🎉 in #7735

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs‑net472 2.17 KB 2.16 KB -15 B -0.69%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EncodeArgs net6.0 76.8μs 250ns 934ns 0 0 0 32.4 KB
master EncodeArgs netcoreapp3.1 97μs 183ns 707ns 0 0 0 32.4 KB
master EncodeArgs net472 113μs 11.8ns 42.4ns 5.1 0 0 32.5 KB
master EncodeLegacyArgs net6.0 145μs 19.8ns 74.1ns 0 0 0 2.14 KB
master EncodeLegacyArgs netcoreapp3.1 199μs 232ns 897ns 0 0 0 2.14 KB
master EncodeLegacyArgs net472 272μs 41.4ns 155ns 0 0 0 2.17 KB
#7735 EncodeArgs net6.0 77.2μs 85.2ns 319ns 0 0 0 32.4 KB
#7735 EncodeArgs netcoreapp3.1 97.4μs 138ns 535ns 0 0 0 32.4 KB
#7735 EncodeArgs net472 110μs 18.9ns 73.2ns 4.98 0 0 32.51 KB
#7735 EncodeLegacyArgs net6.0 145μs 31.3ns 121ns 0 0 0 2.15 KB
#7735 EncodeLegacyArgs netcoreapp3.1 199μs 264ns 1.02μs 0 0 0 2.15 KB
#7735 EncodeLegacyArgs net472 263μs 238ns 889ns 0 0 0 2.16 KB
Benchmarks.Trace.Asm.AppSecWafBenchmark - Faster 🎉 Fewer allocations 🎉

Faster 🎉 in #7735

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑netcoreapp3.1 1.389 864,261.04 622,358.12

Fewer allocations 🎉 in #7735

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑netcoreapp3.1 4.6 KB 4.48 KB -121 B -2.63%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunWafRealisticBenchmark net6.0 394μs 68.4ns 247ns 0 0 0 4.55 KB
master RunWafRealisticBenchmark netcoreapp3.1 862μs 2.38μs 8.6μs 0 0 0 4.6 KB
master RunWafRealisticBenchmark net472 428μs 58.7ns 227ns 0 0 0 4.66 KB
master RunWafRealisticBenchmarkWithAttack net6.0 285μs 67.6ns 253ns 0 0 0 2.24 KB
master RunWafRealisticBenchmarkWithAttack netcoreapp3.1 688μs 10.2μs 101μs 0 0 0 2.22 KB
master RunWafRealisticBenchmarkWithAttack net472 309μs 40.1ns 155ns 0 0 0 2.29 KB
#7735 RunWafRealisticBenchmark net6.0 391μs 41.7ns 156ns 0 0 0 4.55 KB
#7735 RunWafRealisticBenchmark netcoreapp3.1 614μs 4.36μs 40.4μs 0 0 0 4.48 KB
#7735 RunWafRealisticBenchmark net472 428μs 62ns 240ns 0 0 0 4.66 KB
#7735 RunWafRealisticBenchmarkWithAttack net6.0 287μs 32.1ns 120ns 0 0 0 2.24 KB
#7735 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 673μs 12.4μs 124μs 0 0 0 2.22 KB
#7735 RunWafRealisticBenchmarkWithAttack net472 311μs 28.5ns 110ns 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 60.6μs 35.6ns 138ns 0 0 0 14.52 KB
master SendRequest netcoreapp3.1 71.5μs 68.4ns 237ns 0 0 0 17.42 KB
master SendRequest net472 0.00174ns 0.00119ns 0.00462ns 0 0 0 0 b
#7735 SendRequest net6.0 61.2μs 50.3ns 181ns 0 0 0 14.52 KB
#7735 SendRequest netcoreapp3.1 71.7μs 187ns 988ns 0 0 0 17.42 KB
#7735 SendRequest net472 0.000946ns 0.000801ns 0.0031ns 0 0 0 0 b
Benchmarks.Trace.CharSliceBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #7735

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0 1 B 4 B 3 B 300.00%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 4 B 7 B 3 B 75.00%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master OriginalCharSlice net6.0 1.99ms 1.51μs 5.66μs 0 0 0 640.01 KB
master OriginalCharSlice netcoreapp3.1 2.08ms 2.34μs 8.44μs 0 0 0 640 KB
master OriginalCharSlice net472 2.56ms 385ns 1.33μs 100 0 0 641.95 KB
master OptimizedCharSlice net6.0 1.35ms 422ns 1.58μs 0 0 0 4 B
master OptimizedCharSlice netcoreapp3.1 1.67ms 335ns 1.3μs 0 0 0 1 B
master OptimizedCharSlice net472 2.04ms 268ns 1.04μs 0 0 0 73 B
master OptimizedCharSliceWithPool net6.0 804μs 82.2ns 319ns 0 0 0 1 B
master OptimizedCharSliceWithPool netcoreapp3.1 833μs 97ns 376ns 0 0 0 0 b
master OptimizedCharSliceWithPool net472 1.16ms 103ns 386ns 0 0 0 48 B
#7735 OriginalCharSlice net6.0 1.92ms 4.27μs 16μs 0 0 0 640.01 KB
#7735 OriginalCharSlice netcoreapp3.1 2.18ms 6.38μs 22.1μs 0 0 0 640 KB
#7735 OriginalCharSlice net472 2.69ms 138ns 499ns 100 0 0 641.95 KB
#7735 OptimizedCharSlice net6.0 1.47ms 525ns 2.03μs 0 0 0 7 B
#7735 OptimizedCharSlice netcoreapp3.1 1.69ms 364ns 1.36μs 0 0 0 1 B
#7735 OptimizedCharSlice net472 1.95ms 486ns 1.88μs 0 0 0 73 B
#7735 OptimizedCharSliceWithPool net6.0 810μs 25.2ns 97.7ns 0 0 0 4 B
#7735 OptimizedCharSliceWithPool netcoreapp3.1 800μs 123ns 476ns 0 0 0 0 b
#7735 OptimizedCharSliceWithPool net472 1.14ms 89.4ns 346ns 0 0 0 48 B
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #7735

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 1.178 882,643.08 1,040,124.52

Faster 🎉 in #7735

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 1.200 801,188.33 667,741.52

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 685μs 691ns 2.59μs 0 0 0 41.65 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 788μs 4.27μs 24.5μs 0 0 0 41.96 KB
master WriteAndFlushEnrichedTraces net472 888μs 2.98μs 11.2μs 4.46 0 0 56.03 KB
#7735 WriteAndFlushEnrichedTraces net6.0 748μs 4.21μs 28.2μs 0 0 0 41.66 KB
#7735 WriteAndFlushEnrichedTraces netcoreapp3.1 668μs 551ns 2.13μs 0 0 0 41.97 KB
#7735 WriteAndFlushEnrichedTraces net472 1.04ms 5.4μs 28.1μs 4.81 0 0 55.87 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 8.24ns 29.7ns 0 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 2.64μs 5.83ns 22.6ns 0 0 0 1.02 KB
master ExecuteNonQuery net472 2.88μs 4.19ns 16.2ns 0.145 0.0145 0 987 B
#7735 ExecuteNonQuery net6.0 1.9μs 9.45ns 42.2ns 0 0 0 1.02 KB
#7735 ExecuteNonQuery netcoreapp3.1 2.57μs 12.8ns 55.8ns 0 0 0 1.02 KB
#7735 ExecuteNonQuery net472 2.83μs 2.94ns 10.2ns 0.155 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.72μs 2.57ns 9.94ns 0 0 0 1.03 KB
master CallElasticsearch netcoreapp3.1 2.24μs 9.43ns 36.5ns 0 0 0 1.03 KB
master CallElasticsearch net472 3.72μs 4.5ns 17.4ns 0.149 0 0 1.04 KB
master CallElasticsearchAsync net6.0 1.88μs 4.26ns 16.5ns 0 0 0 1.01 KB
master CallElasticsearchAsync netcoreapp3.1 2.4μs 10.9ns 42.1ns 0 0 0 1.08 KB
master CallElasticsearchAsync net472 3.73μs 3.64ns 13.1ns 0.167 0 0 1.1 KB
#7735 CallElasticsearch net6.0 1.69μs 8.13ns 31.5ns 0 0 0 1.03 KB
#7735 CallElasticsearch netcoreapp3.1 2.22μs 11.5ns 52.7ns 0 0 0 1.03 KB
#7735 CallElasticsearch net472 3.5μs 0.933ns 3.49ns 0.156 0 0 1.04 KB
#7735 CallElasticsearchAsync net6.0 1.79μs 9.35ns 46.7ns 0 0 0 1.01 KB
#7735 CallElasticsearchAsync netcoreapp3.1 2.34μs 12ns 55ns 0 0 0 1.08 KB
#7735 CallElasticsearchAsync net472 3.66μs 7.51ns 29.1ns 0.166 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.94μs 3.89ns 15.1ns 0 0 0 952 B
master ExecuteAsync netcoreapp3.1 2.49μs 7.56ns 28.3ns 0 0 0 952 B
master ExecuteAsync net472 2.61μs 2.16ns 8.07ns 0.142 0 0 915 B
#7735 ExecuteAsync net6.0 1.98μs 0.926ns 3.58ns 0 0 0 952 B
#7735 ExecuteAsync netcoreapp3.1 2.47μs 6.28ns 23.5ns 0 0 0 952 B
#7735 ExecuteAsync net472 2.63μs 1.24ns 4.82ns 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 7.33μs 7.79ns 29.1ns 0 0 0 2.36 KB
master SendAsync netcoreapp3.1 8.77μs 16.5ns 63.9ns 0 0 0 2.9 KB
master SendAsync net472 12.2μs 13.5ns 52.2ns 0.489 0 0 3.18 KB
#7735 SendAsync net6.0 6.97μs 12.6ns 48.7ns 0 0 0 2.36 KB
#7735 SendAsync netcoreapp3.1 8.79μs 27.5ns 106ns 0 0 0 2.9 KB
#7735 SendAsync net472 11.9μs 6.24ns 22.5ns 0.478 0 0 3.18 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Faster 🎉 More allocations ⚠️

Faster 🎉 in #7735

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 1.131 568,100.00 502,400.00

More allocations ⚠️ in #7735

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 57.34 KB 65.54 KB 8.19 KB 14.29%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 43.77 KB 44.26 KB 496 B 1.13%

Fewer allocations 🎉 in #7735

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 275.39 KB 273.35 KB -2.04 KB -0.74%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 278.53 KB 275.05 KB -3.48 KB -1.25%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1 45.55 KB 42.81 KB -2.74 KB -6.02%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 281.72 KB 258.31 KB -23.41 KB -8.31%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark net6.0 43μs 234ns 1.28μs 0 0 0 43.77 KB
master StringConcatBenchmark netcoreapp3.1 57μs 1μs 9.98μs 0 0 0 45.55 KB
master StringConcatBenchmark net472 57.3μs 124ns 446ns 0 0 0 57.34 KB
master StringConcatAspectBenchmark net6.0 496μs 2.24μs 8.08μs 0 0 0 275.39 KB
master StringConcatAspectBenchmark netcoreapp3.1 572μs 2.49μs 8.96μs 0 0 0 281.72 KB
master StringConcatAspectBenchmark net472 409μs 2.34μs 16.5μs 0 0 0 278.53 KB
#7735 StringConcatBenchmark net6.0 45.9μs 366ns 3.43μs 0 0 0 44.26 KB
#7735 StringConcatBenchmark netcoreapp3.1 56.1μs 811ns 8.11μs 0 0 0 42.81 KB
#7735 StringConcatBenchmark net472 57.1μs 263ns 984ns 0 0 0 65.54 KB
#7735 StringConcatAspectBenchmark net6.0 499μs 2.37μs 9.76μs 0 0 0 273.35 KB
#7735 StringConcatAspectBenchmark netcoreapp3.1 502μs 834ns 2.89μs 0 0 0 258.31 KB
#7735 StringConcatAspectBenchmark net472 407μs 2.21μs 11.7μs 0 0 0 275.05 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.64μs 13.2ns 60.5ns 0 0 0 1.7 KB
master EnrichedLog netcoreapp3.1 3.61μs 14.1ns 54.8ns 0 0 0 1.7 KB
master EnrichedLog net472 3.86μs 4.57ns 17.1ns 0.252 0 0 1.64 KB
#7735 EnrichedLog net6.0 2.69μs 12ns 46.3ns 0 0 0 1.7 KB
#7735 EnrichedLog netcoreapp3.1 3.63μs 5.15ns 19.3ns 0 0 0 1.7 KB
#7735 EnrichedLog net472 3.91μs 2.63ns 10.2ns 0.255 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 124μs 335ns 1.16μs 0 0 0 4.31 KB
master EnrichedLog netcoreapp3.1 131μs 617ns 2.47μs 0 0 0 4.31 KB
master EnrichedLog net472 169μs 208ns 806ns 0 0 0 4.52 KB
#7735 EnrichedLog net6.0 123μs 120ns 449ns 0 0 0 4.31 KB
#7735 EnrichedLog netcoreapp3.1 130μs 364ns 1.41μs 0 0 0 4.31 KB
#7735 EnrichedLog net472 168μs 149ns 576ns 0 0 0 4.51 KB
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 5.09μs 16.2ns 62.9ns 0 0 0 2.26 KB
master EnrichedLog netcoreapp3.1 6.67μs 14ns 54.2ns 0 0 0 2.26 KB
master EnrichedLog net472 7.52μs 7.68ns 29.8ns 0.299 0 0 2.08 KB
#7735 EnrichedLog net6.0 5.08μs 3.41ns 13.2ns 0 0 0 2.26 KB
#7735 EnrichedLog netcoreapp3.1 6.89μs 17ns 65.7ns 0 0 0 2.26 KB
#7735 EnrichedLog net472 7.53μs 10.9ns 42.4ns 0.299 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 9.63ns 43.1ns 0 0 0 1.2 KB
master SendReceive netcoreapp3.1 2.65μs 12.6ns 51.8ns 0 0 0 1.2 KB
master SendReceive net472 3.05μs 1.05ns 3.78ns 0.185 0 0 1.2 KB
#7735 SendReceive net6.0 2.03μs 3.56ns 13.8ns 0 0 0 1.2 KB
#7735 SendReceive netcoreapp3.1 2.53μs 12.8ns 57.3ns 0 0 0 1.2 KB
#7735 SendReceive net472 3μs 3.23ns 12.5ns 0.18 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.36μs 16.6ns 64.4ns 0 0 0 1.58 KB
master EnrichedLog netcoreapp3.1 5.66μs 9.37ns 36.3ns 0 0 0 1.63 KB
master EnrichedLog net472 6.58μs 5.97ns 23.1ns 0.294 0 0 2.03 KB
#7735 EnrichedLog net6.0 4.24μs 13.4ns 50.1ns 0 0 0 1.58 KB
#7735 EnrichedLog netcoreapp3.1 5.81μs 10.2ns 39.4ns 0 0 0 1.63 KB
#7735 EnrichedLog net472 6.61μs 5.64ns 21.8ns 0.295 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 757ns 4.15ns 23.8ns 0 0 0 576 B
master StartFinishSpan netcoreapp3.1 959ns 4.17ns 15.6ns 0 0 0 576 B
master StartFinishSpan net472 953ns 0.0777ns 0.28ns 0.0911 0 0 578 B
master StartFinishScope net6.0 930ns 4.33ns 17.3ns 0 0 0 696 B
master StartFinishScope netcoreapp3.1 1.19μs 6.27ns 31.4ns 0 0 0 696 B
master StartFinishScope net472 1.14μs 0.408ns 1.58ns 0.103 0 0 658 B
#7735 StartFinishSpan net6.0 797ns 0.113ns 0.408ns 0 0 0 576 B
#7735 StartFinishSpan netcoreapp3.1 945ns 5.06ns 25.8ns 0 0 0 576 B
#7735 StartFinishSpan net472 957ns 1.82ns 7.04ns 0.0877 0 0 578 B
#7735 StartFinishScope net6.0 910ns 0.162ns 0.628ns 0 0 0 696 B
#7735 StartFinishScope netcoreapp3.1 1.19μs 6.05ns 27.7ns 0 0 0 696 B
#7735 StartFinishScope net472 1.14μs 0.29ns 1.12ns 0.103 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.06μs 5.65ns 29.9ns 0 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 1.42μs 7.31ns 35.8ns 0 0 0 697 B
master RunOnMethodBegin net472 1.43μs 0.603ns 2.33ns 0.0998 0 0 658 B
#7735 RunOnMethodBegin net6.0 1.09μs 2.93ns 11.4ns 0 0 0 696 B
#7735 RunOnMethodBegin netcoreapp3.1 1.41μs 6.91ns 30.1ns 0 0 0 696 B
#7735 RunOnMethodBegin net472 1.45μs 0.821ns 3.18ns 0.101 0 0 658 B

@bouwkast bouwkast merged commit eb16964 into master Nov 3, 2025
69 of 71 checks passed
@bouwkast bouwkast deleted the steven/log4net-null-ref branch November 3, 2025 21:17
@github-actions github-actions bot added this to the vNext-v3 milestone Nov 3, 2025
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.

4 participants