-
Couldn't load subscription status.
- Fork 150
Remove the ApiWebRequest transport in favor of the HttpClientRequest #7684
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
base: master
Are you sure you want to change the base?
Conversation
…transport for all targeting frameworks.
This comment has been minimized.
This comment has been minimized.
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 (7684) - mean (72ms) : 71, 72
. : milestone, 72,
master - mean (71ms) : 70, 73
. : milestone, 71,
section Baseline
This PR (7684) - mean (68ms) : 67, 69
. : milestone, 68,
master - mean (68ms) : 66, 69
. : milestone, 68,
section CallTarget+Inlining+NGEN
This PR (7684) - mean (1,065ms) : 1008, 1122
. : milestone, 1065,
master - mean (1,044ms) : 992, 1095
. : milestone, 1044,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7684) - mean (107ms) : 105, 108
. : milestone, 107,
master - mean (106ms) : 105, 107
. : milestone, 106,
section Baseline
This PR (7684) - mean (105ms) : 103, 108
. : milestone, 105,
master - mean (105ms) : 103, 108
. : milestone, 105,
section CallTarget+Inlining+NGEN
This PR (7684) - mean (749ms) : 725, 774
. : milestone, 749,
master - mean (747ms) : 724, 770
. : milestone, 747,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7684) - mean (94ms) : 93, 95
. : milestone, 94,
master - mean (94ms) : 93, 95
. : milestone, 94,
section Baseline
This PR (7684) - mean (93ms) : 91, 94
. : milestone, 93,
master - mean (93ms) : 91, 95
. : milestone, 93,
section CallTarget+Inlining+NGEN
This PR (7684) - mean (712ms) : 672, 752
. : milestone, 712,
master - mean (704ms) : 676, 733
. : milestone, 704,
gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7684) - mean (92ms) : 91, 93
. : milestone, 92,
master - mean (92ms) : 91, 94
. : milestone, 92,
section Baseline
This PR (7684) - mean (91ms) : 89, 93
. : milestone, 91,
master - mean (91ms) : 89, 93
. : milestone, 91,
section CallTarget+Inlining+NGEN
This PR (7684) - mean (656ms) : 641, 671
. : milestone, 656,
master - mean (664ms) : 650, 678
. : milestone, 664,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7684) - mean (196ms) : 192, 199
. : milestone, 196,
master - mean (195ms) : 192, 198
. : milestone, 195,
section Baseline
This PR (7684) - mean (192ms) : 189, 195
. : milestone, 192,
master - mean (192ms) : 187, 197
. : milestone, 192,
section CallTarget+Inlining+NGEN
This PR (7684) - mean (1,149ms) : 1086, 1211
. : milestone, 1149,
master - mean (1,151ms) : 1104, 1198
. : milestone, 1151,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7684) - mean (275ms) : 271, 280
. : milestone, 275,
master - mean (275ms) : 270, 279
. : milestone, 275,
section Baseline
This PR (7684) - mean (274ms) : 268, 280
. : milestone, 274,
master - mean (274ms) : 270, 278
. : milestone, 274,
section CallTarget+Inlining+NGEN
This PR (7684) - mean (939ms) : 898, 979
. : milestone, 939,
master - mean (938ms) : 891, 985
. : milestone, 938,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7684) - mean (268ms) : 264, 272
. : milestone, 268,
master - mean (267ms) : 263, 272
. : milestone, 267,
section Baseline
This PR (7684) - mean (268ms) : 263, 274
. : milestone, 268,
master - mean (267ms) : 263, 270
. : milestone, 267,
section CallTarget+Inlining+NGEN
This PR (7684) - mean (924ms) : 876, 972
. : milestone, 924,
master - mean (924ms) : 876, 972
. : milestone, 924,
gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7684) - mean (268ms) : 262, 273
. : milestone, 268,
master - mean (265ms) : 262, 269
. : milestone, 265,
section Baseline
This PR (7684) - mean (268ms) : 262, 275
. : milestone, 268,
master - mean (266ms) : 261, 270
. : milestone, 266,
section CallTarget+Inlining+NGEN
This PR (7684) - mean (849ms) : 832, 866
. : milestone, 849,
master - mean (850ms) : 833, 866
. : milestone, 850,
|
bbfa56f to
f054718
Compare
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.
💡 Codex Review
dd-trace-dotnet/tracer/test/benchmarks/Benchmarks.Trace/AgentWriterBenchmark.cs
Lines 74 to 78 in f054718
| public FakeApiRequestFactory(Uri baseEndpointUri) | |
| { | |
| _baseEndpointUri = baseEndpointUri; | |
| _realFactory = new ApiWebRequestFactory(baseEndpointUri, AgentHttpHeaderNames.DefaultHeaders); | |
| } |
The commit deletes the ApiWebRequestFactory implementation, but AgentWriterBenchmark still instantiates it inside FakeApiRequestFactory. Building the benchmarks project after this change will fail with a missing type error. Switching the benchmark to use HttpClientRequestFactory (or another remaining transport) is necessary for the solution to compile.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
BenchmarksBenchmarks Report for benchmark platform 🐌Benchmarks for #7684 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 ✔️ Fewer allocations 🎉
|
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 | 3.31 KB | 1.54 KB | -1.77 KB | -53.52% |
| Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 | 2.71 KB | 1.19 KB | -1.52 KB | -56.01% |
| Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 | 2.7 KB | 1.13 KB | -1.57 KB | -58.14% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 944μs | 421ns | 1.63μs | 0 | 0 | 0 | 2.71 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.02ms | 370ns | 1.43μs | 0 | 0 | 0 | 2.7 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 1.19ms | 1.16μs | 4.51μs | 0 | 0 | 0 | 3.31 KB |
| #7684 | WriteAndFlushEnrichedTraces |
net6.0 | 910μs | 215ns | 773ns | 0 | 0 | 0 | 1.19 KB |
| #7684 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.02ms | 140ns | 543ns | 0 | 0 | 0 | 1.13 KB |
| #7684 | WriteAndFlushEnrichedTraces |
net472 | 1.18ms | 607ns | 2.35μs | 0 | 0 | 0 | 1.54 KB |
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Unknown 🤷 Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | AllCycleSimpleBody |
net6.0 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| master | AllCycleSimpleBody |
netcoreapp3.1 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| master | AllCycleSimpleBody |
net472 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| master | AllCycleMoreComplexBody |
net6.0 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| master | AllCycleMoreComplexBody |
netcoreapp3.1 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| master | AllCycleMoreComplexBody |
net472 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| master | ObjectExtractorSimpleBody |
net6.0 | 319ns | 1.07ns | 4.16ns | 0 | 0 | 0 | 280 B |
| master | ObjectExtractorSimpleBody |
netcoreapp3.1 | 397ns | 2.11ns | 10.6ns | 0 | 0 | 0 | 272 B |
| master | ObjectExtractorSimpleBody |
net472 | 294ns | 0.0194ns | 0.07ns | 0.0444 | 0 | 0 | 281 B |
| master | ObjectExtractorMoreComplexBody |
net6.0 | 6.3μs | 28ns | 108ns | 0 | 0 | 0 | 3.78 KB |
| master | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.79μs | 39.3ns | 176ns | 0 | 0 | 0 | 3.69 KB |
| master | ObjectExtractorMoreComplexBody |
net472 | 6.74μs | 1.68ns | 6.5ns | 0.572 | 0 | 0 | 3.8 KB |
| #7684 | AllCycleSimpleBody |
net6.0 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| #7684 | AllCycleSimpleBody |
netcoreapp3.1 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| #7684 | AllCycleSimpleBody |
net472 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| #7684 | AllCycleMoreComplexBody |
net6.0 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| #7684 | AllCycleMoreComplexBody |
netcoreapp3.1 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| #7684 | AllCycleMoreComplexBody |
net472 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| #7684 | ObjectExtractorSimpleBody |
net6.0 | 326ns | 1.8ns | 10.2ns | 0 | 0 | 0 | 280 B |
| #7684 | ObjectExtractorSimpleBody |
netcoreapp3.1 | 392ns | 2.21ns | 15.5ns | 0 | 0 | 0 | 272 B |
| #7684 | ObjectExtractorSimpleBody |
net472 | 295ns | 0.0368ns | 0.142ns | 0.0445 | 0 | 0 | 281 B |
| #7684 | ObjectExtractorMoreComplexBody |
net6.0 | 6.32μs | 26.6ns | 103ns | 0 | 0 | 0 | 3.78 KB |
| #7684 | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.83μs | 36.7ns | 142ns | 0 | 0 | 0 | 3.69 KB |
| #7684 | ObjectExtractorMoreComplexBody |
net472 | 6.82μs | 11.2ns | 43.5ns | 0.583 | 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 | 77.6μs | 38.7ns | 150ns | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
netcoreapp3.1 | 96.5μs | 281ns | 1.09μs | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
net472 | 111μs | 10.9ns | 37.8ns | 5.01 | 0 | 0 | 32.5 KB |
| master | EncodeLegacyArgs |
net6.0 | 142μs | 64.7ns | 251ns | 0 | 0 | 0 | 2.15 KB |
| master | EncodeLegacyArgs |
netcoreapp3.1 | 197μs | 154ns | 554ns | 0 | 0 | 0 | 2.14 KB |
| master | EncodeLegacyArgs |
net472 | 262μs | 38ns | 137ns | 0 | 0 | 0 | 2.16 KB |
| #7684 | EncodeArgs |
net6.0 | 76.3μs | 290ns | 1.12μs | 0 | 0 | 0 | 32.4 KB |
| #7684 | EncodeArgs |
netcoreapp3.1 | 96.5μs | 168ns | 629ns | 0 | 0 | 0 | 32.4 KB |
| #7684 | EncodeArgs |
net472 | 109μs | 44.8ns | 174ns | 4.91 | 0 | 0 | 32.51 KB |
| #7684 | EncodeLegacyArgs |
net6.0 | 144μs | 46.4ns | 180ns | 0 | 0 | 0 | 2.15 KB |
| #7684 | EncodeLegacyArgs |
netcoreapp3.1 | 201μs | 558ns | 2.16μs | 0 | 0 | 0 | 2.14 KB |
| #7684 | EncodeLegacyArgs |
net472 | 261μs | 10.6ns | 39.8ns | 0 | 0 | 0 | 2.17 KB |
Benchmarks.Trace.Asm.AppSecWafBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #7684
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑netcoreapp3.1
2.117
408,737.08
865,304.53
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑netcoreapp3.1 | 2.117 | 408,737.08 | 865,304.53 |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | RunWafRealisticBenchmark |
net6.0 | 391μs | 52ns | 194ns | 0 | 0 | 0 | 4.55 KB |
| master | RunWafRealisticBenchmark |
netcoreapp3.1 | 409μs | 259ns | 1μs | 0 | 0 | 0 | 4.48 KB |
| master | RunWafRealisticBenchmark |
net472 | 427μs | 55.6ns | 215ns | 0 | 0 | 0 | 4.66 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net6.0 | 285μs | 13.6ns | 49.2ns | 0 | 0 | 0 | 2.24 KB |
| master | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 699μs | 7.95μs | 79.5μs | 0 | 0 | 0 | 2.22 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net472 | 312μs | 29.4ns | 114ns | 0 | 0 | 0 | 2.29 KB |
| #7684 | RunWafRealisticBenchmark |
net6.0 | 390μs | 110ns | 396ns | 0 | 0 | 0 | 4.55 KB |
| #7684 | RunWafRealisticBenchmark |
netcoreapp3.1 | 848μs | 6.21μs | 61.5μs | 0 | 0 | 0 | 4.48 KB |
| #7684 | RunWafRealisticBenchmark |
net472 | 432μs | 49.9ns | 193ns | 0 | 0 | 0 | 4.66 KB |
| #7684 | RunWafRealisticBenchmarkWithAttack |
net6.0 | 282μs | 39.5ns | 153ns | 0 | 0 | 0 | 2.24 KB |
| #7684 | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 716μs | 5.09μs | 50.1μs | 0 | 0 | 0 | 2.22 KB |
| #7684 | RunWafRealisticBenchmarkWithAttack |
net472 | 314μs | 20.1ns | 72.5ns | 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 | 45.4ns | 170ns | 0 | 0 | 0 | 14.52 KB |
| master | SendRequest |
netcoreapp3.1 | 71.2μs | 59.2ns | 229ns | 0 | 0 | 0 | 17.42 KB |
| master | SendRequest |
net472 | 0.00371ns | 0.0014ns | 0.00542ns | 0 | 0 | 0 | 0 b |
| #7684 | SendRequest |
net6.0 | 62μs | 79.1ns | 296ns | 0 | 0 | 0 | 14.52 KB |
| #7684 | SendRequest |
netcoreapp3.1 | 72μs | 113ns | 437ns | 0 | 0 | 0 | 17.42 KB |
| #7684 | SendRequest |
net472 | 0.00319ns | 0.00175ns | 0.00656ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CharSliceBenchmark - Same speed ✔️ Fewer allocations 🎉
Fewer allocations 🎉 in #7684
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0
7 B
6 B
-1 B
-14.29%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 | 7 B | 6 B | -1 B | -14.29% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | OriginalCharSlice |
net6.0 | 1.91ms | 462ns | 1.79μs | 0 | 0 | 0 | 640.01 KB |
| master | OriginalCharSlice |
netcoreapp3.1 | 2.14ms | 1.09μs | 3.77μs | 0 | 0 | 0 | 640 KB |
| master | OriginalCharSlice |
net472 | 2.65ms | 635ns | 2.29μs | 100 | 0 | 0 | 641.95 KB |
| master | OptimizedCharSlice |
net6.0 | 1.39ms | 533ns | 2.06μs | 0 | 0 | 0 | 7 B |
| master | OptimizedCharSlice |
netcoreapp3.1 | 1.68ms | 335ns | 1.3μs | 0 | 0 | 0 | 1 B |
| master | OptimizedCharSlice |
net472 | 1.93ms | 319ns | 1.24μs | 0 | 0 | 0 | 73 B |
| master | OptimizedCharSliceWithPool |
net6.0 | 875μs | 2.01μs | 7.77μs | 0 | 0 | 0 | 3 B |
| master | OptimizedCharSliceWithPool |
netcoreapp3.1 | 811μs | 236ns | 913ns | 0 | 0 | 0 | 0 b |
| master | OptimizedCharSliceWithPool |
net472 | 1.13ms | 86.3ns | 323ns | 0 | 0 | 0 | 47 B |
| #7684 | OriginalCharSlice |
net6.0 | 1.91ms | 739ns | 2.76μs | 0 | 0 | 0 | 640.01 KB |
| #7684 | OriginalCharSlice |
netcoreapp3.1 | 2.11ms | 1.1μs | 4.1μs | 0 | 0 | 0 | 640 KB |
| #7684 | OriginalCharSlice |
net472 | 2.61ms | 114ns | 413ns | 100 | 0 | 0 | 641.95 KB |
| #7684 | OptimizedCharSlice |
net6.0 | 1.34ms | 209ns | 755ns | 0 | 0 | 0 | 6 B |
| #7684 | OptimizedCharSlice |
netcoreapp3.1 | 1.66ms | 270ns | 1.05μs | 0 | 0 | 0 | 1 B |
| #7684 | OptimizedCharSlice |
net472 | 1.98ms | 252ns | 978ns | 0 | 0 | 0 | 73 B |
| #7684 | OptimizedCharSliceWithPool |
net6.0 | 802μs | 151ns | 584ns | 0 | 0 | 0 | 3 B |
| #7684 | OptimizedCharSliceWithPool |
netcoreapp3.1 | 818μs | 262ns | 1.01μs | 0 | 0 | 0 | 0 b |
| #7684 | OptimizedCharSliceWithPool |
net472 | 1.24ms | 72.4ns | 280ns | 0 | 0 | 0 | 47 B |
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7684
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0
41.64 KB
41.94 KB
298 B
0.72%
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472
56.06 KB
56.43 KB
368 B
0.66%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 | 41.64 KB | 41.94 KB | 298 B | 0.72% |
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 | 56.06 KB | 56.43 KB | 368 B | 0.66% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 722μs | 3.92μs | 21.8μs | 0 | 0 | 0 | 41.64 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 668μs | 3.67μs | 22.9μs | 0 | 0 | 0 | 41.96 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 948μs | 4.59μs | 19.5μs | 4.46 | 0 | 0 | 56.06 KB |
| #7684 | WriteAndFlushEnrichedTraces |
net6.0 | 721μs | 2.86μs | 11.8μs | 0 | 0 | 0 | 41.94 KB |
| #7684 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 723μs | 4.07μs | 26.4μs | 0 | 0 | 0 | 41.93 KB |
| #7684 | WriteAndFlushEnrichedTraces |
net472 | 877μs | 4.6μs | 25.2μs | 8.93 | 0 | 0 | 56.43 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.96μs | 5.45ns | 21.1ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
netcoreapp3.1 | 2.62μs | 9.29ns | 36ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
net472 | 2.85μs | 4.42ns | 17.1ns | 0.156 | 0.0142 | 0 | 987 B |
| #7684 | ExecuteNonQuery |
net6.0 | 1.97μs | 9.9ns | 43.2ns | 0 | 0 | 0 | 1.02 KB |
| #7684 | ExecuteNonQuery |
netcoreapp3.1 | 2.66μs | 4.45ns | 17.2ns | 0 | 0 | 0 | 1.02 KB |
| #7684 | ExecuteNonQuery |
net472 | 2.77μs | 2.65ns | 10.3ns | 0.152 | 0.0138 | 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.68μs | 7.67ns | 30.7ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
netcoreapp3.1 | 2.19μs | 10ns | 38.8ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
net472 | 3.5μs | 3.84ns | 14.9ns | 0.158 | 0 | 0 | 1.04 KB |
| master | CallElasticsearchAsync |
net6.0 | 1.86μs | 5.8ns | 21.7ns | 0 | 0 | 0 | 1.01 KB |
| master | CallElasticsearchAsync |
netcoreapp3.1 | 2.33μs | 11.3ns | 47.8ns | 0 | 0 | 0 | 1.08 KB |
| master | CallElasticsearchAsync |
net472 | 3.7μs | 2.85ns | 11ns | 0.168 | 0 | 0 | 1.1 KB |
| #7684 | CallElasticsearch |
net6.0 | 1.76μs | 0.647ns | 2.42ns | 0 | 0 | 0 | 1.03 KB |
| #7684 | CallElasticsearch |
netcoreapp3.1 | 2.28μs | 11.4ns | 48.3ns | 0 | 0 | 0 | 1.03 KB |
| #7684 | CallElasticsearch |
net472 | 3.47μs | 2.66ns | 10.3ns | 0.156 | 0 | 0 | 1.04 KB |
| #7684 | CallElasticsearchAsync |
net6.0 | 1.82μs | 9.53ns | 45.7ns | 0 | 0 | 0 | 1.01 KB |
| #7684 | CallElasticsearchAsync |
netcoreapp3.1 | 2.37μs | 8.41ns | 32.6ns | 0 | 0 | 0 | 1.08 KB |
| #7684 | CallElasticsearchAsync |
net472 | 3.75μs | 2.03ns | 7.59ns | 0.169 | 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.81μs | 8.77ns | 35.1ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
netcoreapp3.1 | 2.5μs | 8.81ns | 34.1ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
net472 | 2.67μs | 2.98ns | 11.5ns | 0.133 | 0 | 0 | 915 B |
| #7684 | ExecuteAsync |
net6.0 | 1.88μs | 8.9ns | 34.5ns | 0 | 0 | 0 | 952 B |
| #7684 | ExecuteAsync |
netcoreapp3.1 | 2.39μs | 10.3ns | 40.1ns | 0 | 0 | 0 | 952 B |
| #7684 | ExecuteAsync |
net472 | 2.59μs | 4.29ns | 16.6ns | 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.84μs | 12.4ns | 48ns | 0 | 0 | 0 | 2.36 KB |
| master | SendAsync |
netcoreapp3.1 | 8.63μs | 15.1ns | 58.6ns | 0 | 0 | 0 | 2.9 KB |
| master | SendAsync |
net472 | 12.2μs | 10.6ns | 41.2ns | 0.491 | 0 | 0 | 3.18 KB |
| #7684 | SendAsync |
net6.0 | 6.86μs | 6.51ns | 23.5ns | 0 | 0 | 0 | 2.36 KB |
| #7684 | SendAsync |
netcoreapp3.1 | 8.79μs | 8.22ns | 31.9ns | 0 | 0 | 0 | 2.9 KB |
| #7684 | SendAsync |
net472 | 12.1μs | 6.32ns | 23.6ns | 0.484 | 0 | 0 | 3.18 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7684
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472
57.34 KB
65.54 KB
8.19 KB
14.29%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0
43.78 KB
44.74 KB
968 B
2.21%
Fewer allocations 🎉 in #7684
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
276.89 KB
274.53 KB
-2.36 KB
-0.85%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0
274.41 KB
269.58 KB
-4.83 KB
-1.76%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 | 57.34 KB | 65.54 KB | 8.19 KB | 14.29% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 | 43.78 KB | 44.74 KB | 968 B | 2.21% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 | 276.89 KB | 274.53 KB | -2.36 KB | -0.85% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 | 274.41 KB | 269.58 KB | -4.83 KB | -1.76% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StringConcatBenchmark |
net6.0 | 45.5μs | 258ns | 1.83μs | 0 | 0 | 0 | 43.78 KB |
| master | StringConcatBenchmark |
netcoreapp3.1 | 48.6μs | 239ns | 1.44μs | 0 | 0 | 0 | 42.79 KB |
| master | StringConcatBenchmark |
net472 | 56.4μs | 285ns | 1.27μs | 0 | 0 | 0 | 57.34 KB |
| master | StringConcatAspectBenchmark |
net6.0 | 460μs | 1.01μs | 3.51μs | 0 | 0 | 0 | 274.41 KB |
| master | StringConcatAspectBenchmark |
netcoreapp3.1 | 545μs | 1.62μs | 5.85μs | 0 | 0 | 0 | 276.89 KB |
| master | StringConcatAspectBenchmark |
net472 | 405μs | 2.07μs | 10.2μs | 0 | 0 | 0 | 278.53 KB |
| #7684 | StringConcatBenchmark |
net6.0 | 45.4μs | 266ns | 2.31μs | 0 | 0 | 0 | 44.74 KB |
| #7684 | StringConcatBenchmark |
netcoreapp3.1 | 48.6μs | 233ns | 933ns | 0 | 0 | 0 | 42.7 KB |
| #7684 | StringConcatBenchmark |
net472 | 56.8μs | 237ns | 888ns | 0 | 0 | 0 | 65.54 KB |
| #7684 | StringConcatAspectBenchmark |
net6.0 | 503μs | 2.23μs | 10.2μs | 0 | 0 | 0 | 269.58 KB |
| #7684 | StringConcatAspectBenchmark |
netcoreapp3.1 | 514μs | 2.42μs | 9.69μs | 0 | 0 | 0 | 274.53 KB |
| #7684 | StringConcatAspectBenchmark |
net472 | 405μs | 2.17μs | 11.9μ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.64μs | 12.2ns | 47.4ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
netcoreapp3.1 | 3.69μs | 17.3ns | 71.2ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
net472 | 3.87μs | 6.32ns | 24.5ns | 0.251 | 0 | 0 | 1.64 KB |
| #7684 | EnrichedLog |
net6.0 | 2.64μs | 2.52ns | 9.07ns | 0 | 0 | 0 | 1.7 KB |
| #7684 | EnrichedLog |
netcoreapp3.1 | 3.6μs | 16.8ns | 65.2ns | 0 | 0 | 0 | 1.7 KB |
| #7684 | EnrichedLog |
net472 | 3.99μs | 2.91ns | 11.3ns | 0.241 | 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 | 123μs | 58ns | 209ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
netcoreapp3.1 | 127μs | 35.3ns | 137ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
net472 | 168μs | 52.6ns | 190ns | 0 | 0 | 0 | 4.52 KB |
| #7684 | EnrichedLog |
net6.0 | 124μs | 79.7ns | 287ns | 0 | 0 | 0 | 4.31 KB |
| #7684 | EnrichedLog |
netcoreapp3.1 | 128μs | 259ns | 1μs | 0 | 0 | 0 | 4.31 KB |
| #7684 | EnrichedLog |
net472 | 167μs | 118ns | 458ns | 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 | 20.6ns | 77.1ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
netcoreapp3.1 | 6.68μs | 16.1ns | 60.3ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
net472 | 7.45μs | 8.27ns | 32ns | 0.298 | 0 | 0 | 2.08 KB |
| #7684 | EnrichedLog |
net6.0 | 4.95μs | 18.5ns | 71.5ns | 0 | 0 | 0 | 2.26 KB |
| #7684 | EnrichedLog |
netcoreapp3.1 | 6.85μs | 16.2ns | 62.9ns | 0 | 0 | 0 | 2.26 KB |
| #7684 | EnrichedLog |
net472 | 7.52μs | 13.7ns | 52.9ns | 0.3 | 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 | 2.04μs | 0.543ns | 2.1ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
netcoreapp3.1 | 2.73μs | 8.07ns | 31.3ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
net472 | 3.19μs | 3.1ns | 12ns | 0.191 | 0 | 0 | 1.2 KB |
| #7684 | SendReceive |
net6.0 | 1.98μs | 9.45ns | 36.6ns | 0 | 0 | 0 | 1.2 KB |
| #7684 | SendReceive |
netcoreapp3.1 | 2.62μs | 12.8ns | 55.8ns | 0 | 0 | 0 | 1.2 KB |
| #7684 | SendReceive |
net472 | 3.07μs | 1.36ns | 5.28ns | 0.184 | 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.41μs | 8.41ns | 32.6ns | 0 | 0 | 0 | 1.58 KB |
| master | EnrichedLog |
netcoreapp3.1 | 5.61μs | 10.2ns | 39.6ns | 0 | 0 | 0 | 1.63 KB |
| master | EnrichedLog |
net472 | 6.53μs | 8.04ns | 31.2ns | 0.294 | 0 | 0 | 2.03 KB |
| #7684 | EnrichedLog |
net6.0 | 4.39μs | 20.4ns | 81.6ns | 0 | 0 | 0 | 1.58 KB |
| #7684 | EnrichedLog |
netcoreapp3.1 | 5.57μs | 17.6ns | 68ns | 0 | 0 | 0 | 1.63 KB |
| #7684 | EnrichedLog |
net472 | 6.8μs | 6.29ns | 24.4ns | 0.306 | 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 | 779ns | 0.299ns | 1.16ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
netcoreapp3.1 | 962ns | 1ns | 3.87ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
net472 | 922ns | 0.429ns | 1.6ns | 0.0875 | 0 | 0 | 578 B |
| master | StartFinishScope |
net6.0 | 963ns | 1.95ns | 7.54ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
netcoreapp3.1 | 1.18μs | 6.47ns | 37.7ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
net472 | 1.15μs | 0.0948ns | 0.367ns | 0.0988 | 0 | 0 | 658 B |
| #7684 | StartFinishSpan |
net6.0 | 787ns | 3.6ns | 14.4ns | 0 | 0 | 0 | 576 B |
| #7684 | StartFinishSpan |
netcoreapp3.1 | 967ns | 4.89ns | 22.9ns | 0 | 0 | 0 | 576 B |
| #7684 | StartFinishSpan |
net472 | 946ns | 0.052ns | 0.195ns | 0.0903 | 0 | 0 | 578 B |
| #7684 | StartFinishScope |
net6.0 | 924ns | 5.02ns | 29.2ns | 0 | 0 | 0 | 696 B |
| #7684 | StartFinishScope |
netcoreapp3.1 | 1.2μs | 5.43ns | 21ns | 0 | 0 | 0 | 696 B |
| #7684 | StartFinishScope |
net472 | 1.15μs | 0.429ns | 1.66ns | 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.13μs | 0.341ns | 1.23ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
netcoreapp3.1 | 1.4μs | 6.05ns | 23.4ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
net472 | 1.46μs | 0.623ns | 2.33ns | 0.104 | 0 | 0 | 658 B |
| #7684 | RunOnMethodBegin |
net6.0 | 1.07μs | 1.69ns | 6.53ns | 0 | 0 | 0 | 696 B |
| #7684 | RunOnMethodBegin |
netcoreapp3.1 | 1.4μs | 6.72ns | 26.9ns | 0 | 0 | 0 | 696 B |
| #7684 | RunOnMethodBegin |
net472 | 1.47μs | 1.28ns | 4.96ns | 0.103 | 0 | 0 | 658 B |
Summary of changes
We historically always had two transports implementations due the fact we were supporting .NET Framework 4. Because we dropped the support for that old FX Framework we can now just reference the included System.Net.Http assembly from the 4.6 framework
Reason for change
We don't need it, and simplifies the code.
Implementation details
Remove a bunch of files, and modify the current HttpClient transport to be built for .NET FX
Test coverage
Everything should work, we shouldn't have any behavioural change.
Other details