-
Notifications
You must be signed in to change notification settings - Fork 145
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
[ASM] Restore SqlConnection _dbConnectionSystemDataSqlClient #6515
[ASM] Restore SqlConnection _dbConnectionSystemDataSqlClient #6515
Conversation
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:
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.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6515) - mean (68ms) : 66, 71
. : milestone, 68,
master - mean (69ms) : 66, 72
. : milestone, 69,
section CallTarget+Inlining+NGEN
This PR (6515) - mean (976ms) : 952, 1000
. : milestone, 976,
master - mean (981ms) : 954, 1008
. : milestone, 981,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6515) - mean (107ms) : 105, 109
. : milestone, 107,
master - mean (107ms) : 105, 110
. : milestone, 107,
section CallTarget+Inlining+NGEN
This PR (6515) - mean (677ms) : 659, 696
. : milestone, 677,
master - mean (678ms) : 662, 695
. : milestone, 678,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6515) - mean (91ms) : 89, 93
. : milestone, 91,
master - mean (91ms) : 90, 93
. : milestone, 91,
section CallTarget+Inlining+NGEN
This PR (6515) - mean (635ms) : 618, 651
. : milestone, 635,
master - mean (633ms) : 616, 651
. : milestone, 633,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6515) - mean (194ms) : 189, 198
. : milestone, 194,
master - mean (195ms) : 189, 202
. : milestone, 195,
section CallTarget+Inlining+NGEN
This PR (6515) - mean (1,106ms) : 1078, 1135
. : milestone, 1106,
master - mean (1,104ms) : 1076, 1132
. : milestone, 1104,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6515) - mean (279ms) : 274, 283
. : milestone, 279,
master - mean (278ms) : 273, 282
. : milestone, 278,
section CallTarget+Inlining+NGEN
This PR (6515) - mean (871ms) : 844, 898
. : milestone, 871,
master - mean (874ms) : 847, 901
. : milestone, 874,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6515) - mean (268ms) : 264, 273
. : milestone, 268,
master - mean (268ms) : 264, 272
. : milestone, 268,
section CallTarget+Inlining+NGEN
This PR (6515) - mean (861ms) : 826, 895
. : milestone, 861,
master - mean (857ms) : 829, 885
. : milestone, 857,
|
Benchmarks Report for appsec 🐌Benchmarks for #6515 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored. Benchmark detailsBenchmarks.Trace.Asm.AppSecBodyBenchmark - Faster 🎉 Same allocations ✔️
|
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody‑net6.0 | 1.129 | 160.62 | 142.23 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | AllCycleSimpleBody |
net6.0 | 202μs | 169ns | 655ns | 2.61 | 0 | 0 | 188.76 KB |
master | AllCycleSimpleBody |
netcoreapp3.1 | 299μs | 200ns | 773ns | 2.68 | 0 | 0 | 196.09 KB |
master | AllCycleSimpleBody |
net472 | 273μs | 118ns | 441ns | 35.8 | 2.05 | 0 | 225.79 KB |
master | AllCycleMoreComplexBody |
net6.0 | 209μs | 123ns | 459ns | 2.72 | 0 | 0 | 192.26 KB |
master | AllCycleMoreComplexBody |
netcoreapp3.1 | 317μs | 139ns | 520ns | 2.68 | 0 | 0 | 199.5 KB |
master | AllCycleMoreComplexBody |
net472 | 278μs | 174ns | 674ns | 36.4 | 2.08 | 0 | 229.3 KB |
master | ObjectExtractorSimpleBody |
net6.0 | 161ns | 0.13ns | 0.486ns | 0.00393 | 0 | 0 | 280 B |
master | ObjectExtractorSimpleBody |
netcoreapp3.1 | 195ns | 0.139ns | 0.52ns | 0.00373 | 0 | 0 | 272 B |
master | ObjectExtractorSimpleBody |
net472 | 168ns | 0.0874ns | 0.338ns | 0.0446 | 0 | 0 | 281 B |
master | ObjectExtractorMoreComplexBody |
net6.0 | 2.91μs | 1.13ns | 4.07ns | 0.0524 | 0 | 0 | 3.78 KB |
master | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 3.76μs | 3.16ns | 11.8ns | 0.0488 | 0 | 0 | 3.69 KB |
master | ObjectExtractorMoreComplexBody |
net472 | 3.63μs | 2.34ns | 8.75ns | 0.603 | 0.00722 | 0 | 3.8 KB |
#6515 | AllCycleSimpleBody |
net6.0 | 204μs | 123ns | 460ns | 2.66 | 0 | 0 | 188.76 KB |
#6515 | AllCycleSimpleBody |
netcoreapp3.1 | 303μs | 312ns | 1.17μs | 2.72 | 0 | 0 | 196.09 KB |
#6515 | AllCycleSimpleBody |
net472 | 271μs | 349ns | 1.3μs | 35.8 | 2.03 | 0 | 225.78 KB |
#6515 | AllCycleMoreComplexBody |
net6.0 | 212μs | 108ns | 404ns | 2.66 | 0 | 0 | 192.26 KB |
#6515 | AllCycleMoreComplexBody |
netcoreapp3.1 | 314μs | 106ns | 396ns | 2.67 | 0 | 0 | 199.51 KB |
#6515 | AllCycleMoreComplexBody |
net472 | 276μs | 178ns | 666ns | 36.4 | 2.07 | 0 | 229.3 KB |
#6515 | ObjectExtractorSimpleBody |
net6.0 | 142ns | 0.169ns | 0.654ns | 0.00397 | 0 | 0 | 280 B |
#6515 | ObjectExtractorSimpleBody |
netcoreapp3.1 | 191ns | 0.155ns | 0.559ns | 0.00374 | 0 | 0 | 272 B |
#6515 | ObjectExtractorSimpleBody |
net472 | 167ns | 0.083ns | 0.299ns | 0.0446 | 0 | 0 | 281 B |
#6515 | ObjectExtractorMoreComplexBody |
net6.0 | 2.89μs | 2.16ns | 8.36ns | 0.0534 | 0 | 0 | 3.78 KB |
#6515 | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 3.78μs | 2.71ns | 10.1ns | 0.0494 | 0 | 0 | 3.69 KB |
#6515 | ObjectExtractorMoreComplexBody |
net472 | 3.64μs | 2.94ns | 11ns | 0.602 | 0.00552 | 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 | 36.7μs | 26.7ns | 104ns | 0.457 | 0 | 0 | 32.4 KB |
master | EncodeArgs |
netcoreapp3.1 | 55.2μs | 33.8ns | 131ns | 0.412 | 0 | 0 | 32.4 KB |
master | EncodeArgs |
net472 | 67.9μs | 47.8ns | 179ns | 5.15 | 0.0678 | 0 | 32.5 KB |
master | EncodeLegacyArgs |
net6.0 | 74.4μs | 22.5ns | 84.3ns | 0 | 0 | 0 | 2.14 KB |
master | EncodeLegacyArgs |
netcoreapp3.1 | 105μs | 155ns | 602ns | 0 | 0 | 0 | 2.14 KB |
master | EncodeLegacyArgs |
net472 | 156μs | 56.3ns | 218ns | 0.312 | 0 | 0 | 2.15 KB |
#6515 | EncodeArgs |
net6.0 | 37μs | 21.6ns | 77.8ns | 0.46 | 0 | 0 | 32.4 KB |
#6515 | EncodeArgs |
netcoreapp3.1 | 54.1μs | 27.1ns | 105ns | 0.431 | 0 | 0 | 32.4 KB |
#6515 | EncodeArgs |
net472 | 66.3μs | 32.3ns | 117ns | 5.15 | 0.0664 | 0 | 32.5 KB |
#6515 | EncodeLegacyArgs |
net6.0 | 72.2μs | 45.2ns | 175ns | 0 | 0 | 0 | 2.14 KB |
#6515 | EncodeLegacyArgs |
netcoreapp3.1 | 109μs | 371ns | 1.44μs | 0 | 0 | 0 | 2.14 KB |
#6515 | EncodeLegacyArgs |
net472 | 154μs | 79.4ns | 307ns | 0.309 | 0 | 0 | 2.15 KB |
Benchmarks.Trace.Asm.AppSecWafBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | RunWafRealisticBenchmark |
net6.0 | 174μs | 90.3ns | 338ns | 0 | 0 | 0 | 2.44 KB |
master | RunWafRealisticBenchmark |
netcoreapp3.1 | 187μs | 225ns | 812ns | 0 | 0 | 0 | 2.39 KB |
master | RunWafRealisticBenchmark |
net472 | 199μs | 119ns | 462ns | 0.3 | 0 | 0 | 2.46 KB |
master | RunWafRealisticBenchmarkWithAttack |
net6.0 | 114μs | 65.1ns | 252ns | 0 | 0 | 0 | 1.47 KB |
master | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 124μs | 279ns | 1.08μs | 0 | 0 | 0 | 1.46 KB |
master | RunWafRealisticBenchmarkWithAttack |
net472 | 132μs | 51.1ns | 198ns | 0.198 | 0 | 0 | 1.49 KB |
#6515 | RunWafRealisticBenchmark |
net6.0 | 177μs | 162ns | 627ns | 0 | 0 | 0 | 2.44 KB |
#6515 | RunWafRealisticBenchmark |
netcoreapp3.1 | 187μs | 79.3ns | 307ns | 0 | 0 | 0 | 2.39 KB |
#6515 | RunWafRealisticBenchmark |
net472 | 201μs | 47.2ns | 177ns | 0.3 | 0 | 0 | 2.46 KB |
#6515 | RunWafRealisticBenchmarkWithAttack |
net6.0 | 116μs | 83.4ns | 323ns | 0 | 0 | 0 | 1.47 KB |
#6515 | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 123μs | 226ns | 875ns | 0 | 0 | 0 | 1.46 KB |
#6515 | RunWafRealisticBenchmarkWithAttack |
net472 | 133μs | 43.4ns | 168ns | 0.199 | 0 | 0 | 1.48 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #6515
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472
276.42 KB
278.53 KB
2.11 KB
0.76%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472
61.73 KB
62.04 KB
312 B
0.51%
Fewer allocations 🎉 in #6515
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
262.87 KB
254.5 KB
-8.38 KB
-3.19%
Benchmark | Base Allocated | Diff Allocated | Change | Change % |
---|---|---|---|---|
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 | 276.42 KB | 278.53 KB | 2.11 KB | 0.76% |
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 | 61.73 KB | 62.04 KB | 312 B | 0.51% |
Benchmark | Base Allocated | Diff Allocated | Change | Change % |
---|---|---|---|---|
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 | 262.87 KB | 254.5 KB | -8.38 KB | -3.19% |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StringConcatBenchmark |
net6.0 | 60μs | 755ns | 7.55μs | 0 | 0 | 0 | 43.44 KB |
master | StringConcatBenchmark |
netcoreapp3.1 | 53.2μs | 243ns | 1.09μs | 0 | 0 | 0 | 42.64 KB |
master | StringConcatBenchmark |
net472 | 37.5μs | 111ns | 416ns | 0 | 0 | 0 | 61.73 KB |
master | StringConcatAspectBenchmark |
net6.0 | 321μs | 1.8μs | 11.7μs | 0 | 0 | 0 | 255.18 KB |
master | StringConcatAspectBenchmark |
netcoreapp3.1 | 340μs | 1.87μs | 11.4μs | 0 | 0 | 0 | 262.87 KB |
master | StringConcatAspectBenchmark |
net472 | 269μs | 5.16μs | 49.2μs | 0 | 0 | 0 | 276.42 KB |
#6515 | StringConcatBenchmark |
net6.0 | 60.2μs | 801ns | 7.84μs | 0 | 0 | 0 | 43.44 KB |
#6515 | StringConcatBenchmark |
netcoreapp3.1 | 53.8μs | 290ns | 1.45μs | 0 | 0 | 0 | 42.64 KB |
#6515 | StringConcatBenchmark |
net472 | 37.6μs | 94.8ns | 355ns | 0 | 0 | 0 | 62.04 KB |
#6515 | StringConcatAspectBenchmark |
net6.0 | 319μs | 1.8μs | 11.4μs | 0 | 0 | 0 | 254.63 KB |
#6515 | StringConcatAspectBenchmark |
netcoreapp3.1 | 346μs | 1.9μs | 11.8μs | 0 | 0 | 0 | 254.5 KB |
#6515 | StringConcatAspectBenchmark |
net472 | 275μs | 5.8μs | 56.2μs | 0 | 0 | 0 | 278.53 KB |
Benchmarks Report for tracer 🐌Benchmarks for #6515 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 ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.SpanBenchmark - Slower
|
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 | 1.127 | 396.54 | 446.73 | |
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑netcoreapp3.1 | 1.119 | 546.16 | 610.95 |
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑netcoreapp3.1 | 1.184 | 796.60 | 672.92 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
net6.0 | 397ns | 0.636ns | 2.46ns | 0.00798 | 0 | 0 | 576 B |
master | StartFinishSpan |
netcoreapp3.1 | 546ns | 0.881ns | 3.41ns | 0.00786 | 0 | 0 | 576 B |
master | StartFinishSpan |
net472 | 731ns | 2.25ns | 8.7ns | 0.0917 | 0 | 0 | 578 B |
master | StartFinishScope |
net6.0 | 551ns | 1.01ns | 3.9ns | 0.00975 | 0 | 0 | 696 B |
master | StartFinishScope |
netcoreapp3.1 | 797ns | 1.39ns | 5.39ns | 0.0094 | 0 | 0 | 696 B |
master | StartFinishScope |
net472 | 859ns | 0.867ns | 3.36ns | 0.104 | 0 | 0 | 658 B |
#6515 | StartFinishSpan |
net6.0 | 446ns | 1.1ns | 4.28ns | 0.00814 | 0 | 0 | 576 B |
#6515 | StartFinishSpan |
netcoreapp3.1 | 612ns | 1.18ns | 4.57ns | 0.00764 | 0 | 0 | 576 B |
#6515 | StartFinishSpan |
net472 | 667ns | 1.25ns | 4.84ns | 0.0915 | 0 | 0 | 578 B |
#6515 | StartFinishScope |
net6.0 | 548ns | 0.861ns | 3.33ns | 0.00965 | 0 | 0 | 696 B |
#6515 | StartFinishScope |
netcoreapp3.1 | 673ns | 0.569ns | 2.2ns | 0.00936 | 0 | 0 | 696 B |
#6515 | StartFinishScope |
net472 | 861ns | 0.639ns | 2.48ns | 0.104 | 0 | 0 | 658 B |
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | RunOnMethodBegin |
net6.0 | 644ns | 1.2ns | 4.66ns | 0.00959 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 985ns | 3.19ns | 12.4ns | 0.00922 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
net472 | 1.13μs | 1.45ns | 5.62ns | 0.105 | 0 | 0 | 658 B |
#6515 | RunOnMethodBegin |
net6.0 | 683ns | 0.278ns | 1.08ns | 0.00989 | 0 | 0 | 696 B |
#6515 | RunOnMethodBegin |
netcoreapp3.1 | 930ns | 0.74ns | 2.87ns | 0.00936 | 0 | 0 | 696 B |
#6515 | RunOnMethodBegin |
net472 | 1.18μs | 0.681ns | 2.64ns | 0.104 | 0 | 0 | 658 B |
Summary of changes
It seems that there has been some PR conflict between this PR and this one that have caused a compilation error in Samples.Security.AspNetCore5. Just restoring the missing line will fix it.
Reason for change
Implementation details
Test coverage
Other details