-
Notifications
You must be signed in to change notification settings - Fork 151
Remove unused PublicApiUsage members
#7787
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
This comment has been minimized.
This comment has been minimized.
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (7787) 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 (7787) - mean (75ms) : 70, 81
master - mean (74ms) : 70, 78
section Bailout
This PR (7787) - mean (79ms) : 74, 84
master - mean (79ms) : 74, 84
section CallTarget+Inlining+NGEN
This PR (7787) - mean (1,108ms) : 1035, 1181
master - mean (1,110ms) : 1033, 1187
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 (7787) - mean (118ms) : 109, 127
master - mean (117ms) : 110, 124
section Bailout
This PR (7787) - mean (118ms) : 112, 124
master - mean (120ms) : 114, 127
section CallTarget+Inlining+NGEN
This PR (7787) - mean (804ms) : 758, 849
master - mean (802ms) : 753, 851
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7787) - mean (104ms) : 98, 109
master - mean (104ms) : 99, 110
section Bailout
This PR (7787) - mean (105ms) : 100, 109
master - mean (105ms) : 97, 114
section CallTarget+Inlining+NGEN
This PR (7787) - mean (750ms) : 711, 788
master - mean (750ms) : 711, 790
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7787) - mean (102ms) : 96, 108
master - mean (102ms) : 97, 108
section Bailout
This PR (7787) - mean (103ms) : 97, 108
master - mean (102ms) : 97, 107
section CallTarget+Inlining+NGEN
This PR (7787) - mean (708ms) : 679, 736
master - mean (716ms) : 687, 745
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 (7787) - mean (192ms) : 187, 197
master - mean (192ms) : 188, 196
section Bailout
This PR (7787) - mean (195ms) : 193, 197
master - mean (195ms) : 192, 197
section CallTarget+Inlining+NGEN
This PR (7787) - mean (1,163ms) : 1102, 1225
master - mean (1,158ms) : 1102, 1214
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 (7787) - mean (275ms) : 271, 279
master - mean (276ms) : 272, 281
section Bailout
This PR (7787) - mean (275ms) : 271, 280
master - mean (277ms) : 272, 282
section CallTarget+Inlining+NGEN
This PR (7787) - mean (947ms) : 910, 984
master - mean (953ms) : 914, 991
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7787) - mean (268ms) : 264, 272
master - mean (268ms) : 263, 273
section Bailout
This PR (7787) - mean (268ms) : 264, 272
master - mean (269ms) : 264, 274
section CallTarget+Inlining+NGEN
This PR (7787) - mean (922ms) : 875, 968
master - mean (932ms) : 884, 981
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7787) - mean (267ms) : 263, 271
master - mean (268ms) : 263, 273
section Bailout
This PR (7787) - mean (267ms) : 264, 270
master - mean (267ms) : 263, 271
section CallTarget+Inlining+NGEN
This PR (7787) - mean (849ms) : 830, 868
master - mean (853ms) : 832, 873
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2f81847 to
d7a6df3
Compare
BenchmarksBenchmarks Report for benchmark platform 🐌Benchmarks for #7787 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.02 KB | 6.09 KB | 72 B | 1.20% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StartStopWithChild |
net6.0 | 10.4μs | 53.3ns | 301ns | 0 | 0 | 0 | 5.54 KB |
| master | StartStopWithChild |
netcoreapp3.1 | 13.9μs | 73.5ns | 382ns | 0 | 0 | 0 | 5.73 KB |
| master | StartStopWithChild |
net472 | 22.3μs | 122ns | 678ns | 0.975 | 0.433 | 0.108 | 6.02 KB |
| #7787 | StartStopWithChild |
net6.0 | 10.7μs | 55.1ns | 270ns | 0 | 0 | 0 | 5.53 KB |
| #7787 | StartStopWithChild |
netcoreapp3.1 | 13.5μs | 68ns | 319ns | 0 | 0 | 0 | 5.71 KB |
| #7787 | StartStopWithChild |
net472 | 22.2μs | 126ns | 864ns | 0.882 | 0.22 | 0 | 6.09 KB |
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7787
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 | 934μs | 178ns | 689ns | 0 | 0 | 0 | 2.71 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.03ms | 438ns | 1.7μs | 0 | 0 | 0 | 2.7 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 1.2ms | 591ns | 2.29μs | 0 | 0 | 0 | 3.31 KB |
| #7787 | WriteAndFlushEnrichedTraces |
net6.0 | 940μs | 304ns | 1.18μs | 0 | 0 | 0 | 2.71 KB |
| #7787 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.02ms | 1.53μs | 5.91μs | 0 | 0 | 0 | 2.7 KB |
| #7787 | WriteAndFlushEnrichedTraces |
net472 | 1.22ms | 753ns | 2.82μs | 0 | 0 | 0 | 3.35 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.04μs | 6.4ns | 64ns | 0 | 0 | 0 | 1.22 KB |
| master | AllCycleSimpleBody |
netcoreapp3.1 | 1.41μs | 7.62ns | 45.1ns | 0 | 0 | 0 | 1.2 KB |
| master | AllCycleSimpleBody |
net472 | 1.02μs | 0.247ns | 0.959ns | 0.194 | 0 | 0 | 1.23 KB |
| master | AllCycleMoreComplexBody |
net6.0 | 6.98μs | 38.4ns | 220ns | 0 | 0 | 0 | 4.72 KB |
| master | AllCycleMoreComplexBody |
netcoreapp3.1 | 9.01μs | 41.9ns | 173ns | 0 | 0 | 0 | 4.62 KB |
| master | AllCycleMoreComplexBody |
net472 | 7.66μs | 4.11ns | 15.9ns | 0.729 | 0 | 0 | 4.74 KB |
| master | ObjectExtractorSimpleBody |
net6.0 | 319ns | 1.76ns | 9.93ns | 0 | 0 | 0 | 280 B |
| master | ObjectExtractorSimpleBody |
netcoreapp3.1 | 402ns | 2.14ns | 11.5ns | 0 | 0 | 0 | 272 B |
| master | ObjectExtractorSimpleBody |
net472 | 296ns | 0.103ns | 0.399ns | 0.0432 | 0 | 0 | 281 B |
| master | ObjectExtractorMoreComplexBody |
net6.0 | 6.3μs | 16.2ns | 62.8ns | 0 | 0 | 0 | 3.78 KB |
| master | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.84μs | 21.4ns | 80.2ns | 0 | 0 | 0 | 3.69 KB |
| master | ObjectExtractorMoreComplexBody |
net472 | 6.72μs | 2.02ns | 7.81ns | 0.57 | 0 | 0 | 3.8 KB |
| #7787 | AllCycleSimpleBody |
net6.0 | 1.08μs | 5.77ns | 28.9ns | 0 | 0 | 0 | 1.22 KB |
| #7787 | AllCycleSimpleBody |
netcoreapp3.1 | 1.41μs | 7.87ns | 53.9ns | 0 | 0 | 0 | 1.2 KB |
| #7787 | AllCycleSimpleBody |
net472 | 1.01μs | 0.444ns | 1.66ns | 0.194 | 0 | 0 | 1.23 KB |
| #7787 | AllCycleMoreComplexBody |
net6.0 | 7.15μs | 39.4ns | 240ns | 0 | 0 | 0 | 4.72 KB |
| #7787 | AllCycleMoreComplexBody |
netcoreapp3.1 | 8.97μs | 37.9ns | 147ns | 0 | 0 | 0 | 4.62 KB |
| #7787 | AllCycleMoreComplexBody |
net472 | 7.69μs | 4.96ns | 17.9ns | 0.729 | 0 | 0 | 4.74 KB |
| #7787 | ObjectExtractorSimpleBody |
net6.0 | 323ns | 1.6ns | 7.34ns | 0 | 0 | 0 | 280 B |
| #7787 | ObjectExtractorSimpleBody |
netcoreapp3.1 | 396ns | 2.22ns | 13.9ns | 0 | 0 | 0 | 272 B |
| #7787 | ObjectExtractorSimpleBody |
net472 | 298ns | 0.0944ns | 0.366ns | 0.0435 | 0 | 0 | 281 B |
| #7787 | ObjectExtractorMoreComplexBody |
net6.0 | 6.38μs | 32.4ns | 138ns | 0 | 0 | 0 | 3.78 KB |
| #7787 | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.77μs | 40ns | 179ns | 0 | 0 | 0 | 3.69 KB |
| #7787 | ObjectExtractorMoreComplexBody |
net472 | 6.67μs | 1.05ns | 3.92ns | 0.601 | 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.4μs | 361ns | 1.4μs | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
netcoreapp3.1 | 96.5μs | 264ns | 1.02μs | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
net472 | 109μs | 24.9ns | 96.5ns | 4.93 | 0 | 0 | 32.5 KB |
| master | EncodeLegacyArgs |
net6.0 | 141μs | 55ns | 206ns | 0 | 0 | 0 | 2.15 KB |
| master | EncodeLegacyArgs |
netcoreapp3.1 | 200μs | 641ns | 2.48μs | 0 | 0 | 0 | 2.14 KB |
| master | EncodeLegacyArgs |
net472 | 266μs | 252ns | 977ns | 0 | 0 | 0 | 2.16 KB |
| #7787 | EncodeArgs |
net6.0 | 76.8μs | 174ns | 675ns | 0 | 0 | 0 | 32.4 KB |
| #7787 | EncodeArgs |
netcoreapp3.1 | 97.1μs | 138ns | 536ns | 0 | 0 | 0 | 32.4 KB |
| #7787 | EncodeArgs |
net472 | 112μs | 23.3ns | 90.2ns | 5.02 | 0 | 0 | 32.5 KB |
| #7787 | EncodeLegacyArgs |
net6.0 | 146μs | 77.9ns | 291ns | 0 | 0 | 0 | 2.15 KB |
| #7787 | EncodeLegacyArgs |
netcoreapp3.1 | 201μs | 264ns | 1.02μs | 0 | 0 | 0 | 2.14 KB |
| #7787 | EncodeLegacyArgs |
net472 | 262μs | 109ns | 422ns | 0 | 0 | 0 | 2.16 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 | 405μs | 64.5ns | 250ns | 0 | 0 | 0 | 4.55 KB |
| master | RunWafRealisticBenchmark |
netcoreapp3.1 | 853μs | 4.76μs | 33.3μs | 0 | 0 | 0 | 4.48 KB |
| master | RunWafRealisticBenchmark |
net472 | 433μs | 76.8ns | 287ns | 0 | 0 | 0 | 4.66 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net6.0 | 289μs | 42.5ns | 159ns | 0 | 0 | 0 | 2.24 KB |
| master | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 298μs | 190ns | 686ns | 0 | 0 | 0 | 2.22 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net472 | 311μs | 40.6ns | 152ns | 0 | 0 | 0 | 2.29 KB |
| #7787 | RunWafRealisticBenchmark |
net6.0 | 394μs | 103ns | 371ns | 0 | 0 | 0 | 4.55 KB |
| #7787 | RunWafRealisticBenchmark |
netcoreapp3.1 | 843μs | 4.36μs | 23.1μs | 0 | 0 | 0 | 4.48 KB |
| #7787 | RunWafRealisticBenchmark |
net472 | 435μs | 62ns | 240ns | 0 | 0 | 0 | 4.66 KB |
| #7787 | RunWafRealisticBenchmarkWithAttack |
net6.0 | 286μs | 56.6ns | 219ns | 0 | 0 | 0 | 2.24 KB |
| #7787 | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 296μs | 61.3ns | 221ns | 0 | 0 | 0 | 2.22 KB |
| #7787 | RunWafRealisticBenchmarkWithAttack |
net472 | 312μs | 25.7ns | 96.1ns | 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 | 60.9μs | 74.4ns | 258ns | 0 | 0 | 0 | 14.52 KB |
| master | SendRequest |
netcoreapp3.1 | 72.1μs | 107ns | 401ns | 0 | 0 | 0 | 17.42 KB |
| master | SendRequest |
net472 | 0.00304ns | 0.00142ns | 0.00549ns | 0 | 0 | 0 | 0 b |
| #7787 | SendRequest |
net6.0 | 61.5μs | 73.8ns | 276ns | 0 | 0 | 0 | 14.52 KB |
| #7787 | SendRequest |
netcoreapp3.1 | 72.4μs | 65.7ns | 237ns | 0 | 0 | 0 | 17.42 KB |
| #7787 | SendRequest |
net472 | 0.00419ns | 0.00174ns | 0.00675ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CharSliceBenchmark - Same speed ✔️ Fewer allocations 🎉
Fewer allocations 🎉 in #7787
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0
5 B
4 B
-1 B
-20.00%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net472
73 B
0 b
-73 B
-100.00%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472
47 B
0 b
-47 B
-100.00%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0 | 5 B | 4 B | -1 B | -20.00% |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net472 | 73 B | 0 b | -73 B | -100.00% |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472 | 47 B | 0 b | -47 B | -100.00% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | OriginalCharSlice |
net6.0 | 1.91ms | 663ns | 2.39μs | 0 | 0 | 0 | 640.01 KB |
| master | OriginalCharSlice |
netcoreapp3.1 | 2.13ms | 7.29μs | 28.2μs | 0 | 0 | 0 | 640 KB |
| master | OriginalCharSlice |
net472 | 2.55ms | 213ns | 767ns | 100 | 0 | 0 | 641.95 KB |
| master | OptimizedCharSlice |
net6.0 | 1.41ms | 654ns | 2.53μs | 0 | 0 | 0 | 7 B |
| master | OptimizedCharSlice |
netcoreapp3.1 | 1.71ms | 524ns | 2.03μs | 0 | 0 | 0 | 1 B |
| master | OptimizedCharSlice |
net472 | 1.99ms | 329ns | 1.28μs | 0 | 0 | 0 | 73 B |
| master | OptimizedCharSliceWithPool |
net6.0 | 836μs | 24.4ns | 94.4ns | 0 | 0 | 0 | 5 B |
| master | OptimizedCharSliceWithPool |
netcoreapp3.1 | 874μs | 86.8ns | 325ns | 0 | 0 | 0 | 1 B |
| master | OptimizedCharSliceWithPool |
net472 | 1.13ms | 76.2ns | 295ns | 0 | 0 | 0 | 47 B |
| #7787 | OriginalCharSlice |
net6.0 | 1.93ms | 223ns | 803ns | 0 | 0 | 0 | 640.01 KB |
| #7787 | OriginalCharSlice |
netcoreapp3.1 | 2.15ms | 9.02μs | 33.8μs | 0 | 0 | 0 | 640 KB |
| #7787 | OriginalCharSlice |
net472 | 2.74ms | 405ns | 1.52μs | 100 | 0 | 0 | 641.95 KB |
| #7787 | OptimizedCharSlice |
net6.0 | 1.44ms | 126ns | 487ns | 0 | 0 | 0 | 7 B |
| #7787 | OptimizedCharSlice |
netcoreapp3.1 | 1.77ms | 813ns | 3.15μs | 0 | 0 | 0 | 1 B |
| #7787 | OptimizedCharSlice |
net472 | 1.97ms | 258ns | 997ns | 0 | 0 | 0 | 0 b |
| #7787 | OptimizedCharSliceWithPool |
net6.0 | 802μs | 48.4ns | 188ns | 0 | 0 | 0 | 4 B |
| #7787 | OptimizedCharSliceWithPool |
netcoreapp3.1 | 917μs | 115ns | 446ns | 0 | 0 | 0 | 1 B |
| #7787 | OptimizedCharSliceWithPool |
net472 | 1.16ms | 150ns | 582ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Slower ⚠️ More allocations ⚠️
Slower ⚠️ in #7787
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1
1.155
685,849.52
792,197.32
More allocations ⚠️ in #7787
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1
42.07 KB
42.8 KB
728 B
1.73%
Fewer allocations 🎉 in #7787
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0
42.64 KB
42.35 KB
-292 B
-0.68%
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 | 1.155 | 685,849.52 | 792,197.32 |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 | 42.07 KB | 42.8 KB | 728 B | 1.73% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 | 42.64 KB | 42.35 KB | -292 B | -0.68% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 719μs | 1.18μs | 4.56μs | 0 | 0 | 0 | 42.64 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 686μs | 690ns | 2.67μs | 0 | 0 | 0 | 42.07 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 868μs | 3.28μs | 12.7μs | 8.33 | 0 | 0 | 56.12 KB |
| #7787 | WriteAndFlushEnrichedTraces |
net6.0 | 686μs | 3.97μs | 34.4μs | 0 | 0 | 0 | 42.35 KB |
| #7787 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 789μs | 3.53μs | 15.4μs | 0 | 0 | 0 | 42.8 KB |
| #7787 | WriteAndFlushEnrichedTraces |
net472 | 829μs | 1.75μs | 6.56μs | 7.81 | 0 | 0 | 56.19 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.97μs | 9.76ns | 44.7ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
netcoreapp3.1 | 2.83μs | 2.07ns | 7.75ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
net472 | 2.97μs | 3.88ns | 15ns | 0.149 | 0.0149 | 0 | 987 B |
| #7787 | ExecuteNonQuery |
net6.0 | 1.98μs | 3.76ns | 14.6ns | 0 | 0 | 0 | 1.02 KB |
| #7787 | ExecuteNonQuery |
netcoreapp3.1 | 2.62μs | 2.6ns | 10.1ns | 0 | 0 | 0 | 1.02 KB |
| #7787 | ExecuteNonQuery |
net472 | 2.87μs | 3.35ns | 13ns | 0.143 | 0.0143 | 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.69μs | 8.77ns | 41.2ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
netcoreapp3.1 | 2.3μs | 11.2ns | 44.9ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
net472 | 3.61μs | 3.31ns | 12.4ns | 0.163 | 0 | 0 | 1.04 KB |
| master | CallElasticsearchAsync |
net6.0 | 1.92μs | 7.02ns | 27.2ns | 0 | 0 | 0 | 1.01 KB |
| master | CallElasticsearchAsync |
netcoreapp3.1 | 2.37μs | 11.7ns | 49.4ns | 0 | 0 | 0 | 1.08 KB |
| master | CallElasticsearchAsync |
net472 | 3.66μs | 2.24ns | 8.66ns | 0.165 | 0 | 0 | 1.1 KB |
| #7787 | CallElasticsearch |
net6.0 | 1.67μs | 8.36ns | 39.2ns | 0 | 0 | 0 | 1.03 KB |
| #7787 | CallElasticsearch |
netcoreapp3.1 | 2.14μs | 11ns | 52.8ns | 0 | 0 | 0 | 1.03 KB |
| #7787 | CallElasticsearch |
net472 | 3.54μs | 4.51ns | 17.5ns | 0.158 | 0 | 0 | 1.04 KB |
| #7787 | CallElasticsearchAsync |
net6.0 | 1.87μs | 2.96ns | 11.1ns | 0 | 0 | 0 | 1.01 KB |
| #7787 | CallElasticsearchAsync |
netcoreapp3.1 | 2.44μs | 11.4ns | 42.7ns | 0 | 0 | 0 | 1.08 KB |
| #7787 | CallElasticsearchAsync |
net472 | 3.62μs | 7.92ns | 30.7ns | 0.161 | 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 | 9.31ns | 40.6ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
netcoreapp3.1 | 2.42μs | 5.75ns | 22.3ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
net472 | 2.57μs | 1.17ns | 4.39ns | 0.141 | 0 | 0 | 915 B |
| #7787 | ExecuteAsync |
net6.0 | 1.86μs | 9.63ns | 44.2ns | 0 | 0 | 0 | 953 B |
| #7787 | ExecuteAsync |
netcoreapp3.1 | 2.46μs | 12.6ns | 57.5ns | 0 | 0 | 0 | 952 B |
| #7787 | ExecuteAsync |
net472 | 2.54μs | 1.2ns | 4.34ns | 0.14 | 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.68μs | 5.51ns | 20.6ns | 0 | 0 | 0 | 2.36 KB |
| master | SendAsync |
netcoreapp3.1 | 8.87μs | 7ns | 26.2ns | 0 | 0 | 0 | 2.9 KB |
| master | SendAsync |
net472 | 12.2μs | 11.8ns | 45.8ns | 0.486 | 0 | 0 | 3.18 KB |
| #7787 | SendAsync |
net6.0 | 6.9μs | 11.9ns | 46ns | 0 | 0 | 0 | 2.36 KB |
| #7787 | SendAsync |
netcoreapp3.1 | 8.64μs | 4.36ns | 16.3ns | 0 | 0 | 0 | 2.9 KB |
| #7787 | SendAsync |
net472 | 12.5μs | 15.2ns | 58.9ns | 0.499 | 0 | 0 | 3.18 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7787
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.StringConcatAspectBenchmark‑net6.0
274.03 KB
276.72 KB
2.69 KB
0.98%
Fewer allocations 🎉 in #7787
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
259.17 KB
256.49 KB
-2.68 KB
-1.03%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0
46.5 KB
44.03 KB
-2.46 KB
-5.30%
| 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.StringConcatAspectBenchmark‑net6.0 | 274.03 KB | 276.72 KB | 2.69 KB | 0.98% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 | 259.17 KB | 256.49 KB | -2.68 KB | -1.03% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 | 46.5 KB | 44.03 KB | -2.46 KB | -5.30% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StringConcatBenchmark |
net6.0 | 46.3μs | 272ns | 2.19μs | 0 | 0 | 0 | 46.5 KB |
| master | StringConcatBenchmark |
netcoreapp3.1 | 51μs | 298ns | 2.58μs | 0 | 0 | 0 | 42.67 KB |
| master | StringConcatBenchmark |
net472 | 57.2μs | 118ns | 426ns | 0 | 0 | 0 | 57.34 KB |
| master | StringConcatAspectBenchmark |
net6.0 | 478μs | 1.69μs | 6.08μs | 0 | 0 | 0 | 274.03 KB |
| master | StringConcatAspectBenchmark |
netcoreapp3.1 | 519μs | 2.53μs | 10.4μs | 0 | 0 | 0 | 259.17 KB |
| master | StringConcatAspectBenchmark |
net472 | 405μs | 2.1μs | 12.1μs | 0 | 0 | 0 | 278.53 KB |
| #7787 | StringConcatBenchmark |
net6.0 | 45.3μs | 258ns | 1.88μs | 0 | 0 | 0 | 44.03 KB |
| #7787 | StringConcatBenchmark |
netcoreapp3.1 | 47.8μs | 263ns | 2.23μs | 0 | 0 | 0 | 42.67 KB |
| #7787 | StringConcatBenchmark |
net472 | 57.6μs | 159ns | 551ns | 0 | 0 | 0 | 65.54 KB |
| #7787 | StringConcatAspectBenchmark |
net6.0 | 471μs | 2.24μs | 9.22μs | 0 | 0 | 0 | 276.72 KB |
| #7787 | StringConcatAspectBenchmark |
netcoreapp3.1 | 521μs | 2.61μs | 11.7μs | 0 | 0 | 0 | 256.49 KB |
| #7787 | StringConcatAspectBenchmark |
net472 | 409μs | 2.25μ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.68μs | 14ns | 68.5ns | 0 | 0 | 0 | 1.71 KB |
| master | EnrichedLog |
netcoreapp3.1 | 3.63μs | 17.7ns | 73.1ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
net472 | 4.04μs | 6.46ns | 25ns | 0.243 | 0 | 0 | 1.64 KB |
| #7787 | EnrichedLog |
net6.0 | 2.61μs | 13.9ns | 73.6ns | 0 | 0 | 0 | 1.7 KB |
| #7787 | EnrichedLog |
netcoreapp3.1 | 3.68μs | 16.1ns | 62.2ns | 0 | 0 | 0 | 1.7 KB |
| #7787 | EnrichedLog |
net472 | 3.87μs | 5.82ns | 22.6ns | 0.25 | 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 | 122μs | 25.6ns | 99ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
netcoreapp3.1 | 127μs | 55.3ns | 207ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
net472 | 169μs | 93.2ns | 361ns | 0 | 0 | 0 | 4.52 KB |
| #7787 | EnrichedLog |
net6.0 | 123μs | 120ns | 451ns | 0 | 0 | 0 | 4.31 KB |
| #7787 | EnrichedLog |
netcoreapp3.1 | 127μs | 232ns | 835ns | 0 | 0 | 0 | 4.31 KB |
| #7787 | EnrichedLog |
net472 | 171μs | 616ns | 2.39μ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 | 4.99μs | 5.31ns | 20.6ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
netcoreapp3.1 | 6.91μs | 21.9ns | 84.7ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
net472 | 7.54μs | 5.77ns | 22.3ns | 0.301 | 0 | 0 | 2.08 KB |
| #7787 | EnrichedLog |
net6.0 | 5.19μs | 14.9ns | 57.7ns | 0 | 0 | 0 | 2.26 KB |
| #7787 | EnrichedLog |
netcoreapp3.1 | 7.18μs | 26.5ns | 103ns | 0 | 0 | 0 | 2.26 KB |
| #7787 | EnrichedLog |
net472 | 7.68μs | 5.33ns | 20.6ns | 0.306 | 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.02μs | 10.1ns | 42.7ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
netcoreapp3.1 | 2.57μs | 10.5ns | 40.6ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
net472 | 3.11μs | 2.87ns | 10.7ns | 0.186 | 0 | 0 | 1.2 KB |
| #7787 | SendReceive |
net6.0 | 2.03μs | 1.55ns | 5.8ns | 0 | 0 | 0 | 1.2 KB |
| #7787 | SendReceive |
netcoreapp3.1 | 2.63μs | 13ns | 50.2ns | 0 | 0 | 0 | 1.2 KB |
| #7787 | SendReceive |
net472 | 3.02μs | 2.39ns | 9.27ns | 0.181 | 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.24μs | 2.59ns | 10ns | 0 | 0 | 0 | 1.58 KB |
| master | EnrichedLog |
netcoreapp3.1 | 5.81μs | 9.17ns | 35.5ns | 0 | 0 | 0 | 1.63 KB |
| master | EnrichedLog |
net472 | 6.65μs | 5.37ns | 20.8ns | 0.3 | 0 | 0 | 2.03 KB |
| #7787 | EnrichedLog |
net6.0 | 4.29μs | 13.5ns | 52.1ns | 0 | 0 | 0 | 1.58 KB |
| #7787 | EnrichedLog |
netcoreapp3.1 | 5.59μs | 18.4ns | 71.4ns | 0 | 0 | 0 | 1.63 KB |
| #7787 | EnrichedLog |
net472 | 6.65μs | 7.34ns | 28.4ns | 0.297 | 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 | 783ns | 3.95ns | 17.7ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
netcoreapp3.1 | 966ns | 0.247ns | 0.923ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
net472 | 951ns | 0.536ns | 2.08ns | 0.0906 | 0 | 0 | 578 B |
| master | StartFinishScope |
net6.0 | 932ns | 4.48ns | 17.9ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
netcoreapp3.1 | 1.19μs | 6.04ns | 26.3ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
net472 | 1.12μs | 0.556ns | 2.15ns | 0.101 | 0 | 0 | 658 B |
| #7787 | StartFinishSpan |
net6.0 | 775ns | 3.7ns | 14.3ns | 0 | 0 | 0 | 576 B |
| #7787 | StartFinishSpan |
netcoreapp3.1 | 976ns | 4.72ns | 20.6ns | 0 | 0 | 0 | 576 B |
| #7787 | StartFinishSpan |
net472 | 961ns | 1.57ns | 6.07ns | 0.0909 | 0 | 0 | 578 B |
| #7787 | StartFinishScope |
net6.0 | 929ns | 4.55ns | 19.8ns | 0 | 0 | 0 | 696 B |
| #7787 | StartFinishScope |
netcoreapp3.1 | 1.23μs | 5.96ns | 26ns | 0 | 0 | 0 | 696 B |
| #7787 | StartFinishScope |
net472 | 1.14μs | 0.325ns | 1.26ns | 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.07μs | 5.52ns | 27.6ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
netcoreapp3.1 | 1.43μs | 6.69ns | 25.9ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
net472 | 1.45μs | 1.29ns | 5.01ns | 0.101 | 0 | 0 | 658 B |
| #7787 | RunOnMethodBegin |
net6.0 | 1.07μs | 0.403ns | 1.51ns | 0 | 0 | 0 | 696 B |
| #7787 | RunOnMethodBegin |
netcoreapp3.1 | 1.41μs | 7.1ns | 30.1ns | 0 | 0 | 0 | 696 B |
| #7787 | RunOnMethodBegin |
net472 | 1.44μs | 0.544ns | 2.04ns | 0.1 | 0 | 0 | 658 B |
d7a6df3 to
3c51752
Compare
3238dc9 to
1c911e2
Compare
lucaspimentel
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.
## Summary of changes - Remove `[PublicApi]` usages that aren't necessary any more - Rename `DebugEnabledInternal` => `DebugEnabled` - Delete some "public" methods that aren't, and are no longer necessary (as they're unused) ## Reason for change Cleaning up ## Implementation details Mostly <kbd>del</kbd> ## Test coverage Covered by existing ## Other details Part of a stack - #7786 👈 - #7787 - #7788
These just take up space and aren't ever called, so aren't useful
3c51752 to
6e3d383
Compare
## Summary of changes Repurposes the now-defunct `PublicApiAnalyzer` to an `InternalForTestingAnalyzer` ## Reason for change We have various methods in `Datadog.Trace` that should never be called by production code, and are only exposed to make testing functionality easier. Currently we rely on method names and comments to avoid this. With this change, we can add an attribute instead, and using the method from Datadog.Trace etc becomes a build error. ## Implementation details - Basically just renamed `PublicApi*` -> `InternalForTesting*` - Decorated methods that were currently relying on comments/naming to avoid being called ## Test coverage Refactored the analyzer tests, so should still be covered the same ## Other details Note that there are a bunch of comments for methods `// internal for testing` which are a bit different. In those cases, we _do_ call it in Datadog.Trace, the comment is just explaining why the method isn't `private`. Those remain as-is, this attribute is purely if you have a "don't call this method in production code, use that other one instead" method 😄 Part of a stack - #7786 - #7787 - #7788 👈

Summary of changes
Deletes a bunch of enum members from
PublicApiUsagewhich are unusedReason for change
These were unused or couldn't logically be called in production code, so were just adding overhead as we allocate the array to record them.
Fixed one case where we Should have been recording it, but weren't
Implementation details
FindAllReferences on each member => if it's not used in Datadog.Trace, remove it
Test coverage
Covered by existing
Other details
Part of a stack
[PublicApi]usages and unused code #7786PublicApiUsagemembers #7787 👈PublicApiAnalyzerasInternalForTestingAnalyzer#7788