Skip to content

Conversation

@daniel-romano-DD
Copy link
Contributor

@daniel-romano-DD daniel-romano-DD commented Nov 25, 2025

Summary of changes

Added error handling to Waf Encoder dispose and omitted a call to GetPool on disposal

Reason for change

A crash happened here on shutdown

Implementation details

Test coverage

Other details

Copy link
Member

@andrewlock andrewlock left a comment

Choose a reason for hiding this comment

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

Makes sense, thanks!

@pr-commenter
Copy link

pr-commenter bot commented Nov 25, 2025

Benchmarks

Benchmarks Report for benchmark platform 🐌

Benchmarks for #7863 compared to master:

  • 3 benchmarks are slower, with geometric mean 1.384
  • 2 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 ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 10.5μs 57.8ns 342ns 0 0 0 5.53 KB
master StartStopWithChild netcoreapp3.1 13.7μs 69.2ns 317ns 0 0 0 5.73 KB
master StartStopWithChild net472 21.7μs 116ns 634ns 0.978 0.326 0.109 6.05 KB
#7863 StartStopWithChild net6.0 10.6μs 59.1ns 364ns 0 0 0 5.52 KB
#7863 StartStopWithChild netcoreapp3.1 13.8μs 65.7ns 271ns 0 0 0 5.71 KB
#7863 StartStopWithChild net472 21.8μs 117ns 652ns 0.97 0.323 0.108 6.03 KB
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Fewer allocations 🎉

Fewer allocations 🎉 in #7863

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 925μs 227ns 877ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 1.03ms 3.07μs 11.9μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 1.22ms 1.31μs 5.09μs 0 0 0 3.35 KB
#7863 WriteAndFlushEnrichedTraces net6.0 938μs 114ns 412ns 0 0 0 2.7 KB
#7863 WriteAndFlushEnrichedTraces netcoreapp3.1 1.02ms 53.6ns 186ns 0 0 0 2.7 KB
#7863 WriteAndFlushEnrichedTraces net472 1.22ms 867ns 3.24μ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.1μs 5.9ns 34.4ns 0 0 0 1.22 KB
master AllCycleSimpleBody netcoreapp3.1 1.4μs 7.63ns 47.1ns 0 0 0 1.2 KB
master AllCycleSimpleBody net472 1.03μs 0.712ns 2.76ns 0.195 0 0 1.23 KB
master AllCycleMoreComplexBody net6.0 7.39μs 4.48ns 17.3ns 0 0 0 4.72 KB
master AllCycleMoreComplexBody netcoreapp3.1 8.82μs 46.9ns 248ns 0 0 0 4.62 KB
master AllCycleMoreComplexBody net472 7.72μs 2.7ns 10.1ns 0.733 0 0 4.74 KB
master ObjectExtractorSimpleBody net6.0 335ns 0.422ns 1.63ns 0 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 400ns 0.186ns 0.67ns 0 0 0 272 B
master ObjectExtractorSimpleBody net472 309ns 0.215ns 0.806ns 0.0437 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 6.35μs 29.1ns 113ns 0 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 7.81μs 42.1ns 223ns 0 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 6.91μs 4.9ns 19ns 0.59 0 0 3.8 KB
#7863 AllCycleSimpleBody net6.0 1.08μs 6.04ns 38.2ns 0 0 0 1.22 KB
#7863 AllCycleSimpleBody netcoreapp3.1 1.45μs 8.09ns 51.1ns 0 0 0 1.2 KB
#7863 AllCycleSimpleBody net472 1.01μs 0.44ns 1.65ns 0.192 0 0 1.23 KB
#7863 AllCycleMoreComplexBody net6.0 7.28μs 36.1ns 161ns 0 0 0 4.72 KB
#7863 AllCycleMoreComplexBody netcoreapp3.1 8.85μs 46.7ns 238ns 0 0 0 4.62 KB
#7863 AllCycleMoreComplexBody net472 7.59μs 6.31ns 23.6ns 0.718 0 0 4.74 KB
#7863 ObjectExtractorSimpleBody net6.0 352ns 0.123ns 0.478ns 0 0 0 280 B
#7863 ObjectExtractorSimpleBody netcoreapp3.1 404ns 2.11ns 10.8ns 0 0 0 272 B
#7863 ObjectExtractorSimpleBody net472 303ns 0.0138ns 0.0498ns 0.0443 0 0 281 B
#7863 ObjectExtractorMoreComplexBody net6.0 6.3μs 33.1ns 172ns 0 0 0 3.78 KB
#7863 ObjectExtractorMoreComplexBody netcoreapp3.1 7.91μs 39.6ns 177ns 0 0 0 3.69 KB
#7863 ObjectExtractorMoreComplexBody net472 6.7μs 2.26ns 8.47ns 0.57 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.4μs 54.5ns 211ns 0 0 0 32.4 KB
master EncodeArgs netcoreapp3.1 96.8μs 231ns 893ns 0 0 0 32.4 KB
master EncodeArgs net472 109μs 11.8ns 44.2ns 4.93 0 0 32.5 KB
master EncodeLegacyArgs net6.0 144μs 97.9ns 366ns 0 0 0 2.14 KB
master EncodeLegacyArgs netcoreapp3.1 203μs 203ns 702ns 0 0 0 2.14 KB
master EncodeLegacyArgs net472 265μs 328ns 1.27μs 0 0 0 2.16 KB
#7863 EncodeArgs net6.0 77.8μs 220ns 851ns 0 0 0 32.4 KB
#7863 EncodeArgs netcoreapp3.1 96.1μs 398ns 1.54μs 0 0 0 32.4 KB
#7863 EncodeArgs net472 110μs 23.4ns 90.8ns 4.94 0 0 32.51 KB
#7863 EncodeLegacyArgs net6.0 144μs 76.8ns 297ns 0 0 0 2.15 KB
#7863 EncodeLegacyArgs netcoreapp3.1 196μs 165ns 637ns 0 0 0 2.15 KB
#7863 EncodeLegacyArgs net472 262μs 228ns 822ns 0 0 0 2.16 KB
Benchmarks.Trace.Asm.AppSecWafBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #7863

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑net6.0 4.86 KB 5.82 KB 960 B 19.77%
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑net6.0 3.17 KB 3.79 KB 624 B 19.70%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunWafRealisticBenchmark net6.0 455μs 3.07μs 30.4μs 0 0 0 4.86 KB
master RunWafRealisticBenchmark netcoreapp3.1 472μs 2.74μs 23.9μs 0 0 0 4.58 KB
master RunWafRealisticBenchmark net472 495μs 642ns 2.4μs 0 0 0 8.19 KB
master RunWafRealisticBenchmarkWithAttack net6.0 316μs 1.51μs 6.22μs 0 0 0 3.17 KB
master RunWafRealisticBenchmarkWithAttack netcoreapp3.1 329μs 1.26μs 4.38μs 0 0 0 2.32 KB
master RunWafRealisticBenchmarkWithAttack net472 373μs 221ns 766ns 0 0 0 8.19 KB
#7863 RunWafRealisticBenchmark net6.0 431μs 1.63μs 5.89μs 0 0 0 5.82 KB
#7863 RunWafRealisticBenchmark netcoreapp3.1 648μs 20.1μs 201μs 0 0 0 4.58 KB
#7863 RunWafRealisticBenchmark net472 502μs 642ns 2.49μs 0 0 0 8.19 KB
#7863 RunWafRealisticBenchmarkWithAttack net6.0 310μs 566ns 1.96μs 0 0 0 3.79 KB
#7863 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 351μs 3.2μs 30.7μs 0 0 0 2.32 KB
#7863 RunWafRealisticBenchmarkWithAttack net472 370μs 298ns 1.11μs 0 0 0 8.19 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.3μs 60.9ns 236ns 0 0 0 14.52 KB
master SendRequest netcoreapp3.1 71.2μs 353ns 1.54μs 0 0 0 17.42 KB
master SendRequest net472 0.00388ns 0.00227ns 0.00879ns 0 0 0 0 b
#7863 SendRequest net6.0 61.3μs 37.8ns 147ns 0 0 0 14.52 KB
#7863 SendRequest netcoreapp3.1 72.9μs 354ns 1.54μs 0 0 0 17.49 KB
#7863 SendRequest net472 0.164ns 0.00274ns 0.0106ns 0 0 0 0 b
Benchmarks.Trace.CharSliceBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #7863

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice‑netcoreapp3.1 1.930 2,183,250.00 4,212,750.00
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 1.179 1,376,200.00 1,622,300.00

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master OriginalCharSlice net6.0 1.94ms 534ns 2.07μs 0 0 0 640.64 KB
master OriginalCharSlice netcoreapp3.1 2.2ms 12μs 76.1μs 0 0 0 640.1 KB
master OriginalCharSlice net472 2.6ms 979ns 3.79μs 0 0 0 647.17 KB
master OptimizedCharSlice net6.0 1.38ms 678ns 2.54μs 0 0 0 640 B
master OptimizedCharSlice netcoreapp3.1 2.81ms 708ns 2.55μs 0 0 0 104 B
master OptimizedCharSlice net472 1.98ms 1.07μs 4.14μs 0 0 0 8.19 KB
master OptimizedCharSliceWithPool net6.0 1.1ms 1.67μs 6.47μs 0 0 0 640 B
master OptimizedCharSliceWithPool netcoreapp3.1 1.86ms 1.99μs 7.69μs 0 0 0 104 B
master OptimizedCharSliceWithPool net472 1.13ms 658ns 2.55μs 0 0 0 8.19 KB
#7863 OriginalCharSlice net6.0 1.89ms 658ns 2.37μs 0 0 0 640.64 KB
#7863 OriginalCharSlice netcoreapp3.1 4.2ms 9.31μs 34.8μs 0 0 0 640.1 KB
#7863 OriginalCharSlice net472 2.67ms 399ns 1.44μs 0 0 0 647.17 KB
#7863 OptimizedCharSlice net6.0 1.62ms 582ns 2.25μs 0 0 0 640 B
#7863 OptimizedCharSlice netcoreapp3.1 2.78ms 683ns 2.55μs 0 0 0 104 B
#7863 OptimizedCharSlice net472 1.96ms 456ns 1.76μs 0 0 0 8.19 KB
#7863 OptimizedCharSliceWithPool net6.0 1.01ms 436ns 1.69μs 0 0 0 640 B
#7863 OptimizedCharSliceWithPool netcoreapp3.1 1.86ms 1.7μs 6.36μs 0 0 0 104 B
#7863 OptimizedCharSliceWithPool net472 1.13ms 764ns 2.96μs 0 0 0 8.19 KB
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 694μs 4.11μs 41.1μs 0 0 0 41.57 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 768μs 1.67μs 6.47μs 0 0 0 41.75 KB
master WriteAndFlushEnrichedTraces net472 907μs 3.38μs 12.6μs 8.33 0 0 55.71 KB
#7863 WriteAndFlushEnrichedTraces net6.0 698μs 3.87μs 25.1μs 0 0 0 41.67 KB
#7863 WriteAndFlushEnrichedTraces netcoreapp3.1 760μs 2.66μs 9.2μs 0 0 0 41.76 KB
#7863 WriteAndFlushEnrichedTraces net472 898μs 3.28μs 12.7μs 4.46 0 0 55.61 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.92μs 8.46ns 32.8ns 0 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 2.61μs 2.14ns 8.27ns 0 0 0 1.02 KB
master ExecuteNonQuery net472 2.74μs 2.31ns 8.96ns 0.149 0 0 987 B
#7863 ExecuteNonQuery net6.0 1.97μs 10.2ns 47.9ns 0 0 0 1.02 KB
#7863 ExecuteNonQuery netcoreapp3.1 2.55μs 12.7ns 52.2ns 0 0 0 1.02 KB
#7863 ExecuteNonQuery net472 2.76μs 2.37ns 9.16ns 0.152 0 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.77μs 9.53ns 54.7ns 0 0 0 1.03 KB
master CallElasticsearch netcoreapp3.1 2.29μs 7.02ns 27.2ns 0 0 0 1.03 KB
master CallElasticsearch net472 3.44μs 3.17ns 12.3ns 0.153 0 0 1.04 KB
master CallElasticsearchAsync net6.0 1.81μs 0.262ns 0.909ns 0 0 0 1.01 KB
master CallElasticsearchAsync netcoreapp3.1 2.52μs 13ns 59.5ns 0 0 0 1.08 KB
master CallElasticsearchAsync net472 3.75μs 3.81ns 14.8ns 0.168 0 0 1.1 KB
#7863 CallElasticsearch net6.0 1.7μs 7.04ns 27.3ns 0 0 0 1.03 KB
#7863 CallElasticsearch netcoreapp3.1 2.34μs 11.5ns 48.8ns 0 0 0 1.03 KB
#7863 CallElasticsearch net472 3.47μs 4.51ns 17.5ns 0.154 0 0 1.04 KB
#7863 CallElasticsearchAsync net6.0 1.78μs 7.26ns 28.1ns 0 0 0 1.01 KB
#7863 CallElasticsearchAsync netcoreapp3.1 2.52μs 11.4ns 44ns 0 0 0 1.08 KB
#7863 CallElasticsearchAsync net472 3.72μs 4.03ns 15.1ns 0.168 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.95μs 9.67ns 41ns 0 0 0 952 B
master ExecuteAsync netcoreapp3.1 2.37μs 11.4ns 48.2ns 0 0 0 952 B
master ExecuteAsync net472 2.54μs 1.31ns 4.72ns 0.14 0 0 915 B
#7863 ExecuteAsync net6.0 1.89μs 8.69ns 33.6ns 0 0 0 952 B
#7863 ExecuteAsync netcoreapp3.1 2.36μs 6.52ns 25.2ns 0 0 0 952 B
#7863 ExecuteAsync net472 2.55μs 1.95ns 7.3ns 0.141 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.9μs 16.7ns 64.5ns 0 0 0 2.36 KB
master SendAsync netcoreapp3.1 8.48μs 33.9ns 127ns 0 0 0 2.9 KB
master SendAsync net472 12μs 6.54ns 25.3ns 0.481 0 0 3.18 KB
#7863 SendAsync net6.0 6.91μs 19.9ns 76.9ns 0 0 0 2.36 KB
#7863 SendAsync netcoreapp3.1 8.57μs 27.5ns 106ns 0 0 0 2.9 KB
#7863 SendAsync net472 12.1μs 6.4ns 23.9ns 0.485 0 0 3.18 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Slower ⚠️ More allocations ⚠️

Slower ⚠️ in #7863

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 1.164 456,750.00 531,850.00 several?

More allocations ⚠️ in #7863

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 278.53 KB 286.72 KB 8.19 KB 2.94%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 43.14 KB 44.1 KB 952 B 2.21%

Fewer allocations 🎉 in #7863

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 259.38 KB 256.05 KB -3.34 KB -1.29%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark net6.0 44.5μs 211ns 1.49μs 0 0 0 43.14 KB
master StringConcatBenchmark netcoreapp3.1 56.6μs 711ns 6.93μs 0 0 0 45.5 KB
master StringConcatBenchmark net472 57.3μs 181ns 700ns 0 0 0 57.34 KB
master StringConcatAspectBenchmark net6.0 475μs 2.32μs 10.9μs 0 0 0 259.38 KB
master StringConcatAspectBenchmark netcoreapp3.1 467μs 6.54μs 64.8μs 0 0 0 275.06 KB
master StringConcatAspectBenchmark net472 407μs 2.06μs 10.1μs 0 0 0 278.53 KB
#7863 StringConcatBenchmark net6.0 44.5μs 244ns 1.36μs 0 0 0 44.1 KB
#7863 StringConcatBenchmark netcoreapp3.1 50.2μs 298ns 2.89μs 0 0 0 45.5 KB
#7863 StringConcatBenchmark net472 56.5μs 238ns 889ns 0 0 0 57.34 KB
#7863 StringConcatAspectBenchmark net6.0 458μs 1.89μs 8.65μs 0 0 0 256.05 KB
#7863 StringConcatAspectBenchmark netcoreapp3.1 534μs 2.55μs 11.4μs 0 0 0 274.81 KB
#7863 StringConcatAspectBenchmark net472 402μs 1.87μs 7.73μ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.81μs 8.8ns 34.1ns 0 0 0 1.7 KB
master EnrichedLog netcoreapp3.1 3.64μs 2.03ns 7.88ns 0 0 0 1.7 KB
master EnrichedLog net472 3.88μs 4.68ns 18.1ns 0.252 0 0 1.64 KB
#7863 EnrichedLog net6.0 2.7μs 12.6ns 50.3ns 0 0 0 1.7 KB
#7863 EnrichedLog netcoreapp3.1 3.62μs 18.5ns 82.8ns 0 0 0 1.7 KB
#7863 EnrichedLog net472 3.86μs 5.05ns 19.5ns 0.251 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 126μs 67.7ns 253ns 0 0 0 4.31 KB
master EnrichedLog netcoreapp3.1 127μs 237ns 916ns 0 0 0 4.31 KB
master EnrichedLog net472 169μs 86.4ns 335ns 0 0 0 4.52 KB
#7863 EnrichedLog net6.0 127μs 712ns 4.83μs 0 0 0 4.31 KB
#7863 EnrichedLog netcoreapp3.1 130μs 676ns 4.17μs 0 0 0 4.31 KB
#7863 EnrichedLog net472 168μs 256ns 885ns 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 4.95μs 23.2ns 90ns 0 0 0 2.26 KB
master EnrichedLog netcoreapp3.1 6.88μs 20ns 77.6ns 0 0 0 2.26 KB
master EnrichedLog net472 7.73μs 4.93ns 18.4ns 0.31 0 0 2.08 KB
#7863 EnrichedLog net6.0 5.01μs 5.67ns 22ns 0 0 0 2.26 KB
#7863 EnrichedLog netcoreapp3.1 6.83μs 27.3ns 106ns 0 0 0 2.26 KB
#7863 EnrichedLog net472 7.53μs 5.71ns 22.1ns 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.95μs 3.5ns 13.6ns 0 0 0 1.2 KB
master SendReceive netcoreapp3.1 2.58μs 10.7ns 41.4ns 0 0 0 1.2 KB
master SendReceive net472 3.06μs 5.86ns 22.7ns 0.182 0 0 1.2 KB
#7863 SendReceive net6.0 1.97μs 0.894ns 3.22ns 0 0 0 1.2 KB
#7863 SendReceive netcoreapp3.1 2.59μs 12.5ns 52.9ns 0 0 0 1.2 KB
#7863 SendReceive net472 3.01μs 3.07ns 11.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.21μs 10.7ns 40.1ns 0 0 0 1.58 KB
master EnrichedLog netcoreapp3.1 5.76μs 16.3ns 63.2ns 0 0 0 1.63 KB
master EnrichedLog net472 6.52μs 7.65ns 29.6ns 0.322 0 0 2.03 KB
#7863 EnrichedLog net6.0 4.42μs 4.17ns 15.6ns 0 0 0 1.58 KB
#7863 EnrichedLog netcoreapp3.1 5.89μs 13.7ns 52.9ns 0 0 0 1.63 KB
#7863 EnrichedLog net472 6.52μs 7.1ns 26.6ns 0.292 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 785ns 3.85ns 15.9ns 0 0 0 576 B
master StartFinishSpan netcoreapp3.1 944ns 5.1ns 28.4ns 0 0 0 576 B
master StartFinishSpan net472 924ns 0.0604ns 0.218ns 0.0879 0 0 578 B
master StartFinishScope net6.0 928ns 2.32ns 8.66ns 0 0 0 696 B
master StartFinishScope netcoreapp3.1 1.13μs 5.97ns 32.7ns 0 0 0 696 B
master StartFinishScope net472 1.1μs 0.061ns 0.236ns 0.104 0 0 658 B
#7863 StartFinishSpan net6.0 791ns 0.502ns 1.94ns 0 0 0 576 B
#7863 StartFinishSpan netcoreapp3.1 964ns 5.14ns 27.2ns 0 0 0 576 B
#7863 StartFinishSpan net472 937ns 0.908ns 3.52ns 0.0895 0 0 578 B
#7863 StartFinishScope net6.0 969ns 4.81ns 20.4ns 0 0 0 696 B
#7863 StartFinishScope netcoreapp3.1 1.15μs 5.75ns 27ns 0 0 0 696 B
#7863 StartFinishScope net472 1.11μs 0.0873ns 0.327ns 0.1 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.14μs 5.86ns 26.8ns 0 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 1.41μs 0.35ns 1.31ns 0 0 0 696 B
master RunOnMethodBegin net472 1.5μs 1.77ns 6.84ns 0.104 0 0 658 B
#7863 RunOnMethodBegin net6.0 1.09μs 5.25ns 21ns 0 0 0 696 B
#7863 RunOnMethodBegin netcoreapp3.1 1.42μs 5.53ns 21.4ns 0 0 0 696 B
#7863 RunOnMethodBegin net472 1.49μs 2.99ns 11.6ns 0.104 0 0 658 B

@daniel-romano-DD daniel-romano-DD marked this pull request as ready for review November 25, 2025 17:30
@daniel-romano-DD daniel-romano-DD requested a review from a team as a code owner November 25, 2025 17:30
@datadog-official

This comment has been minimized.

@daniel-romano-DD daniel-romano-DD force-pushed the dani/asm/waf_encoder_dispose_fix branch from d084ded to 660f998 Compare November 26, 2025 08:42
@dd-trace-dotnet-ci-bot
Copy link

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (7863) 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
duration76.34 ± (76.61 - 77.87) ms74.66 ± (74.74 - 75.53) ms-2.2%
.NET Framework 4.8 - Bailout
duration81.71 ± (81.19 - 82.00) ms80.03 ± (80.12 - 80.81) ms-2.1%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1058.83 ± (1061.66 - 1072.63) ms1065.94 ± (1072.19 - 1083.38) ms+0.7%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms22.99 ± (22.92 - 23.07) ms22.92 ± (22.84 - 23.00) ms-0.3%
process.time_to_main_ms88.00 ± (87.63 - 88.36) ms88.62 ± (88.27 - 88.96) ms+0.7%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.93 ± (10.92 - 10.93) MB10.94 ± (10.93 - 10.94) MB+0.1%✅⬆️
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.87 ± (22.80 - 22.93) ms22.82 ± (22.75 - 22.89) ms-0.2%
process.time_to_main_ms88.62 ± (88.28 - 88.96) ms89.76 ± (89.35 - 90.17) ms+1.3%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.97 ± (10.97 - 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_ms221.21 ± (219.80 - 222.62) ms223.21 ± (221.50 - 224.93) ms+0.9%✅⬆️
process.time_to_main_ms502.80 ± (501.68 - 503.93) ms503.97 ± (502.88 - 505.06) ms+0.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed47.79 ± (47.77 - 47.81) MB47.77 ± (47.75 - 47.80) MB-0.0%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.1%
.NET 6 - Baseline
process.internal_duration_ms21.71 ± (21.65 - 21.78) ms21.88 ± (21.81 - 21.95) ms+0.8%✅⬆️
process.time_to_main_ms76.11 ± (75.78 - 76.43) ms77.90 ± (77.57 - 78.24) ms+2.4%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.62 ± (10.61 - 10.62) MB10.64 ± (10.63 - 10.64) MB+0.2%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms21.62 ± (21.56 - 21.68) ms21.65 ± (21.60 - 21.70) ms+0.1%✅⬆️
process.time_to_main_ms77.63 ± (77.40 - 77.87) ms77.98 ± (77.71 - 78.25) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.66 ± (10.66 - 10.67) MB10.73 ± (10.73 - 10.73) MB+0.7%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms212.71 ± (210.50 - 214.92) ms210.95 ± (209.41 - 212.49) ms-0.8%
process.time_to_main_ms468.61 ± (467.66 - 469.56) ms469.65 ± (468.64 - 470.66) ms+0.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.07 ± (48.04 - 48.09) MB48.17 ± (48.15 - 48.20) MB+0.2%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.0%
.NET 8 - Baseline
process.internal_duration_ms19.96 ± (19.90 - 20.02) ms20.01 ± (19.94 - 20.08) ms+0.2%✅⬆️
process.time_to_main_ms76.03 ± (75.71 - 76.34) ms76.06 ± (75.71 - 76.40) ms+0.0%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.66 ± (7.65 - 7.66) MB7.65 ± (7.64 - 7.66) MB-0.1%
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.77 ± (19.72 - 19.82) ms19.90 ± (19.84 - 19.97) ms+0.7%✅⬆️
process.time_to_main_ms76.60 ± (76.31 - 76.89) ms76.76 ± (76.41 - 77.11) ms+0.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.72 ± (7.71 - 7.73) MB7.70 ± (7.69 - 7.71) MB-0.2%
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms194.36 ± (193.53 - 195.20) ms193.55 ± (192.70 - 194.40) ms-0.4%
process.time_to_main_ms458.40 ± (457.49 - 459.31) ms459.65 ± (458.70 - 460.59) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed36.51 ± (36.48 - 36.55) MB36.48 ± (36.44 - 36.51) MB-0.1%
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)-0.4%

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration193.00 ± (193.02 - 193.73) ms193.05 ± (193.35 - 194.23) ms+0.0%✅⬆️
.NET Framework 4.8 - Bailout
duration196.66 ± (196.38 - 196.88) ms196.80 ± (196.40 - 197.08) ms+0.1%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1103.80 ± (1107.57 - 1117.12) ms1101.92 ± (1106.83 - 1115.84) ms-0.2%
.NET Core 3.1 - Baseline
process.internal_duration_ms187.91 ± (187.47 - 188.35) ms188.09 ± (187.77 - 188.41) ms+0.1%✅⬆️
process.time_to_main_ms81.05 ± (80.82 - 81.28) ms80.90 ± (80.69 - 81.11) ms-0.2%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.12 ± (16.09 - 16.15) MB16.09 ± (16.06 - 16.12) MB-0.2%
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+0.6%✅⬆️
.NET Core 3.1 - Bailout
process.internal_duration_ms187.15 ± (186.89 - 187.42) ms187.85 ± (187.54 - 188.17) ms+0.4%✅⬆️
process.time_to_main_ms82.03 ± (81.87 - 82.19) ms82.24 ± (82.06 - 82.41) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.22 ± (16.17 - 16.26) MB16.15 ± (16.13 - 16.18) MB-0.4%
runtime.dotnet.threads.count20 ± (20 - 21)21 ± (21 - 21)+1.6%✅⬆️
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms404.94 ± (402.15 - 407.73) ms404.78 ± (401.46 - 408.09) ms-0.0%
process.time_to_main_ms472.20 ± (471.58 - 472.82) ms473.42 ± (472.80 - 474.04) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed58.65 ± (58.54 - 58.77) MB58.58 ± (58.46 - 58.70) MB-0.1%
runtime.dotnet.threads.count29 ± (29 - 29)30 ± (29 - 30)+0.1%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms192.30 ± (191.93 - 192.67) ms192.06 ± (191.66 - 192.46) ms-0.1%
process.time_to_main_ms70.13 ± (69.97 - 70.28) ms69.91 ± (69.74 - 70.07) ms-0.3%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.08 ± (15.93 - 16.22) MB16.03 ± (15.89 - 16.18) MB-0.3%
runtime.dotnet.threads.count18 ± (18 - 19)19 ± (19 - 19)+2.6%✅⬆️
.NET 6 - Bailout
process.internal_duration_ms191.25 ± (190.97 - 191.53) ms191.61 ± (191.33 - 191.89) ms+0.2%✅⬆️
process.time_to_main_ms71.02 ± (70.91 - 71.13) ms70.80 ± (70.70 - 70.89) ms-0.3%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.28 ± (16.15 - 16.41) MB16.07 ± (15.91 - 16.22) MB-1.3%
runtime.dotnet.threads.count19 ± (19 - 20)20 ± (19 - 20)+2.1%✅⬆️
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms413.80 ± (410.81 - 416.79) ms414.05 ± (411.03 - 417.06) ms+0.1%✅⬆️
process.time_to_main_ms442.05 ± (441.42 - 442.68) ms441.00 ± (440.43 - 441.57) ms-0.2%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed58.75 ± (58.62 - 58.89) MB58.54 ± (58.39 - 58.68) MB-0.4%
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (29 - 30)-0.3%
.NET 8 - Baseline
process.internal_duration_ms190.39 ± (190.11 - 190.68) ms190.23 ± (189.91 - 190.56) ms-0.1%
process.time_to_main_ms69.58 ± (69.39 - 69.77) ms69.44 ± (69.29 - 69.60) ms-0.2%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.78 ± (11.75 - 11.81) MB11.76 ± (11.74 - 11.79) MB-0.1%
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 18)-0.2%
.NET 8 - Bailout
process.internal_duration_ms190.22 ± (189.90 - 190.55) ms190.09 ± (189.81 - 190.37) ms-0.1%
process.time_to_main_ms70.73 ± (70.59 - 70.86) ms70.56 ± (70.44 - 70.67) ms-0.2%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.81 ± (11.78 - 11.84) MB11.77 ± (11.73 - 11.82) MB-0.3%
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-0.6%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms366.87 ± (365.36 - 368.39) ms362.75 ± (361.19 - 364.31) ms-1.1%
process.time_to_main_ms428.95 ± (428.39 - 429.51) ms428.17 ± (427.49 - 428.85) ms-0.2%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed47.76 ± (47.73 - 47.78) MB47.81 ± (47.78 - 47.85) MB+0.1%✅⬆️
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 29)-0.0%
Comparison explanation

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

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

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

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

Duration charts
FakeDbCommand (.NET Framework 4.8)
gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7863) - mean (75ms)  : 70, 81
    master - mean (77ms)  : 67, 87

    section Bailout
    This PR (7863) - mean (80ms)  : 76, 85
    master - mean (82ms)  : 75, 88

    section CallTarget+Inlining+NGEN
    This PR (7863) - mean (1,078ms)  : 998, 1157
    master - mean (1,067ms)  : 986, 1148

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 (7863) - mean (119ms)  : 113, 126
    master - mean (119ms)  : 112, 125

    section Bailout
    This PR (7863) - mean (120ms)  : 112, 129
    master - mean (119ms)  : 113, 125

    section CallTarget+Inlining+NGEN
    This PR (7863) - mean (767ms)  : 720, 813
    master - mean (765ms)  : 723, 807

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7863) - mean (107ms)  : 101, 113
    master - mean (105ms)  : 99, 111

    section Bailout
    This PR (7863) - mean (107ms)  : 101, 113
    master - mean (106ms)  : 102, 111

    section CallTarget+Inlining+NGEN
    This PR (7863) - mean (711ms)  : 665, 757
    master - mean (712ms)  : 668, 756

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

    section Bailout
    This PR (7863) - mean (105ms)  : 99, 112
    master - mean (105ms)  : 99, 111

    section CallTarget+Inlining+NGEN
    This PR (7863) - mean (692ms)  : 666, 717
    master - mean (695ms)  : 668, 721

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 (7863) - mean (194ms)  : 189, 199
    master - mean (193ms)  : 190, 197

    section Bailout
    This PR (7863) - mean (197ms)  : 193, 200
    master - mean (197ms)  : 194, 199

    section CallTarget+Inlining+NGEN
    This PR (7863) - mean (1,111ms)  : 1045, 1178
    master - mean (1,112ms)  : 1042, 1183

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

    section Bailout
    This PR (7863) - mean (278ms)  : 273, 283
    master - mean (277ms)  : 274, 281

    section CallTarget+Inlining+NGEN
    This PR (7863) - mean (912ms)  : 863, 962
    master - mean (912ms)  : 861, 963

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

    section Bailout
    This PR (7863) - mean (270ms)  : 267, 274
    master - mean (270ms)  : 267, 273

    section CallTarget+Inlining+NGEN
    This PR (7863) - mean (888ms)  : 831, 945
    master - mean (891ms)  : 836, 945

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

    section Bailout
    This PR (7863) - mean (270ms)  : 267, 273
    master - mean (270ms)  : 265, 276

    section CallTarget+Inlining+NGEN
    This PR (7863) - mean (822ms)  : 804, 840
    master - mean (827ms)  : 807, 847

Loading

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants