-
Couldn't load subscription status.
- Fork 150
Protect against claimsPrincipal being null
#7719
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
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.
As good a guess as any 🙈 Thanks!
...rc/Datadog.Trace/ClrProfiler/AutoInstrumentation/AspNetCore/UserEvents/HttpContextSetUser.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Andrew Lock <[email protected]>
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.8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7719) - mean (72ms) : 71, 73
. : milestone, 72,
master - mean (72ms) : 71, 73
. : milestone, 72,
section Baseline
This PR (7719) - mean (68ms) : 67, 69
. : milestone, 68,
master - mean (68ms) : 66, 69
. : milestone, 68,
section CallTarget+Inlining+NGEN
This PR (7719) - mean (1,046ms) : 999, 1093
. : milestone, 1046,
master - mean (1,040ms) : 997, 1084
. : milestone, 1040,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7719) - mean (107ms) : 105, 108
. : milestone, 107,
master - mean (106ms) : 105, 108
. : milestone, 106,
section Baseline
This PR (7719) - mean (105ms) : 103, 108
. : milestone, 105,
master - mean (105ms) : 103, 107
. : milestone, 105,
section CallTarget+Inlining+NGEN
This PR (7719) - mean (747ms) : 726, 769
. : milestone, 747,
master - mean (746ms) : 720, 772
. : milestone, 746,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7719) - mean (94ms) : 93, 95
. : milestone, 94,
master - mean (94ms) : 93, 95
. : milestone, 94,
section Baseline
This PR (7719) - mean (93ms) : 91, 95
. : milestone, 93,
master - mean (93ms) : 91, 95
. : milestone, 93,
section CallTarget+Inlining+NGEN
This PR (7719) - mean (708ms) : 669, 747
. : milestone, 708,
master - mean (707ms) : 672, 742
. : milestone, 707,
gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7719) - mean (92ms) : 91, 93
. : milestone, 92,
master - mean (92ms) : 91, 93
. : milestone, 92,
section Baseline
This PR (7719) - mean (91ms) : 89, 93
. : milestone, 91,
master - mean (91ms) : 89, 93
. : milestone, 91,
section CallTarget+Inlining+NGEN
This PR (7719) - mean (658ms) : 644, 673
. : milestone, 658,
master - mean (661ms) : 646, 676
. : milestone, 661,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7719) - mean (198ms) : 195, 200
. : milestone, 198,
master - mean (195ms) : 192, 197
. : milestone, 195,
section Baseline
This PR (7719) - mean (194ms) : 190, 199
. : milestone, 194,
master - mean (191ms) : 189, 194
. : milestone, 191,
section CallTarget+Inlining+NGEN
This PR (7719) - mean (1,175ms) : 1109, 1240
. : milestone, 1175,
master - mean (1,156ms) : 1094, 1218
. : milestone, 1156,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7719) - mean (284ms) : 278, 289
. : milestone, 284,
master - mean (275ms) : 272, 279
. : milestone, 275,
section Baseline
This PR (7719) - mean (281ms) : 273, 288
. : milestone, 281,
master - mean (276ms) : 271, 281
. : milestone, 276,
section CallTarget+Inlining+NGEN
This PR (7719) - mean (965ms) : 925, 1006
. : milestone, 965,
master - mean (942ms) : 903, 980
. : milestone, 942,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7719) - mean (272ms) : 265, 279
. : milestone, 272,
master - mean (268ms) : 264, 272
. : milestone, 268,
section Baseline
This PR (7719) - mean (271ms) : 265, 276
. : milestone, 271,
master - mean (267ms) : 264, 271
. : milestone, 267,
section CallTarget+Inlining+NGEN
This PR (7719) - mean (939ms) : 874, 1005
. : milestone, 939,
master - mean (922ms) : 875, 969
. : milestone, 922,
gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7719) - mean (268ms) : 264, 272
. : milestone, 268,
master - mean (266ms) : 262, 269
. : milestone, 266,
section Baseline
This PR (7719) - mean (267ms) : 263, 272
. : milestone, 267,
master - mean (266ms) : 260, 271
. : milestone, 266,
section CallTarget+Inlining+NGEN
This PR (7719) - mean (851ms) : 832, 869
. : milestone, 851,
master - mean (850ms) : 828, 872
. : milestone, 850,
|
BenchmarksBenchmarks Report for benchmark platform 🐌Benchmarks for #7719 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.05 KB | 6.09 KB | 41 B | 0.68% |
| Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net6.0 | 5.49 KB | 5.53 KB | 36 B | 0.66% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StartStopWithChild |
net6.0 | 10.5μs | 59.8ns | 406ns | 0 | 0 | 0 | 5.49 KB |
| master | StartStopWithChild |
netcoreapp3.1 | 13.5μs | 69.7ns | 334ns | 0 | 0 | 0 | 5.72 KB |
| master | StartStopWithChild |
net472 | 22.3μs | 122ns | 711ns | 0.98 | 0.327 | 0.109 | 6.05 KB |
| #7719 | StartStopWithChild |
net6.0 | 11.1μs | 60.3ns | 352ns | 0 | 0 | 0 | 5.53 KB |
| #7719 | StartStopWithChild |
netcoreapp3.1 | 13.6μs | 68.9ns | 323ns | 0 | 0 | 0 | 5.74 KB |
| #7719 | StartStopWithChild |
net472 | 21.9μs | 116ns | 635ns | 0.903 | 0.226 | 0 | 6.09 KB |
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7719
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces‑net472
3.31 KB
3.35 KB
46 B
1.39%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 | 3.31 KB | 3.35 KB | 46 B | 1.39% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 935μs | 96ns | 346ns | 0 | 0 | 0 | 2.71 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.03ms | 220ns | 853ns | 0 | 0 | 0 | 2.7 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 1.19ms | 582ns | 2.25μs | 0 | 0 | 0 | 3.31 KB |
| #7719 | WriteAndFlushEnrichedTraces |
net6.0 | 932μs | 78.6ns | 284ns | 0 | 0 | 0 | 2.71 KB |
| #7719 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.02ms | 277ns | 1.07μs | 0 | 0 | 0 | 2.7 KB |
| #7719 | WriteAndFlushEnrichedTraces |
net472 | 1.21ms | 148ns | 553ns | 0 | 0 | 0 | 3.35 KB |
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #7719
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody‑net472
1.128
298.91
337.09
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody‑net472 | 1.128 | 298.91 | 337.09 |
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 | 330ns | 0.555ns | 2.08ns | 0 | 0 | 0 | 280 B |
| master | ObjectExtractorSimpleBody |
netcoreapp3.1 | 409ns | 0.489ns | 1.83ns | 0 | 0 | 0 | 272 B |
| master | ObjectExtractorSimpleBody |
net472 | 299ns | 0.0231ns | 0.0834ns | 0.0438 | 0 | 0 | 281 B |
| master | ObjectExtractorMoreComplexBody |
net6.0 | 6.27μs | 24.5ns | 95ns | 0 | 0 | 0 | 3.78 KB |
| master | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.94μs | 8.1ns | 31.4ns | 0 | 0 | 0 | 3.69 KB |
| master | ObjectExtractorMoreComplexBody |
net472 | 6.61μs | 5.12ns | 19.8ns | 0.595 | 0 | 0 | 3.8 KB |
| #7719 | AllCycleSimpleBody |
net6.0 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| #7719 | AllCycleSimpleBody |
netcoreapp3.1 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| #7719 | AllCycleSimpleBody |
net472 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| #7719 | AllCycleMoreComplexBody |
net6.0 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| #7719 | AllCycleMoreComplexBody |
netcoreapp3.1 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| #7719 | AllCycleMoreComplexBody |
net472 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| #7719 | ObjectExtractorSimpleBody |
net6.0 | 326ns | 1.71ns | 8.87ns | 0 | 0 | 0 | 280 B |
| #7719 | ObjectExtractorSimpleBody |
netcoreapp3.1 | 389ns | 2.18ns | 13.8ns | 0 | 0 | 0 | 272 B |
| #7719 | ObjectExtractorSimpleBody |
net472 | 337ns | 0.378ns | 1.46ns | 0.0439 | 0 | 0 | 281 B |
| #7719 | ObjectExtractorMoreComplexBody |
net6.0 | 6.35μs | 31ns | 120ns | 0 | 0 | 0 | 3.78 KB |
| #7719 | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.76μs | 33.4ns | 129ns | 0 | 0 | 0 | 3.69 KB |
| #7719 | ObjectExtractorMoreComplexBody |
net472 | 6.64μs | 0.877ns | 3.4ns | 0.597 | 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 | 75.4μs | 271ns | 1.05μs | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
netcoreapp3.1 | 97.7μs | 27.7ns | 107ns | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
net472 | 109μs | 53.7ns | 208ns | 4.91 | 0 | 0 | 32.51 KB |
| master | EncodeLegacyArgs |
net6.0 | 144μs | 6.8ns | 26.3ns | 0 | 0 | 0 | 2.15 KB |
| master | EncodeLegacyArgs |
netcoreapp3.1 | 202μs | 570ns | 2.21μs | 0 | 0 | 0 | 2.14 KB |
| master | EncodeLegacyArgs |
net472 | 263μs | 33.9ns | 122ns | 0 | 0 | 0 | 2.17 KB |
| #7719 | EncodeArgs |
net6.0 | 79.7μs | 20ns | 74.8ns | 0 | 0 | 0 | 32.4 KB |
| #7719 | EncodeArgs |
netcoreapp3.1 | 97.6μs | 312ns | 1.21μs | 0 | 0 | 0 | 32.4 KB |
| #7719 | EncodeArgs |
net472 | 109μs | 56.1ns | 217ns | 4.94 | 0 | 0 | 32.5 KB |
| #7719 | EncodeLegacyArgs |
net6.0 | 150μs | 23.1ns | 80ns | 0 | 0 | 0 | 2.14 KB |
| #7719 | EncodeLegacyArgs |
netcoreapp3.1 | 198μs | 175ns | 680ns | 0 | 0 | 0 | 2.14 KB |
| #7719 | EncodeLegacyArgs |
net472 | 266μs | 16.7ns | 64.8ns | 0 | 0 | 0 | 2.17 KB |
Benchmarks.Trace.Asm.AppSecWafBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #7719
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑netcoreapp3.1
2.093
410,525.21
859,374.38
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑netcoreapp3.1 | 2.093 | 410,525.21 | 859,374.38 |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | RunWafRealisticBenchmark |
net6.0 | 396μs | 64.5ns | 250ns | 0 | 0 | 0 | 4.55 KB |
| master | RunWafRealisticBenchmark |
netcoreapp3.1 | 410μs | 67.3ns | 252ns | 0 | 0 | 0 | 4.48 KB |
| master | RunWafRealisticBenchmark |
net472 | 431μs | 34.7ns | 125ns | 0 | 0 | 0 | 4.68 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net6.0 | 288μs | 48.4ns | 175ns | 0 | 0 | 0 | 2.24 KB |
| master | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 298μs | 163ns | 610ns | 0 | 0 | 0 | 2.22 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net472 | 314μs | 27.5ns | 99.2ns | 0 | 0 | 0 | 2.29 KB |
| #7719 | RunWafRealisticBenchmark |
net6.0 | 396μs | 77.4ns | 290ns | 0 | 0 | 0 | 4.55 KB |
| #7719 | RunWafRealisticBenchmark |
netcoreapp3.1 | 851μs | 5.51μs | 53.4μs | 0 | 0 | 0 | 4.48 KB |
| #7719 | RunWafRealisticBenchmark |
net472 | 429μs | 72.7ns | 282ns | 0 | 0 | 0 | 4.66 KB |
| #7719 | RunWafRealisticBenchmarkWithAttack |
net6.0 | 285μs | 79.5ns | 308ns | 0 | 0 | 0 | 2.24 KB |
| #7719 | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 297μs | 40.5ns | 152ns | 0 | 0 | 0 | 2.22 KB |
| #7719 | RunWafRealisticBenchmarkWithAttack |
net472 | 310μs | 32ns | 124ns | 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μs | 63.7ns | 229ns | 0 | 0 | 0 | 14.52 KB |
| master | SendRequest |
netcoreapp3.1 | 71.9μs | 65ns | 243ns | 0 | 0 | 0 | 17.42 KB |
| master | SendRequest |
net472 | 0.000221ns | 0.000221ns | 0.000858ns | 0 | 0 | 0 | 0 b |
| #7719 | SendRequest |
net6.0 | 61.3μs | 52.2ns | 195ns | 0 | 0 | 0 | 14.52 KB |
| #7719 | SendRequest |
netcoreapp3.1 | 71.3μs | 30.9ns | 107ns | 0 | 0 | 0 | 17.42 KB |
| #7719 | SendRequest |
net472 | 0.0015ns | 0.00112ns | 0.00419ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CharSliceBenchmark - Same speed ✔️ Fewer allocations 🎉
Fewer allocations 🎉 in #7719
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0
6 B
4 B
-2 B
-33.33%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0
5 B
3 B
-2 B
-40.00%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net472
73 B
0 b
-73 B
-100.00%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472
48 B
0 b
-48 B
-100.00%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 | 6 B | 4 B | -2 B | -33.33% |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0 | 5 B | 3 B | -2 B | -40.00% |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net472 | 73 B | 0 b | -73 B | -100.00% |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472 | 48 B | 0 b | -48 B | -100.00% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | OriginalCharSlice |
net6.0 | 1.93ms | 2.64μs | 10.2μs | 0 | 0 | 0 | 640.01 KB |
| master | OriginalCharSlice |
netcoreapp3.1 | 2.28ms | 11.6μs | 53.3μs | 0 | 0 | 0 | 640.09 KB |
| master | OriginalCharSlice |
net472 | 2.63ms | 703ns | 2.54μs | 100 | 0 | 0 | 641.95 KB |
| master | OptimizedCharSlice |
net6.0 | 1.41ms | 104ns | 403ns | 0 | 0 | 0 | 6 B |
| master | OptimizedCharSlice |
netcoreapp3.1 | 1.75ms | 479ns | 1.85μs | 0 | 0 | 0 | 1 B |
| master | OptimizedCharSlice |
net472 | 1.94ms | 270ns | 1.04μs | 0 | 0 | 0 | 73 B |
| master | OptimizedCharSliceWithPool |
net6.0 | 875μs | 116ns | 450ns | 0 | 0 | 0 | 5 B |
| master | OptimizedCharSliceWithPool |
netcoreapp3.1 | 798μs | 124ns | 480ns | 0 | 0 | 0 | 0 b |
| master | OptimizedCharSliceWithPool |
net472 | 1.13ms | 102ns | 397ns | 0 | 0 | 0 | 48 B |
| #7719 | OriginalCharSlice |
net6.0 | 1.93ms | 912ns | 3.53μs | 0 | 0 | 0 | 640.01 KB |
| #7719 | OriginalCharSlice |
netcoreapp3.1 | 2.09ms | 6.13μs | 22.9μs | 0 | 0 | 0 | 640 KB |
| #7719 | OriginalCharSlice |
net472 | 2.64ms | 198ns | 716ns | 100 | 0 | 0 | 641.95 KB |
| #7719 | OptimizedCharSlice |
net6.0 | 1.39ms | 58.4ns | 219ns | 0 | 0 | 0 | 4 B |
| #7719 | OptimizedCharSlice |
netcoreapp3.1 | 1.76ms | 1.86μs | 7.19μs | 0 | 0 | 0 | 1 B |
| #7719 | OptimizedCharSlice |
net472 | 1.96ms | 579ns | 2.24μs | 0 | 0 | 0 | 0 b |
| #7719 | OptimizedCharSliceWithPool |
net6.0 | 821μs | 31.9ns | 124ns | 0 | 0 | 0 | 3 B |
| #7719 | OptimizedCharSliceWithPool |
netcoreapp3.1 | 865μs | 116ns | 448ns | 0 | 0 | 0 | 0 b |
| #7719 | OptimizedCharSliceWithPool |
net472 | 1.13ms | 131ns | 506ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Slower ⚠️ More allocations ⚠️
Slower ⚠️ in #7719
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1
1.180
642,952.40
758,551.34
More allocations ⚠️ in #7719
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1
41.96 KB
42.99 KB
1.03 KB
2.46%
Fewer allocations 🎉 in #7719
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472
56.56 KB
56.05 KB
-513 B
-0.91%
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0
42.6 KB
41.78 KB
-818 B
-1.92%
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 | 1.180 | 642,952.40 | 758,551.34 |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 | 41.96 KB | 42.99 KB | 1.03 KB | 2.46% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 | 56.56 KB | 56.05 KB | -513 B | -0.91% |
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 | 42.6 KB | 41.78 KB | -818 B | -1.92% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 665μs | 2.63μs | 9.85μs | 0 | 0 | 0 | 42.6 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 640μs | 2.96μs | 10.7μs | 0 | 0 | 0 | 41.96 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 978μs | 4.14μs | 16μs | 8.33 | 0 | 0 | 56.56 KB |
| #7719 | WriteAndFlushEnrichedTraces |
net6.0 | 639μs | 3.21μs | 17.9μs | 0 | 0 | 0 | 41.78 KB |
| #7719 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 751μs | 3.93μs | 19.3μs | 0 | 0 | 0 | 42.99 KB |
| #7719 | WriteAndFlushEnrichedTraces |
net472 | 942μs | 4.46μs | 18.9μs | 4.46 | 0 | 0 | 56.05 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.83μs | 9.13ns | 38.7ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
netcoreapp3.1 | 2.6μs | 8.02ns | 31ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
net472 | 2.88μs | 4.02ns | 16.1ns | 0.143 | 0.0143 | 0 | 987 B |
| #7719 | ExecuteNonQuery |
net6.0 | 1.95μs | 2.97ns | 11.5ns | 0 | 0 | 0 | 1.02 KB |
| #7719 | ExecuteNonQuery |
netcoreapp3.1 | 2.69μs | 12.3ns | 47.7ns | 0 | 0 | 0 | 1.02 KB |
| #7719 | ExecuteNonQuery |
net472 | 2.82μs | 3.07ns | 11.9ns | 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.67μs | 7.01ns | 26.2ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
netcoreapp3.1 | 2.21μs | 10.3ns | 41.2ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
net472 | 3.65μs | 1.73ns | 6.69ns | 0.164 | 0 | 0 | 1.04 KB |
| master | CallElasticsearchAsync |
net6.0 | 1.86μs | 8.41ns | 31.5ns | 0 | 0 | 0 | 1.01 KB |
| master | CallElasticsearchAsync |
netcoreapp3.1 | 2.34μs | 10.7ns | 41.5ns | 0 | 0 | 0 | 1.08 KB |
| master | CallElasticsearchAsync |
net472 | 3.85μs | 5.9ns | 22.9ns | 0.171 | 0 | 0 | 1.1 KB |
| #7719 | CallElasticsearch |
net6.0 | 1.67μs | 8.43ns | 38.6ns | 0 | 0 | 0 | 1.03 KB |
| #7719 | CallElasticsearch |
netcoreapp3.1 | 2.3μs | 7.75ns | 30ns | 0 | 0 | 0 | 1.03 KB |
| #7719 | CallElasticsearch |
net472 | 3.76μs | 2.78ns | 10.8ns | 0.151 | 0 | 0 | 1.04 KB |
| #7719 | CallElasticsearchAsync |
net6.0 | 1.89μs | 8.54ns | 31.9ns | 0 | 0 | 0 | 1.01 KB |
| #7719 | CallElasticsearchAsync |
netcoreapp3.1 | 2.36μs | 12.3ns | 57.5ns | 0 | 0 | 0 | 1.08 KB |
| #7719 | CallElasticsearchAsync |
net472 | 3.68μs | 3.43ns | 13.3ns | 0.167 | 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.84μs | 6.75ns | 24.4ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
netcoreapp3.1 | 2.5μs | 8.39ns | 32.5ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
net472 | 2.62μs | 5.25ns | 20.4ns | 0.143 | 0 | 0 | 915 B |
| #7719 | ExecuteAsync |
net6.0 | 1.86μs | 7.09ns | 27.5ns | 0 | 0 | 0 | 952 B |
| #7719 | ExecuteAsync |
netcoreapp3.1 | 2.5μs | 7.25ns | 28.1ns | 0 | 0 | 0 | 952 B |
| #7719 | ExecuteAsync |
net472 | 2.57μs | 2.69ns | 9.72ns | 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 | 7.06μs | 16.7ns | 62.4ns | 0 | 0 | 0 | 2.36 KB |
| master | SendAsync |
netcoreapp3.1 | 8.43μs | 6.39ns | 23ns | 0 | 0 | 0 | 2.9 KB |
| master | SendAsync |
net472 | 12.3μs | 13.9ns | 53.6ns | 0.491 | 0 | 0 | 3.18 KB |
| #7719 | SendAsync |
net6.0 | 6.92μs | 8.57ns | 33.2ns | 0 | 0 | 0 | 2.36 KB |
| #7719 | SendAsync |
netcoreapp3.1 | 8.85μs | 28.3ns | 110ns | 0 | 0 | 0 | 2.9 KB |
| #7719 | SendAsync |
net472 | 12.2μs | 6.9ns | 25.8ns | 0.488 | 0 | 0 | 3.18 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ Fewer allocations 🎉
Fewer allocations 🎉 in #7719
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0
43.44 KB
43.1 KB
-336 B
-0.77%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
254.69 KB
249.12 KB
-5.57 KB
-2.19%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0
277.94 KB
260.81 KB
-17.13 KB
-6.16%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 | 43.44 KB | 43.1 KB | -336 B | -0.77% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 | 254.69 KB | 249.12 KB | -5.57 KB | -2.19% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 | 277.94 KB | 260.81 KB | -17.13 KB | -6.16% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StringConcatBenchmark |
net6.0 | 41.4μs | 164ns | 570ns | 0 | 0 | 0 | 43.44 KB |
| master | StringConcatBenchmark |
netcoreapp3.1 | 49.1μs | 256ns | 1.17μs | 0 | 0 | 0 | 43.63 KB |
| master | StringConcatBenchmark |
net472 | 58.4μs | 270ns | 1.05μs | 0 | 0 | 0 | 65.54 KB |
| master | StringConcatAspectBenchmark |
net6.0 | 501μs | 1.84μs | 7.37μs | 0 | 0 | 0 | 277.94 KB |
| master | StringConcatAspectBenchmark |
netcoreapp3.1 | 491μs | 1.67μs | 6.26μs | 0 | 0 | 0 | 254.69 KB |
| master | StringConcatAspectBenchmark |
net472 | 405μs | 2.17μs | 11.3μs | 0 | 0 | 0 | 278.53 KB |
| #7719 | StringConcatBenchmark |
net6.0 | 42.1μs | 239ns | 1.64μs | 0 | 0 | 0 | 43.1 KB |
| #7719 | StringConcatBenchmark |
netcoreapp3.1 | 47μs | 246ns | 1.26μs | 0 | 0 | 0 | 43.54 KB |
| #7719 | StringConcatBenchmark |
net472 | 58.2μs | 227ns | 849ns | 0 | 0 | 0 | 65.54 KB |
| #7719 | StringConcatAspectBenchmark |
net6.0 | 461μs | 2.27μs | 9.37μs | 0 | 0 | 0 | 260.81 KB |
| #7719 | StringConcatAspectBenchmark |
netcoreapp3.1 | 493μs | 2.07μs | 7.74μs | 0 | 0 | 0 | 249.12 KB |
| #7719 | StringConcatAspectBenchmark |
net472 | 400μs | 2.27μs | 15.4μs | 0 | 0 | 0 | 278.53 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.71μs | 12.6ns | 50.5ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
netcoreapp3.1 | 3.52μs | 15.8ns | 61.1ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
net472 | 3.81μs | 2.01ns | 7.77ns | 0.247 | 0 | 0 | 1.64 KB |
| #7719 | EnrichedLog |
net6.0 | 2.65μs | 1.66ns | 6.43ns | 0 | 0 | 0 | 1.7 KB |
| #7719 | EnrichedLog |
netcoreapp3.1 | 3.73μs | 13.1ns | 50.9ns | 0 | 0 | 0 | 1.7 KB |
| #7719 | EnrichedLog |
net472 | 4.06μs | 2.65ns | 10.3ns | 0.242 | 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 | 129μs | 492ns | 1.84μs | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
netcoreapp3.1 | 130μs | 265ns | 954ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
net472 | 168μs | 155ns | 581ns | 0 | 0 | 0 | 4.52 KB |
| #7719 | EnrichedLog |
net6.0 | 125μs | 425ns | 1.53μs | 0 | 0 | 0 | 4.31 KB |
| #7719 | EnrichedLog |
netcoreapp3.1 | 130μs | 257ns | 994ns | 0 | 0 | 0 | 4.31 KB |
| #7719 | EnrichedLog |
net472 | 175μs | 348ns | 1.35μs | 0 | 0 | 0 | 4.52 KB |
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EnrichedLog |
net6.0 | 5.02μs | 17.4ns | 65.2ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
netcoreapp3.1 | 6.68μs | 13.5ns | 52.1ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
net472 | 7.53μs | 5.43ns | 21ns | 0.299 | 0 | 0 | 2.08 KB |
| #7719 | EnrichedLog |
net6.0 | 5.15μs | 7.63ns | 29.6ns | 0 | 0 | 0 | 2.26 KB |
| #7719 | EnrichedLog |
netcoreapp3.1 | 6.97μs | 7.87ns | 30.5ns | 0 | 0 | 0 | 2.26 KB |
| #7719 | EnrichedLog |
net472 | 7.76μs | 8.44ns | 32.7ns | 0.312 | 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 | 10.6ns | 54.1ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
netcoreapp3.1 | 2.62μs | 12.4ns | 52.6ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
net472 | 3.02μs | 2.72ns | 10.5ns | 0.18 | 0 | 0 | 1.2 KB |
| #7719 | SendReceive |
net6.0 | 1.94μs | 8.85ns | 35.4ns | 0 | 0 | 0 | 1.2 KB |
| #7719 | SendReceive |
netcoreapp3.1 | 2.72μs | 13.1ns | 52.4ns | 0 | 0 | 0 | 1.2 KB |
| #7719 | SendReceive |
net472 | 3.2μs | 1.85ns | 7.17ns | 0.175 | 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.3μs | 7.02ns | 27.2ns | 0 | 0 | 0 | 1.58 KB |
| master | EnrichedLog |
netcoreapp3.1 | 5.65μs | 17.4ns | 67.5ns | 0 | 0 | 0 | 1.63 KB |
| master | EnrichedLog |
net472 | 6.59μs | 7.7ns | 28.8ns | 0.295 | 0 | 0 | 2.03 KB |
| #7719 | EnrichedLog |
net6.0 | 4.33μs | 14.8ns | 57.5ns | 0 | 0 | 0 | 1.58 KB |
| #7719 | EnrichedLog |
netcoreapp3.1 | 5.84μs | 5.21ns | 19.5ns | 0 | 0 | 0 | 1.63 KB |
| #7719 | EnrichedLog |
net472 | 6.55μs | 9.25ns | 35.8ns | 0.294 | 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 | 768ns | 4ns | 19.6ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
netcoreapp3.1 | 953ns | 4.91ns | 24.1ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
net472 | 947ns | 0.2ns | 0.72ns | 0.09 | 0 | 0 | 578 B |
| master | StartFinishScope |
net6.0 | 922ns | 0.233ns | 0.904ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
netcoreapp3.1 | 1.2μs | 4.69ns | 18.1ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
net472 | 1.15μs | 0.245ns | 0.882ns | 0.103 | 0 | 0 | 658 B |
| #7719 | StartFinishSpan |
net6.0 | 797ns | 3.71ns | 14.8ns | 0 | 0 | 0 | 576 B |
| #7719 | StartFinishSpan |
netcoreapp3.1 | 974ns | 4.54ns | 20.3ns | 0 | 0 | 0 | 576 B |
| #7719 | StartFinishSpan |
net472 | 948ns | 0.148ns | 0.554ns | 0.0902 | 0 | 0 | 578 B |
| #7719 | StartFinishScope |
net6.0 | 905ns | 4.89ns | 25.4ns | 0 | 0 | 0 | 696 B |
| #7719 | StartFinishScope |
netcoreapp3.1 | 1.22μs | 1.53ns | 5.93ns | 0 | 0 | 0 | 696 B |
| #7719 | StartFinishScope |
net472 | 1.15μs | 0.454ns | 1.76ns | 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 | 5.04ns | 20.1ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
netcoreapp3.1 | 1.41μs | 6.88ns | 31.5ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
net472 | 1.49μs | 0.871ns | 3.37ns | 0.104 | 0 | 0 | 658 B |
| #7719 | RunOnMethodBegin |
net6.0 | 1.06μs | 5.35ns | 24.5ns | 0 | 0 | 0 | 696 B |
| #7719 | RunOnMethodBegin |
netcoreapp3.1 | 1.42μs | 6.79ns | 26.3ns | 0 | 0 | 0 | 696 B |
| #7719 | RunOnMethodBegin |
net472 | 1.42μs | 1.28ns | 4.97ns | 0.0989 | 0 | 0 | 658 B |
Summary of changes
We are getting
NullReferenceExceptioninHttpContextSetUser, guessing theclaimsPrincipalcan benull.Reason for change
Implementation details
Added
claimsPrincipal is not nullTest coverage
None 🤷
Other details