-
Notifications
You must be signed in to change notification settings - Fork 151
Avoid SQL connection flakines in integration tests #7854
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (7854) and master. ✅ No regressions detected - check the details below Full Metrics ComparisonFakeDbCommand
HttpMessageHandler
Comparison explanationExecution-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:
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 chartsFakeDbCommand (.NET Framework 4.8)gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7854) - mean (75ms) : 71, 80
master - mean (77ms) : 71, 82
section Bailout
This PR (7854) - mean (80ms) : 75, 86
master - mean (79ms) : 73, 85
section CallTarget+Inlining+NGEN
This PR (7854) - mean (1,075ms) : 979, 1172
master - mean (1,061ms) : 983, 1138
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 (7854) - mean (119ms) : 113, 125
master - mean (119ms) : 113, 125
section Bailout
This PR (7854) - mean (119ms) : 112, 126
master - mean (119ms) : 111, 126
section CallTarget+Inlining+NGEN
This PR (7854) - mean (769ms) : 716, 823
master - mean (763ms) : 707, 819
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7854) - mean (105ms) : 97, 112
master - mean (105ms) : 100, 110
section Bailout
This PR (7854) - mean (105ms) : 99, 111
master - mean (106ms) : 100, 111
section CallTarget+Inlining+NGEN
This PR (7854) - mean (730ms) : 674, 786
master - mean (708ms) : 671, 745
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7854) - mean (104ms) : 97, 110
master - mean (103ms) : 95, 111
section Bailout
This PR (7854) - mean (105ms) : 98, 112
master - mean (105ms) : 99, 111
section CallTarget+Inlining+NGEN
This PR (7854) - mean (689ms) : 666, 712
master - mean (690ms) : 658, 721
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 (7854) - mean (198ms) : 194, 203
master - mean (193ms) : 189, 197
section Bailout
This PR (7854) - mean (202ms) : 199, 205
master - mean (197ms) : 194, 200
section CallTarget+Inlining+NGEN
This PR (7854) - mean (1,151ms) : 1101, 1201
master - mean (1,123ms) : 1049, 1198
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 (7854) - mean (291ms) : 280, 302
master - mean (278ms) : 273, 283
section Bailout
This PR (7854) - mean (287ms) : 280, 293
master - mean (278ms) : 274, 282
section CallTarget+Inlining+NGEN
This PR (7854) - mean (965ms) : 906, 1025
master - mean (913ms) : 856, 971
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7854) - mean (289ms) : 277, 301
master - mean (272ms) : 265, 278
section Bailout
This PR (7854) - mean (290ms) : crit, 273, 307
master - mean (271ms) : 267, 274
section CallTarget+Inlining+NGEN
This PR (7854) - mean (976ms) : crit, 914, 1038
master - mean (888ms) : 844, 931
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7854) - mean (290ms) : 276, 304
master - mean (270ms) : 264, 276
section Bailout
This PR (7854) - mean (286ms) : crit, 274, 298
master - mean (270ms) : 266, 274
section CallTarget+Inlining+NGEN
This PR (7854) - mean (902ms) : crit, 859, 945
master - mean (830ms) : 812, 849
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This comment has been minimized.
This comment has been minimized.
BenchmarksBenchmarks Report for benchmark platform 🐌Benchmarks for #7854 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored. Benchmark detailsBenchmarks.Trace.ActivityBenchmark - Same speed ✔️ More allocations
|
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net472 | 6.01 KB | 6.09 KB | 79 B | 1.31% |
| Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑netcoreapp3.1 | 5.71 KB | 5.76 KB | 47 B | 0.82% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StartStopWithChild |
net6.0 | 9.99μs | 54.5ns | 332ns | 0 | 0 | 0 | 5.5 KB |
| master | StartStopWithChild |
netcoreapp3.1 | 13.6μs | 70.4ns | 330ns | 0 | 0 | 0 | 5.71 KB |
| master | StartStopWithChild |
net472 | 21.8μs | 120ns | 741ns | 0.978 | 0.435 | 0.109 | 6.01 KB |
| #7854 | StartStopWithChild |
net6.0 | 11.1μs | 53.9ns | 216ns | 0 | 0 | 0 | 5.52 KB |
| #7854 | StartStopWithChild |
netcoreapp3.1 | 14.7μs | 68.5ns | 274ns | 0 | 0 | 0 | 5.76 KB |
| #7854 | StartStopWithChild |
net472 | 21.5μs | 101ns | 378ns | 1.04 | 0.345 | 0.115 | 6.09 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 | 939μs | 45.8ns | 177ns | 0 | 0 | 0 | 2.7 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.02ms | 623ns | 2.41μs | 0 | 0 | 0 | 2.7 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 1.22ms | 61.8ns | 231ns | 0 | 0 | 0 | 3.31 KB |
| #7854 | WriteAndFlushEnrichedTraces |
net6.0 | 927μs | 69.1ns | 249ns | 0 | 0 | 0 | 2.71 KB |
| #7854 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.02ms | 124ns | 446ns | 0 | 0 | 0 | 2.7 KB |
| #7854 | WriteAndFlushEnrichedTraces |
net472 | 1.22ms | 587ns | 2.12μ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.09μs | 1.29ns | 5.01ns | 0 | 0 | 0 | 1.22 KB |
| master | AllCycleSimpleBody |
netcoreapp3.1 | 1.39μs | 7.67ns | 46.6ns | 0 | 0 | 0 | 1.2 KB |
| master | AllCycleSimpleBody |
net472 | 1.03μs | 0.897ns | 3.47ns | 0.194 | 0 | 0 | 1.23 KB |
| master | AllCycleMoreComplexBody |
net6.0 | 7.28μs | 33.8ns | 131ns | 0 | 0 | 0 | 4.72 KB |
| master | AllCycleMoreComplexBody |
netcoreapp3.1 | 8.98μs | 32ns | 124ns | 0 | 0 | 0 | 4.62 KB |
| master | AllCycleMoreComplexBody |
net472 | 7.7μs | 4.79ns | 18.6ns | 0.729 | 0 | 0 | 4.74 KB |
| master | ObjectExtractorSimpleBody |
net6.0 | 331ns | 1.68ns | 7.52ns | 0 | 0 | 0 | 280 B |
| master | ObjectExtractorSimpleBody |
netcoreapp3.1 | 401ns | 2.2ns | 12.2ns | 0 | 0 | 0 | 272 B |
| master | ObjectExtractorSimpleBody |
net472 | 298ns | 0.167ns | 0.648ns | 0.0436 | 0 | 0 | 281 B |
| master | ObjectExtractorMoreComplexBody |
net6.0 | 6.4μs | 30.1ns | 141ns | 0 | 0 | 0 | 3.78 KB |
| master | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.86μs | 29.1ns | 113ns | 0 | 0 | 0 | 3.69 KB |
| master | ObjectExtractorMoreComplexBody |
net472 | 6.67μs | 5.3ns | 19.8ns | 0.602 | 0 | 0 | 3.8 KB |
| #7854 | AllCycleSimpleBody |
net6.0 | 1.05μs | 6.27ns | 62.7ns | 0 | 0 | 0 | 1.22 KB |
| #7854 | AllCycleSimpleBody |
netcoreapp3.1 | 1.43μs | 7.01ns | 29.7ns | 0 | 0 | 0 | 1.2 KB |
| #7854 | AllCycleSimpleBody |
net472 | 1.04μs | 0.391ns | 1.46ns | 0.192 | 0 | 0 | 1.23 KB |
| #7854 | AllCycleMoreComplexBody |
net6.0 | 7.03μs | 36ns | 180ns | 0 | 0 | 0 | 4.72 KB |
| #7854 | AllCycleMoreComplexBody |
netcoreapp3.1 | 9.22μs | 43.9ns | 175ns | 0 | 0 | 0 | 4.62 KB |
| #7854 | AllCycleMoreComplexBody |
net472 | 7.69μs | 2.82ns | 10.6ns | 0.734 | 0 | 0 | 4.74 KB |
| #7854 | ObjectExtractorSimpleBody |
net6.0 | 318ns | 0.313ns | 1.21ns | 0 | 0 | 0 | 280 B |
| #7854 | ObjectExtractorSimpleBody |
netcoreapp3.1 | 415ns | 2.06ns | 8.5ns | 0 | 0 | 0 | 272 B |
| #7854 | ObjectExtractorSimpleBody |
net472 | 294ns | 0.0374ns | 0.14ns | 0.0445 | 0 | 0 | 281 B |
| #7854 | ObjectExtractorMoreComplexBody |
net6.0 | 6.26μs | 28.8ns | 115ns | 0 | 0 | 0 | 3.78 KB |
| #7854 | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.77μs | 38.4ns | 172ns | 0 | 0 | 0 | 3.69 KB |
| #7854 | ObjectExtractorMoreComplexBody |
net472 | 6.69μs | 2.05ns | 7.93ns | 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 | 76.6μs | 213ns | 796ns | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
netcoreapp3.1 | 96.3μs | 207ns | 774ns | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
net472 | 112μs | 7.66ns | 26.5ns | 5.03 | 0 | 0 | 32.51 KB |
| master | EncodeLegacyArgs |
net6.0 | 145μs | 25.7ns | 99.6ns | 0 | 0 | 0 | 2.15 KB |
| master | EncodeLegacyArgs |
netcoreapp3.1 | 197μs | 83.5ns | 289ns | 0 | 0 | 0 | 2.14 KB |
| master | EncodeLegacyArgs |
net472 | 264μs | 96ns | 372ns | 0 | 0 | 0 | 2.16 KB |
| #7854 | EncodeArgs |
net6.0 | 77.3μs | 62.2ns | 224ns | 0 | 0 | 0 | 32.4 KB |
| #7854 | EncodeArgs |
netcoreapp3.1 | 97.6μs | 87.2ns | 326ns | 0 | 0 | 0 | 32.4 KB |
| #7854 | EncodeArgs |
net472 | 109μs | 18.5ns | 69.1ns | 4.9 | 0 | 0 | 32.51 KB |
| #7854 | EncodeLegacyArgs |
net6.0 | 144μs | 314ns | 1.22μs | 0 | 0 | 0 | 2.15 KB |
| #7854 | EncodeLegacyArgs |
netcoreapp3.1 | 197μs | 228ns | 882ns | 0 | 0 | 0 | 2.14 KB |
| #7854 | EncodeLegacyArgs |
net472 | 264μs | 70.2ns | 272ns | 0 | 0 | 0 | 2.16 KB |
Benchmarks.Trace.Asm.AppSecWafBenchmark - Slower ⚠️ Fewer allocations 🎉
Slower ⚠️ in #7854
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1
2.150
340,000.00
731,127.23
Faster 🎉 in #7854
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑net472
1.199
370,650.00
309,194.05
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑net6.0
1.173
456,200.00
388,807.52
several?
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑netcoreapp3.1
1.171
490,600.00
418,844.79
bimodal
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑net472
1.167
503,150.00
431,148.71
Fewer allocations 🎉 in #7854
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑netcoreapp3.1
4.58 KB
4.48 KB
-104 B
-2.27%
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1
2.32 KB
2.22 KB
-104 B
-4.48%
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑net6.0
5.48 KB
4.55 KB
-927 B
-16.92%
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑net6.0
3.5 KB
2.24 KB
-1.26 KB
-36.02%
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑net472
8.19 KB
4.66 KB
-3.53 KB
-43.10%
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑net472
8.19 KB
2.29 KB
-5.91 KB
-72.11%
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1 | 2.150 | 340,000.00 | 731,127.23 |
| Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑net472 | 1.199 | 370,650.00 | 309,194.05 | |
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑net6.0 | 1.173 | 456,200.00 | 388,807.52 | several? |
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑netcoreapp3.1 | 1.171 | 490,600.00 | 418,844.79 | bimodal |
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑net472 | 1.167 | 503,150.00 | 431,148.71 |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑netcoreapp3.1 | 4.58 KB | 4.48 KB | -104 B | -2.27% |
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1 | 2.32 KB | 2.22 KB | -104 B | -4.48% |
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑net6.0 | 5.48 KB | 4.55 KB | -927 B | -16.92% |
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑net6.0 | 3.5 KB | 2.24 KB | -1.26 KB | -36.02% |
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑net472 | 8.19 KB | 4.66 KB | -3.53 KB | -43.10% |
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑net472 | 8.19 KB | 2.29 KB | -5.91 KB | -72.11% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | RunWafRealisticBenchmark |
net6.0 | 457μs | 3.08μs | 30.6μs | 0 | 0 | 0 | 5.48 KB |
| master | RunWafRealisticBenchmark |
netcoreapp3.1 | 496μs | 4.32μs | 42.1μs | 0 | 0 | 0 | 4.58 KB |
| master | RunWafRealisticBenchmark |
net472 | 503μs | 607ns | 2.27μs | 0 | 0 | 0 | 8.19 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net6.0 | 311μs | 778ns | 2.81μs | 0 | 0 | 0 | 3.5 KB |
| master | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 352μs | 3.19μs | 31μs | 0 | 0 | 0 | 2.32 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net472 | 371μs | 373ns | 1.29μs | 0 | 0 | 0 | 8.19 KB |
| #7854 | RunWafRealisticBenchmark |
net6.0 | 389μs | 83.3ns | 312ns | 0 | 0 | 0 | 4.55 KB |
| #7854 | RunWafRealisticBenchmark |
netcoreapp3.1 | 417μs | 925ns | 3.58μs | 0 | 0 | 0 | 4.48 KB |
| #7854 | RunWafRealisticBenchmark |
net472 | 431μs | 58.6ns | 227ns | 0 | 0 | 0 | 4.66 KB |
| #7854 | RunWafRealisticBenchmarkWithAttack |
net6.0 | 283μs | 43.6ns | 163ns | 0 | 0 | 0 | 2.24 KB |
| #7854 | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 723μs | 5.13μs | 50.8μs | 0 | 0 | 0 | 2.22 KB |
| #7854 | RunWafRealisticBenchmarkWithAttack |
net472 | 309μs | 25.8ns | 100ns | 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.4μs | 113ns | 422ns | 0 | 0 | 0 | 14.52 KB |
| master | SendRequest |
netcoreapp3.1 | 71.1μs | 70.2ns | 253ns | 0 | 0 | 0 | 17.42 KB |
| master | SendRequest |
net472 | 0.00553ns | 0.00212ns | 0.00822ns | 0 | 0 | 0 | 0 b |
| #7854 | SendRequest |
net6.0 | 61.2μs | 280ns | 1.05μs | 0 | 0 | 0 | 14.52 KB |
| #7854 | SendRequest |
netcoreapp3.1 | 71.7μs | 137ns | 494ns | 0 | 0 | 0 | 17.42 KB |
| #7854 | SendRequest |
net472 | 0.0054ns | 0.00196ns | 0.0076ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CharSliceBenchmark - Faster 🎉 Fewer allocations 🎉
Faster 🎉 in #7854
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1
2.361
2,000,000.00
847,035.00
Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice‑netcoreapp3.1
1.807
3,966,450.00
2,195,292.97
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑netcoreapp3.1
1.415
2,817,700.00
1,990,708.75
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0
1.149
1,009,100.00
878,328.96
Fewer allocations 🎉 in #7854
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice‑net472
647.17 KB
641.95 KB
-5.21 KB
-0.81%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1
104 B
17 B
-87 B
-83.65%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0
304 B
4 B
-300 B
-98.68%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑netcoreapp3.1
104 B
1 B
-103 B
-99.04%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net472
8.19 KB
73 B
-8.12 KB
-99.11%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472
8.19 KB
47 B
-8.15 KB
-99.43%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0
976 B
4 B
-972 B
-99.59%
| Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1 | 2.361 | 2,000,000.00 | 847,035.00 | |
| Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice‑netcoreapp3.1 | 1.807 | 3,966,450.00 | 2,195,292.97 | |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑netcoreapp3.1 | 1.415 | 2,817,700.00 | 1,990,708.75 | |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0 | 1.149 | 1,009,100.00 | 878,328.96 |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice‑net472 | 647.17 KB | 641.95 KB | -5.21 KB | -0.81% |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1 | 104 B | 17 B | -87 B | -83.65% |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0 | 304 B | 4 B | -300 B | -98.68% |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑netcoreapp3.1 | 104 B | 1 B | -103 B | -99.04% |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net472 | 8.19 KB | 73 B | -8.12 KB | -99.11% |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472 | 8.19 KB | 47 B | -8.15 KB | -99.43% |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 | 976 B | 4 B | -972 B | -99.59% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | OriginalCharSlice |
net6.0 | 1.89ms | 907ns | 3.51μs | 0 | 0 | 0 | 640.3 KB |
| master | OriginalCharSlice |
netcoreapp3.1 | 3.97ms | 1.68μs | 6.27μs | 0 | 0 | 0 | 640.1 KB |
| master | OriginalCharSlice |
net472 | 2.64ms | 648ns | 2.42μs | 0 | 0 | 0 | 647.17 KB |
| master | OptimizedCharSlice |
net6.0 | 1.4ms | 554ns | 2.07μs | 0 | 0 | 0 | 976 B |
| master | OptimizedCharSlice |
netcoreapp3.1 | 2.82ms | 905ns | 3.39μs | 0 | 0 | 0 | 104 B |
| master | OptimizedCharSlice |
net472 | 1.99ms | 996ns | 3.59μs | 0 | 0 | 0 | 8.19 KB |
| master | OptimizedCharSliceWithPool |
net6.0 | 1.01ms | 347ns | 1.3μs | 0 | 0 | 0 | 304 B |
| master | OptimizedCharSliceWithPool |
netcoreapp3.1 | 2ms | 2.03μs | 7.88μs | 0 | 0 | 0 | 104 B |
| master | OptimizedCharSliceWithPool |
net472 | 1.15ms | 639ns | 2.39μs | 0 | 0 | 0 | 8.19 KB |
| #7854 | OriginalCharSlice |
net6.0 | 1.9ms | 5.32μs | 20.6μs | 0 | 0 | 0 | 640.01 KB |
| #7854 | OriginalCharSlice |
netcoreapp3.1 | 2.2ms | 9.41μs | 35.2μs | 0 | 0 | 0 | 640 KB |
| #7854 | OriginalCharSlice |
net472 | 2.63ms | 803ns | 3μs | 100 | 0 | 0 | 641.95 KB |
| #7854 | OptimizedCharSlice |
net6.0 | 1.5ms | 193ns | 748ns | 0 | 0 | 0 | 4 B |
| #7854 | OptimizedCharSlice |
netcoreapp3.1 | 1.99ms | 1.04μs | 4.02μs | 0 | 0 | 0 | 1 B |
| #7854 | OptimizedCharSlice |
net472 | 1.95ms | 218ns | 843ns | 0 | 0 | 0 | 73 B |
| #7854 | OptimizedCharSliceWithPool |
net6.0 | 878μs | 38.1ns | 142ns | 0 | 0 | 0 | 4 B |
| #7854 | OptimizedCharSliceWithPool |
netcoreapp3.1 | 847μs | 124ns | 480ns | 0 | 0 | 0 | 17 B |
| #7854 | OptimizedCharSliceWithPool |
net472 | 1.15ms | 167ns | 625ns | 0 | 0 | 0 | 47 B |
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Slower ⚠️ Fewer allocations 🎉
Slower ⚠️ in #7854
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472
1.191
830,691.25
989,293.53
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1
1.156
625,569.95
723,420.66
Fewer allocations 🎉 in #7854
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472
56.18 KB
55.89 KB
-293 B
-0.52%
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 | 1.191 | 830,691.25 | 989,293.53 | |
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 | 1.156 | 625,569.95 | 723,420.66 |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 | 56.18 KB | 55.89 KB | -293 B | -0.52% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 685μs | 1.86μs | 7.21μs | 0 | 0 | 0 | 41.71 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 627μs | 903ns | 3.5μs | 0 | 0 | 0 | 41.98 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 832μs | 1.3μs | 4.88μs | 8.33 | 0 | 0 | 56.18 KB |
| #7854 | WriteAndFlushEnrichedTraces |
net6.0 | 707μs | 3.57μs | 16.7μs | 0 | 0 | 0 | 41.78 KB |
| #7854 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 708μs | 4.04μs | 29.7μs | 0 | 0 | 0 | 42.1 KB |
| #7854 | WriteAndFlushEnrichedTraces |
net472 | 988μs | 2.82μs | 10.6μs | 4.46 | 0 | 0 | 55.89 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.93μs | 9.98ns | 47.9ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
netcoreapp3.1 | 2.47μs | 11.2ns | 40.5ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
net472 | 2.71μs | 1.89ns | 7.31ns | 0.15 | 0 | 0 | 987 B |
| #7854 | ExecuteNonQuery |
net6.0 | 1.9μs | 7.95ns | 30.8ns | 0 | 0 | 0 | 1.02 KB |
| #7854 | ExecuteNonQuery |
netcoreapp3.1 | 2.51μs | 10.4ns | 39ns | 0 | 0 | 0 | 1.02 KB |
| #7854 | ExecuteNonQuery |
net472 | 2.84μs | 3.26ns | 12.6ns | 0.155 | 0.0141 | 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.76μs | 8.03ns | 30ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
netcoreapp3.1 | 2.23μs | 11.7ns | 56.2ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
net472 | 3.57μs | 3.38ns | 13.1ns | 0.16 | 0 | 0 | 1.04 KB |
| master | CallElasticsearchAsync |
net6.0 | 1.79μs | 8.33ns | 32.3ns | 0 | 0 | 0 | 1.01 KB |
| master | CallElasticsearchAsync |
netcoreapp3.1 | 2.44μs | 8.58ns | 33.2ns | 0 | 0 | 0 | 1.08 KB |
| master | CallElasticsearchAsync |
net472 | 3.71μs | 1.19ns | 4.6ns | 0.165 | 0 | 0 | 1.1 KB |
| #7854 | CallElasticsearch |
net6.0 | 1.72μs | 8.59ns | 40.3ns | 0 | 0 | 0 | 1.03 KB |
| #7854 | CallElasticsearch |
netcoreapp3.1 | 2.22μs | 10.5ns | 42ns | 0 | 0 | 0 | 1.03 KB |
| #7854 | CallElasticsearch |
net472 | 3.64μs | 3.97ns | 15.4ns | 0.164 | 0 | 0 | 1.04 KB |
| #7854 | CallElasticsearchAsync |
net6.0 | 1.85μs | 9.74ns | 47.7ns | 0 | 0 | 0 | 1.01 KB |
| #7854 | CallElasticsearchAsync |
netcoreapp3.1 | 2.38μs | 7.35ns | 26.5ns | 0 | 0 | 0 | 1.08 KB |
| #7854 | CallElasticsearchAsync |
net472 | 3.79μs | 2.92ns | 11.3ns | 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.82μs | 5.61ns | 21.7ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
netcoreapp3.1 | 2.35μs | 10.9ns | 43.4ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
net472 | 2.67μs | 3.16ns | 12.2ns | 0.133 | 0 | 0 | 915 B |
| #7854 | ExecuteAsync |
net6.0 | 1.86μs | 0.905ns | 3.51ns | 0 | 0 | 0 | 952 B |
| #7854 | ExecuteAsync |
netcoreapp3.1 | 2.42μs | 9.68ns | 37.5ns | 0 | 0 | 0 | 952 B |
| #7854 | ExecuteAsync |
net472 | 2.6μs | 1.66ns | 5.98ns | 0.142 | 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.79μs | 10ns | 38.9ns | 0 | 0 | 0 | 2.36 KB |
| master | SendAsync |
netcoreapp3.1 | 8.96μs | 35ns | 135ns | 0 | 0 | 0 | 2.9 KB |
| master | SendAsync |
net472 | 12.2μs | 10.5ns | 40.6ns | 0.488 | 0 | 0 | 3.18 KB |
| #7854 | SendAsync |
net6.0 | 7.33μs | 20.3ns | 73.2ns | 0 | 0 | 0 | 2.36 KB |
| #7854 | SendAsync |
netcoreapp3.1 | 8.75μs | 6.05ns | 23.4ns | 0 | 0 | 0 | 2.9 KB |
| #7854 | SendAsync |
net472 | 12.3μs | 9.21ns | 35.7ns | 0.492 | 0 | 0 | 3.18 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7854
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0
250.62 KB
258.94 KB
8.32 KB
3.32%
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.36 KB
43.73 KB
368 B
0.85%
Fewer allocations 🎉 in #7854
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1
44.04 KB
42.64 KB
-1.4 KB
-3.18%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
272.86 KB
257.05 KB
-15.81 KB
-5.79%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 | 250.62 KB | 258.94 KB | 8.32 KB | 3.32% |
| 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.36 KB | 43.73 KB | 368 B | 0.85% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1 | 44.04 KB | 42.64 KB | -1.4 KB | -3.18% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 | 272.86 KB | 257.05 KB | -15.81 KB | -5.79% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StringConcatBenchmark |
net6.0 | 45μs | 249ns | 1.41μs | 0 | 0 | 0 | 43.36 KB |
| master | StringConcatBenchmark |
netcoreapp3.1 | 48.4μs | 200ns | 720ns | 0 | 0 | 0 | 44.04 KB |
| master | StringConcatBenchmark |
net472 | 57.5μs | 127ns | 459ns | 0 | 0 | 0 | 57.34 KB |
| master | StringConcatAspectBenchmark |
net6.0 | 445μs | 2.37μs | 12.1μs | 0 | 0 | 0 | 250.62 KB |
| master | StringConcatAspectBenchmark |
netcoreapp3.1 | 528μs | 2.53μs | 10.1μs | 0 | 0 | 0 | 272.86 KB |
| master | StringConcatAspectBenchmark |
net472 | 411μs | 2.21μs | 12.5μs | 0 | 0 | 0 | 278.53 KB |
| #7854 | StringConcatBenchmark |
net6.0 | 45.1μs | 260ns | 1.88μs | 0 | 0 | 0 | 43.73 KB |
| #7854 | StringConcatBenchmark |
netcoreapp3.1 | 47.5μs | 258ns | 1.46μs | 0 | 0 | 0 | 42.64 KB |
| #7854 | StringConcatBenchmark |
net472 | 55.6μs | 212ns | 793ns | 0 | 0 | 0 | 57.34 KB |
| #7854 | StringConcatAspectBenchmark |
net6.0 | 487μs | 1.11μs | 3.83μs | 0 | 0 | 0 | 258.94 KB |
| #7854 | StringConcatAspectBenchmark |
netcoreapp3.1 | 496μs | 1.21μs | 4.36μs | 0 | 0 | 0 | 257.05 KB |
| #7854 | StringConcatAspectBenchmark |
net472 | 414μs | 2.2μs | 11.7μ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.64μs | 13.6ns | 67.9ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
netcoreapp3.1 | 3.56μs | 15.7ns | 60.6ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
net472 | 3.82μs | 2.9ns | 11.2ns | 0.245 | 0 | 0 | 1.64 KB |
| #7854 | EnrichedLog |
net6.0 | 2.63μs | 13.3ns | 61.1ns | 0 | 0 | 0 | 1.7 KB |
| #7854 | EnrichedLog |
netcoreapp3.1 | 3.67μs | 17.3ns | 75.4ns | 0 | 0 | 0 | 1.7 KB |
| #7854 | EnrichedLog |
net472 | 3.86μs | 6.56ns | 25.4ns | 0.249 | 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 | 129ns | 483ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
netcoreapp3.1 | 127μs | 70.9ns | 256ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
net472 | 168μs | 128ns | 495ns | 0 | 0 | 0 | 4.52 KB |
| #7854 | EnrichedLog |
net6.0 | 122μs | 70.3ns | 244ns | 0 | 0 | 0 | 4.31 KB |
| #7854 | EnrichedLog |
netcoreapp3.1 | 128μs | 220ns | 852ns | 0 | 0 | 0 | 4.31 KB |
| #7854 | EnrichedLog |
net472 | 167μs | 69.4ns | 269ns | 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.91μs | 23.1ns | 92.4ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
netcoreapp3.1 | 6.93μs | 26.5ns | 103ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
net472 | 7.38μs | 5.92ns | 22.9ns | 0.297 | 0 | 0 | 2.08 KB |
| #7854 | EnrichedLog |
net6.0 | 4.94μs | 5.54ns | 21.5ns | 0 | 0 | 0 | 2.26 KB |
| #7854 | EnrichedLog |
netcoreapp3.1 | 6.79μs | 6.44ns | 24.9ns | 0 | 0 | 0 | 2.26 KB |
| #7854 | EnrichedLog |
net472 | 7.63μs | 9.1ns | 35.2ns | 0.307 | 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.94μs | 8.91ns | 34.5ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
netcoreapp3.1 | 2.54μs | 10.8ns | 41.9ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
net472 | 2.96μs | 2.36ns | 8.82ns | 0.191 | 0 | 0 | 1.2 KB |
| #7854 | SendReceive |
net6.0 | 2.05μs | 6.31ns | 24.4ns | 0 | 0 | 0 | 1.2 KB |
| #7854 | SendReceive |
netcoreapp3.1 | 2.58μs | 10.6ns | 40.9ns | 0 | 0 | 0 | 1.2 KB |
| #7854 | SendReceive |
net472 | 3.07μs | 7.82ns | 30.3ns | 0.182 | 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.29μs | 1.1ns | 4.11ns | 0 | 0 | 0 | 1.58 KB |
| master | EnrichedLog |
netcoreapp3.1 | 5.94μs | 15.6ns | 60.6ns | 0 | 0 | 0 | 1.63 KB |
| master | EnrichedLog |
net472 | 6.55μs | 5.18ns | 20.1ns | 0.293 | 0 | 0 | 2.03 KB |
| #7854 | EnrichedLog |
net6.0 | 4.29μs | 3.88ns | 14ns | 0 | 0 | 0 | 1.58 KB |
| #7854 | EnrichedLog |
netcoreapp3.1 | 5.73μs | 20.5ns | 79.3ns | 0 | 0 | 0 | 1.63 KB |
| #7854 | EnrichedLog |
net472 | 6.38μs | 7.25ns | 28.1ns | 0.32 | 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 | 790ns | 3.61ns | 14.4ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
netcoreapp3.1 | 960ns | 0.356ns | 1.38ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
net472 | 917ns | 0.121ns | 0.471ns | 0.0916 | 0 | 0 | 578 B |
| master | StartFinishScope |
net6.0 | 937ns | 0.434ns | 1.68ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
netcoreapp3.1 | 1.13μs | 5.83ns | 26.7ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
net472 | 1.1μs | 0.186ns | 0.721ns | 0.0993 | 0 | 0 | 658 B |
| #7854 | StartFinishSpan |
net6.0 | 780ns | 3.33ns | 19.4ns | 0 | 0 | 0 | 576 B |
| #7854 | StartFinishSpan |
netcoreapp3.1 | 972ns | 4.85ns | 21.1ns | 0 | 0 | 0 | 576 B |
| #7854 | StartFinishSpan |
net472 | 947ns | 0.185ns | 0.718ns | 0.09 | 0 | 0 | 578 B |
| #7854 | StartFinishScope |
net6.0 | 920ns | 5.05ns | 30.3ns | 0 | 0 | 0 | 696 B |
| #7854 | StartFinishScope |
netcoreapp3.1 | 1.21μs | 0.68ns | 2.63ns | 0 | 0 | 0 | 696 B |
| #7854 | StartFinishScope |
net472 | 1.15μs | 1.32ns | 4.94ns | 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.08μs | 1.43ns | 5.15ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
netcoreapp3.1 | 1.38μs | 6.5ns | 25.2ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
net472 | 1.44μs | 1.51ns | 5.85ns | 0.101 | 0 | 0 | 658 B |
| #7854 | RunOnMethodBegin |
net6.0 | 1.04μs | 5.53ns | 29.2ns | 0 | 0 | 0 | 696 B |
| #7854 | RunOnMethodBegin |
netcoreapp3.1 | 1.46μs | 4.04ns | 15.6ns | 0 | 0 | 0 | 696 B |
| #7854 | RunOnMethodBegin |
net472 | 1.49μs | 0.919ns | 3.56ns | 0.104 | 0 | 0 | 658 B |
andrewlock
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thaks!
| connection.Open(); | ||
| return connection; | ||
| } | ||
| catch (SqlException ex) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we need to be more specific about the exact type of SqlException we catch here, e.g. the error code? 🤔 My concern is that we break something (e.g. using DBM) and we end up just skipping and not realising? WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I was thinking about it. There are actually some codes we could get but, for simplicity, since we are only covering the connection method, I decided to leave it like this. Otherwise, we should capture these possible codes:
static bool IsRetryableConnectionError(SqlException ex)
{
return ex.Number == -1 || // Generic network error
ex.Number == -2 || // Connection timeout
ex.Number == 0 || // Provider-specific (platform dependent)
ex.Number == 2 || // Network path not found
ex.Number == 53 || // SQL Server not found
ex.Number == 64 || // Connection broken
ex.Number == 233 || // Shared memory failed
ex.Number == 258 || // Wait timeout
ex.Number == 10053 || // Connection aborted
ex.Number == 10054 || // Connection reset
ex.Number == 10060 || // Connection timeout
ex.Number == 10061 || // Connection refused
ex.Number == 11001 || // DNS failure
ex.Class == 20; // Fatal connection errors
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'm torn tbh... for example, some of those I probably wouldn't want to ignore, as they could indicate some other issue (e.g. in our connection instrumentation)... e.g. 0 || // Provider-specific (platform dependent), ex.Number == 233 || // Shared memory failed, and ex.Class == 20; // Fatal connection errors would all worry me a bit 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added this check:
static bool IsRetryableConnectionError(SqlException ex)
{
// Known reliable error codes
if (ex.Number == -1 || // Generic network error
ex.Number == -2 || // Connection timeout
ex.Number == 53 || // SQL Server not found
ex.Number == 10053 || // Connection aborted
ex.Number == 10054 || // Connection reset
ex.Number == 10060 || // Connection timeout
ex.Number == 11001) // DNS failure
{
return true;
}
// Number=0 with SocketException indicates network issue
if (ex.Number == 0 && ex.InnerException is SocketException)
{
return true;
}
return false;
}
Summary of changes
We are getting the following error in our integration tests:
CI tests occasionally fail with DNS/network errors (Error 11001, Class 20) when SQL Server isn't immediately available. These are infrastructure issues, not test failures. By catching connection errors and returning exit code 13, the test framework can skip these tests instead of failing the build.
SQL exceptions during test execution (after successful connection) will still fail the test as expected.
Changes
SqlExceptionduring connection attempts inSamples.Microsoft.Data.SqlClientgototo a cleanforloopReason for change
Implementation details
Test coverage
Other details