-
Notifications
You must be signed in to change notification settings - Fork 150
Repurpose PublicApiAnalyzer as InternalForTestingAnalyzer
#7788
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
This comment has been minimized.
This comment has been minimized.
313bd46 to
8cc08a8
Compare
2f81847 to
d7a6df3
Compare
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (7788) 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 (7788) - mean (75ms) : 70, 79
master - mean (76ms) : 72, 81
section Bailout
This PR (7788) - mean (80ms) : 75, 85
master - mean (81ms) : 77, 86
section CallTarget+Inlining+NGEN
This PR (7788) - mean (1,105ms) : 1029, 1180
master - mean (1,124ms) : 1038, 1210
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 (7788) - mean (118ms) : 112, 124
master - mean (120ms) : 112, 128
section Bailout
This PR (7788) - mean (119ms) : 113, 125
master - mean (120ms) : 112, 128
section CallTarget+Inlining+NGEN
This PR (7788) - mean (804ms) : 761, 848
master - mean (816ms) : 782, 849
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7788) - mean (104ms) : 99, 110
master - mean (105ms) : 100, 110
section Bailout
This PR (7788) - mean (104ms) : 99, 109
master - mean (107ms) : 101, 112
section CallTarget+Inlining+NGEN
This PR (7788) - mean (748ms) : 710, 787
master - mean (764ms) : 710, 819
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7788) - mean (102ms) : 96, 108
master - mean (103ms) : 98, 108
section Bailout
This PR (7788) - mean (105ms) : 98, 111
master - mean (105ms) : 100, 110
section CallTarget+Inlining+NGEN
This PR (7788) - mean (715ms) : 674, 756
master - mean (720ms) : 693, 747
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 (7788) - mean (192ms) : 190, 195
master - mean (193ms) : 189, 197
section Bailout
This PR (7788) - mean (196ms) : 194, 198
master - mean (196ms) : 193, 200
section CallTarget+Inlining+NGEN
This PR (7788) - mean (1,165ms) : 1101, 1228
master - mean (1,171ms) : 1093, 1249
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 (7788) - mean (277ms) : 271, 283
master - mean (277ms) : 272, 283
section Bailout
This PR (7788) - mean (277ms) : 272, 282
master - mean (277ms) : 274, 280
section CallTarget+Inlining+NGEN
This PR (7788) - mean (948ms) : 906, 991
master - mean (948ms) : 905, 991
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7788) - mean (269ms) : 264, 273
master - mean (269ms) : 264, 275
section Bailout
This PR (7788) - mean (272ms) : 261, 282
master - mean (269ms) : 266, 272
section CallTarget+Inlining+NGEN
This PR (7788) - mean (937ms) : 891, 982
master - mean (928ms) : 884, 973
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7788) - mean (274ms) : 264, 284
master - mean (270ms) : 263, 276
section Bailout
This PR (7788) - mean (275ms) : 267, 282
master - mean (269ms) : 266, 273
section CallTarget+Inlining+NGEN
This PR (7788) - mean (854ms) : 825, 883
master - mean (856ms) : 837, 874
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
BenchmarksBenchmarks Report for benchmark platform 🐌Benchmarks for #7788 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.06 KB | 6.14 KB | 83 B | 1.37% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StartStopWithChild |
net6.0 | 10.5μs | 59.9ns | 436ns | 0 | 0 | 0 | 5.49 KB |
| master | StartStopWithChild |
netcoreapp3.1 | 13.3μs | 71.8ns | 400ns | 0 | 0 | 0 | 5.72 KB |
| master | StartStopWithChild |
net472 | 21.9μs | 123ns | 881ns | 0.896 | 0.224 | 0 | 6.06 KB |
| #7788 | StartStopWithChild |
net6.0 | 10.8μs | 46.1ns | 178ns | 0 | 0 | 0 | 5.5 KB |
| #7788 | StartStopWithChild |
netcoreapp3.1 | 13.4μs | 65.9ns | 280ns | 0 | 0 | 0 | 5.71 KB |
| #7788 | StartStopWithChild |
net472 | 21.9μs | 121ns | 781ns | 0.972 | 0.216 | 0 | 6.14 KB |
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 935μs | 181ns | 700ns | 0 | 0 | 0 | 2.71 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.03ms | 187ns | 723ns | 0 | 0 | 0 | 2.7 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 1.23ms | 555ns | 2.15μs | 0 | 0 | 0 | 3.31 KB |
| #7788 | WriteAndFlushEnrichedTraces |
net6.0 | 928μs | 127ns | 475ns | 0 | 0 | 0 | 2.71 KB |
| #7788 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.05ms | 237ns | 916ns | 0 | 0 | 0 | 2.7 KB |
| #7788 | WriteAndFlushEnrichedTraces |
net472 | 1.22ms | 1.85μs | 7.15μs | 0 | 0 | 0 | 3.31 KB |
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | AllCycleSimpleBody |
net6.0 | 1.04μs | 6.12ns | 60ns | 0 | 0 | 0 | 1.22 KB |
| master | AllCycleSimpleBody |
netcoreapp3.1 | 1.44μs | 5.74ns | 21.5ns | 0 | 0 | 0 | 1.2 KB |
| master | AllCycleSimpleBody |
net472 | 1.03μs | 0.321ns | 1.2ns | 0.192 | 0 | 0 | 1.23 KB |
| master | AllCycleMoreComplexBody |
net6.0 | 7.14μs | 34.9ns | 156ns | 0 | 0 | 0 | 4.72 KB |
| master | AllCycleMoreComplexBody |
netcoreapp3.1 | 8.93μs | 41.4ns | 166ns | 0 | 0 | 0 | 4.62 KB |
| master | AllCycleMoreComplexBody |
net472 | 7.62μs | 3.99ns | 14.9ns | 0.725 | 0 | 0 | 4.74 KB |
| master | ObjectExtractorSimpleBody |
net6.0 | 324ns | 1.62ns | 7.24ns | 0 | 0 | 0 | 280 B |
| master | ObjectExtractorSimpleBody |
netcoreapp3.1 | 395ns | 2.17ns | 13.4ns | 0 | 0 | 0 | 272 B |
| master | ObjectExtractorSimpleBody |
net472 | 299ns | 0.0309ns | 0.116ns | 0.0437 | 0 | 0 | 281 B |
| master | ObjectExtractorMoreComplexBody |
net6.0 | 6.31μs | 33ns | 165ns | 0 | 0 | 0 | 3.78 KB |
| master | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.86μs | 37.3ns | 149ns | 0 | 0 | 0 | 3.69 KB |
| master | ObjectExtractorMoreComplexBody |
net472 | 6.75μs | 4.57ns | 17.7ns | 0.576 | 0 | 0 | 3.8 KB |
| #7788 | AllCycleSimpleBody |
net6.0 | 1.06μs | 5.92ns | 37.5ns | 0 | 0 | 0 | 1.22 KB |
| #7788 | AllCycleSimpleBody |
netcoreapp3.1 | 1.4μs | 6.91ns | 30.1ns | 0 | 0 | 0 | 1.2 KB |
| #7788 | AllCycleSimpleBody |
net472 | 1.03μs | 1.16ns | 4.5ns | 0.19 | 0 | 0 | 1.23 KB |
| #7788 | AllCycleMoreComplexBody |
net6.0 | 7.16μs | 38.9ns | 217ns | 0 | 0 | 0 | 4.72 KB |
| #7788 | AllCycleMoreComplexBody |
netcoreapp3.1 | 9.15μs | 44.5ns | 189ns | 0 | 0 | 0 | 4.62 KB |
| #7788 | AllCycleMoreComplexBody |
net472 | 7.61μs | 2.7ns | 10.5ns | 0.727 | 0 | 0 | 4.74 KB |
| #7788 | ObjectExtractorSimpleBody |
net6.0 | 321ns | 0.0909ns | 0.34ns | 0 | 0 | 0 | 280 B |
| #7788 | ObjectExtractorSimpleBody |
netcoreapp3.1 | 405ns | 2.03ns | 9.07ns | 0 | 0 | 0 | 272 B |
| #7788 | ObjectExtractorSimpleBody |
net472 | 300ns | 0.0341ns | 0.128ns | 0.0434 | 0 | 0 | 281 B |
| #7788 | ObjectExtractorMoreComplexBody |
net6.0 | 6.35μs | 30.4ns | 129ns | 0 | 0 | 0 | 3.78 KB |
| #7788 | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.92μs | 26.2ns | 98.1ns | 0 | 0 | 0 | 3.69 KB |
| #7788 | ObjectExtractorMoreComplexBody |
net472 | 6.69μs | 5.91ns | 22.9ns | 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 | 76.1μs | 299ns | 1.12μs | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
netcoreapp3.1 | 98.3μs | 218ns | 843ns | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
net472 | 110μs | 166ns | 643ns | 4.98 | 0 | 0 | 32.51 KB |
| master | EncodeLegacyArgs |
net6.0 | 148μs | 41ns | 153ns | 0 | 0 | 0 | 2.15 KB |
| master | EncodeLegacyArgs |
netcoreapp3.1 | 196μs | 70.2ns | 272ns | 0 | 0 | 0 | 2.14 KB |
| master | EncodeLegacyArgs |
net472 | 264μs | 86.7ns | 336ns | 0 | 0 | 0 | 2.16 KB |
| #7788 | EncodeArgs |
net6.0 | 79.3μs | 117ns | 452ns | 0 | 0 | 0 | 32.4 KB |
| #7788 | EncodeArgs |
netcoreapp3.1 | 98.6μs | 226ns | 877ns | 0 | 0 | 0 | 32.4 KB |
| #7788 | EncodeArgs |
net472 | 112μs | 33.2ns | 124ns | 5.04 | 0 | 0 | 32.51 KB |
| #7788 | EncodeLegacyArgs |
net6.0 | 148μs | 71.4ns | 277ns | 0 | 0 | 0 | 2.15 KB |
| #7788 | EncodeLegacyArgs |
netcoreapp3.1 | 197μs | 90.3ns | 313ns | 0 | 0 | 0 | 2.14 KB |
| #7788 | EncodeLegacyArgs |
net472 | 264μs | 43.7ns | 158ns | 0 | 0 | 0 | 2.16 KB |
Benchmarks.Trace.Asm.AppSecWafBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #7788
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1
2.348
307,801.09
722,772.25
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1 | 2.348 | 307,801.09 | 722,772.25 |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | RunWafRealisticBenchmark |
net6.0 | 407μs | 159ns | 616ns | 0 | 0 | 0 | 4.55 KB |
| master | RunWafRealisticBenchmark |
netcoreapp3.1 | 836μs | 13μs | 128μs | 0 | 0 | 0 | 4.48 KB |
| master | RunWafRealisticBenchmark |
net472 | 446μs | 57.8ns | 224ns | 0 | 0 | 0 | 4.66 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net6.0 | 296μs | 33.8ns | 126ns | 0 | 0 | 0 | 2.24 KB |
| master | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 308μs | 189ns | 732ns | 0 | 0 | 0 | 2.22 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net472 | 331μs | 42.5ns | 165ns | 0 | 0 | 0 | 2.29 KB |
| #7788 | RunWafRealisticBenchmark |
net6.0 | 395μs | 110ns | 425ns | 0 | 0 | 0 | 4.55 KB |
| #7788 | RunWafRealisticBenchmark |
netcoreapp3.1 | 831μs | 9.8μs | 97.5μs | 0 | 0 | 0 | 4.48 KB |
| #7788 | RunWafRealisticBenchmark |
net472 | 431μs | 78.6ns | 304ns | 0 | 0 | 0 | 4.66 KB |
| #7788 | RunWafRealisticBenchmarkWithAttack |
net6.0 | 289μs | 169ns | 654ns | 0 | 0 | 0 | 2.24 KB |
| #7788 | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 713μs | 4.96μs | 49.6μs | 0 | 0 | 0 | 2.22 KB |
| #7788 | RunWafRealisticBenchmarkWithAttack |
net472 | 308μs | 37.7ns | 146ns | 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.8μs | 38.7ns | 145ns | 0 | 0 | 0 | 14.52 KB |
| master | SendRequest |
netcoreapp3.1 | 72.6μs | 239ns | 861ns | 0 | 0 | 0 | 17.42 KB |
| master | SendRequest |
net472 | 0.00857ns | 0.00228ns | 0.00882ns | 0 | 0 | 0 | 0 b |
| #7788 | SendRequest |
net6.0 | 60.8μs | 39.3ns | 147ns | 0 | 0 | 0 | 14.52 KB |
| #7788 | SendRequest |
netcoreapp3.1 | 71.5μs | 195ns | 729ns | 0 | 0 | 0 | 17.42 KB |
| #7788 | SendRequest |
net472 | 0.0102ns | 0.00222ns | 0.00859ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CharSliceBenchmark - Slower ⚠️ More allocations ⚠️
Slower ⚠️ in #7788
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑netcoreapp3.1
1.117
1,664,870.00
1,859,873.75
More allocations ⚠️ in #7788
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net472
0 b
73 B
73 B
∞
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472
0 b
48 B
48 B
∞
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0
3 B
5 B
2 B
66.67%
Fewer allocations 🎉 in #7788
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1
1 B
0 b
-1 B
-100.00%
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑netcoreapp3.1 | 1.117 | 1,664,870.00 | 1,859,873.75 |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net472 | 0 b | 73 B | 73 B | ∞ |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472 | 0 b | 48 B | 48 B | ∞ |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0 | 3 B | 5 B | 2 B | 66.67% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1 | 1 B | 0 b | -1 B | -100.00% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | OriginalCharSlice |
net6.0 | 1.93ms | 955ns | 3.57μs | 0 | 0 | 0 | 640.01 KB |
| master | OriginalCharSlice |
netcoreapp3.1 | 2.12ms | 6.81μs | 25.5μs | 0 | 0 | 0 | 640 KB |
| master | OriginalCharSlice |
net472 | 2.62ms | 385ns | 1.44μs | 100 | 0 | 0 | 641.95 KB |
| master | OptimizedCharSlice |
net6.0 | 1.39ms | 160ns | 599ns | 0 | 0 | 0 | 7 B |
| master | OptimizedCharSlice |
netcoreapp3.1 | 1.67ms | 396ns | 1.53μs | 0 | 0 | 0 | 1 B |
| master | OptimizedCharSlice |
net472 | 1.96ms | 219ns | 848ns | 0 | 0 | 0 | 0 b |
| master | OptimizedCharSliceWithPool |
net6.0 | 809μs | 32.2ns | 125ns | 0 | 0 | 0 | 3 B |
| master | OptimizedCharSliceWithPool |
netcoreapp3.1 | 804μs | 280ns | 1.05μs | 0 | 0 | 0 | 1 B |
| master | OptimizedCharSliceWithPool |
net472 | 1.17ms | 75.7ns | 283ns | 0 | 0 | 0 | 0 b |
| #7788 | OriginalCharSlice |
net6.0 | 1.94ms | 346ns | 1.29μs | 0 | 0 | 0 | 640.01 KB |
| #7788 | OriginalCharSlice |
netcoreapp3.1 | 2.27ms | 5.03μs | 19.5μs | 0 | 0 | 0 | 640 KB |
| #7788 | OriginalCharSlice |
net472 | 2.57ms | 155ns | 601ns | 100 | 0 | 0 | 641.95 KB |
| #7788 | OptimizedCharSlice |
net6.0 | 1.51ms | 388ns | 1.5μs | 0 | 0 | 0 | 7 B |
| #7788 | OptimizedCharSlice |
netcoreapp3.1 | 1.82ms | 10.4μs | 79.2μs | 0 | 0 | 0 | 1 B |
| #7788 | OptimizedCharSlice |
net472 | 2.06ms | 220ns | 851ns | 0 | 0 | 0 | 73 B |
| #7788 | OptimizedCharSliceWithPool |
net6.0 | 855μs | 77ns | 288ns | 0 | 0 | 0 | 5 B |
| #7788 | OptimizedCharSliceWithPool |
netcoreapp3.1 | 797μs | 113ns | 438ns | 0 | 0 | 0 | 0 b |
| #7788 | OptimizedCharSliceWithPool |
net472 | 1.15ms | 157ns | 608ns | 0 | 0 | 0 | 48 B |
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Fewer allocations 🎉
Fewer allocations 🎉 in #7788
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472
56.56 KB
56.01 KB
-547 B
-0.97%
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0
42.22 KB
41.75 KB
-470 B
-1.11%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 | 56.56 KB | 56.01 KB | -547 B | -0.97% |
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 | 42.22 KB | 41.75 KB | -470 B | -1.11% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 709μs | 2.9μs | 11.2μs | 0 | 0 | 0 | 42.22 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 748μs | 1.59μs | 6.94μs | 0 | 0 | 0 | 41.75 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 875μs | 4.4μs | 18.7μs | 8.33 | 0 | 0 | 56.56 KB |
| #7788 | WriteAndFlushEnrichedTraces |
net6.0 | 752μs | 4.26μs | 28.9μs | 0 | 0 | 0 | 41.75 KB |
| #7788 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 741μs | 3.9μs | 19.5μs | 0 | 0 | 0 | 41.89 KB |
| #7788 | WriteAndFlushEnrichedTraces |
net472 | 862μs | 2.52μs | 9.07μs | 8.33 | 0 | 0 | 56.01 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.92μs | 7.57ns | 30.3ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
netcoreapp3.1 | 2.55μs | 12.4ns | 54ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
net472 | 2.82μs | 4.2ns | 16.3ns | 0.156 | 0.0142 | 0 | 987 B |
| #7788 | ExecuteNonQuery |
net6.0 | 1.87μs | 8.92ns | 36.8ns | 0 | 0 | 0 | 1.02 KB |
| #7788 | ExecuteNonQuery |
netcoreapp3.1 | 2.65μs | 9.56ns | 37ns | 0 | 0 | 0 | 1.02 KB |
| #7788 | ExecuteNonQuery |
net472 | 2.85μs | 2.92ns | 11.3ns | 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.74μs | 4.27ns | 16.5ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
netcoreapp3.1 | 2.24μs | 10.3ns | 40ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
net472 | 3.45μs | 2.8ns | 10.9ns | 0.156 | 0 | 0 | 1.04 KB |
| master | CallElasticsearchAsync |
net6.0 | 1.91μs | 0.697ns | 2.51ns | 0 | 0 | 0 | 1.01 KB |
| master | CallElasticsearchAsync |
netcoreapp3.1 | 2.37μs | 1.02ns | 3.66ns | 0 | 0 | 0 | 1.08 KB |
| master | CallElasticsearchAsync |
net472 | 3.58μs | 1.94ns | 7.28ns | 0.161 | 0 | 0 | 1.1 KB |
| #7788 | CallElasticsearch |
net6.0 | 1.75μs | 0.51ns | 1.77ns | 0 | 0 | 0 | 1.03 KB |
| #7788 | CallElasticsearch |
netcoreapp3.1 | 2.29μs | 8.67ns | 33.6ns | 0 | 0 | 0 | 1.03 KB |
| #7788 | CallElasticsearch |
net472 | 3.45μs | 1.76ns | 6.81ns | 0.158 | 0 | 0 | 1.04 KB |
| #7788 | CallElasticsearchAsync |
net6.0 | 1.81μs | 8.65ns | 34.6ns | 0 | 0 | 0 | 1.01 KB |
| #7788 | CallElasticsearchAsync |
netcoreapp3.1 | 2.54μs | 12.7ns | 53.8ns | 0 | 0 | 0 | 1.08 KB |
| #7788 | CallElasticsearchAsync |
net472 | 3.7μs | 3.53ns | 13.7ns | 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 | 3.2ns | 12.4ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
netcoreapp3.1 | 2.41μs | 7.43ns | 28.8ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
net472 | 2.63μs | 2.03ns | 7.85ns | 0.145 | 0 | 0 | 915 B |
| #7788 | ExecuteAsync |
net6.0 | 1.84μs | 10.1ns | 58.9ns | 0 | 0 | 0 | 952 B |
| #7788 | ExecuteAsync |
netcoreapp3.1 | 2.44μs | 8.32ns | 32.2ns | 0 | 0 | 0 | 952 B |
| #7788 | ExecuteAsync |
net472 | 2.74μs | 1.56ns | 6.03ns | 0.137 | 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.83μs | 15ns | 58.3ns | 0 | 0 | 0 | 2.36 KB |
| master | SendAsync |
netcoreapp3.1 | 8.83μs | 22.7ns | 87.8ns | 0 | 0 | 0 | 2.9 KB |
| master | SendAsync |
net472 | 11.9μs | 10.3ns | 40.1ns | 0.474 | 0 | 0 | 3.18 KB |
| #7788 | SendAsync |
net6.0 | 7.05μs | 10.6ns | 40.9ns | 0 | 0 | 0 | 2.36 KB |
| #7788 | SendAsync |
netcoreapp3.1 | 8.78μs | 26.1ns | 101ns | 0 | 0 | 0 | 2.9 KB |
| #7788 | SendAsync |
net472 | 12.1μs | 10.8ns | 41.8ns | 0.483 | 0 | 0 | 3.18 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7788
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1
42.82 KB
44.46 KB
1.64 KB
3.83%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
273.7 KB
275.91 KB
2.21 KB
0.81%
Fewer allocations 🎉 in #7788
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0
44.14 KB
43.83 KB
-312 B
-0.71%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1 | 42.82 KB | 44.46 KB | 1.64 KB | 3.83% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 | 273.7 KB | 275.91 KB | 2.21 KB | 0.81% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 | 44.14 KB | 43.83 KB | -312 B | -0.71% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StringConcatBenchmark |
net6.0 | 47μs | 358ns | 3.34μs | 0 | 0 | 0 | 44.14 KB |
| master | StringConcatBenchmark |
netcoreapp3.1 | 58.1μs | 952ns | 9.47μs | 0 | 0 | 0 | 42.82 KB |
| master | StringConcatBenchmark |
net472 | 56.3μs | 280ns | 1.25μs | 0 | 0 | 0 | 57.34 KB |
| master | StringConcatAspectBenchmark |
net6.0 | 447μs | 1.25μs | 4.32μs | 0 | 0 | 0 | 256.72 KB |
| master | StringConcatAspectBenchmark |
netcoreapp3.1 | 554μs | 2.63μs | 10.8μs | 0 | 0 | 0 | 273.7 KB |
| master | StringConcatAspectBenchmark |
net472 | 405μs | 2.21μs | 12.1μs | 0 | 0 | 0 | 277.8 KB |
| #7788 | StringConcatBenchmark |
net6.0 | 53.7μs | 852ns | 8.44μs | 0 | 0 | 0 | 43.83 KB |
| #7788 | StringConcatBenchmark |
netcoreapp3.1 | 55.9μs | 649ns | 6.46μs | 0 | 0 | 0 | 44.46 KB |
| #7788 | StringConcatBenchmark |
net472 | 58.2μs | 133ns | 480ns | 0 | 0 | 0 | 57.34 KB |
| #7788 | StringConcatAspectBenchmark |
net6.0 | 461μs | 2.25μs | 9.55μs | 0 | 0 | 0 | 258 KB |
| #7788 | StringConcatAspectBenchmark |
netcoreapp3.1 | 498μs | 1.41μs | 6.62μs | 0 | 0 | 0 | 275.91 KB |
| #7788 | StringConcatAspectBenchmark |
net472 | 407μs | 2.14μs | 10.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.58μs | 13ns | 61.1ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
netcoreapp3.1 | 3.64μs | 17.3ns | 69.3ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
net472 | 3.85μs | 3.18ns | 12.3ns | 0.249 | 0 | 0 | 1.64 KB |
| #7788 | EnrichedLog |
net6.0 | 2.64μs | 1.54ns | 5.95ns | 0 | 0 | 0 | 1.7 KB |
| #7788 | EnrichedLog |
netcoreapp3.1 | 3.56μs | 10.2ns | 39.3ns | 0 | 0 | 0 | 1.7 KB |
| #7788 | EnrichedLog |
net472 | 3.89μs | 6.6ns | 25.6ns | 0.252 | 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 | 131μs | 673ns | 3.16μs | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
netcoreapp3.1 | 141μs | 637ns | 2.47μs | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
net472 | 181μs | 892ns | 3.78μs | 0 | 0 | 0 | 4.52 KB |
| #7788 | EnrichedLog |
net6.0 | 123μs | 65.3ns | 253ns | 0 | 0 | 0 | 4.31 KB |
| #7788 | EnrichedLog |
netcoreapp3.1 | 129μs | 129ns | 481ns | 0 | 0 | 0 | 4.31 KB |
| #7788 | EnrichedLog |
net472 | 170μs | 134ns | 518ns | 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.06μs | 2.6ns | 9.71ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
netcoreapp3.1 | 6.78μs | 6.6ns | 25.5ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
net472 | 7.56μs | 8.06ns | 31.2ns | 0.3 | 0 | 0 | 2.08 KB |
| #7788 | EnrichedLog |
net6.0 | 5.06μs | 10.4ns | 40.4ns | 0 | 0 | 0 | 2.26 KB |
| #7788 | EnrichedLog |
netcoreapp3.1 | 7.02μs | 17.8ns | 68.8ns | 0 | 0 | 0 | 2.26 KB |
| #7788 | EnrichedLog |
net472 | 7.54μs | 11.1ns | 42.9ns | 0.302 | 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.01μs | 10.1ns | 43.9ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
netcoreapp3.1 | 2.68μs | 6.08ns | 23.6ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
net472 | 3.02μs | 2.73ns | 10.6ns | 0.18 | 0 | 0 | 1.2 KB |
| #7788 | SendReceive |
net6.0 | 1.97μs | 9.6ns | 42.9ns | 0 | 0 | 0 | 1.2 KB |
| #7788 | SendReceive |
netcoreapp3.1 | 2.59μs | 11.2ns | 43.2ns | 0 | 0 | 0 | 1.2 KB |
| #7788 | SendReceive |
net472 | 3.05μs | 3.79ns | 14.7ns | 0.182 | 0 | 0 | 1.2 KB |
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EnrichedLog |
net6.0 | 4.5μs | 21.5ns | 83.3ns | 0 | 0 | 0 | 1.58 KB |
| master | EnrichedLog |
netcoreapp3.1 | 5.51μs | 13.7ns | 52.9ns | 0 | 0 | 0 | 1.63 KB |
| master | EnrichedLog |
net472 | 6.93μs | 9.31ns | 36.1ns | 0.309 | 0 | 0 | 2.03 KB |
| #7788 | EnrichedLog |
net6.0 | 4.14μs | 12.8ns | 46.3ns | 0 | 0 | 0 | 1.58 KB |
| #7788 | EnrichedLog |
netcoreapp3.1 | 5.48μs | 11.3ns | 43.9ns | 0 | 0 | 0 | 1.63 KB |
| #7788 | EnrichedLog |
net472 | 6.7μs | 4.65ns | 18ns | 0.302 | 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 | 772ns | 3.64ns | 15ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
netcoreapp3.1 | 959ns | 4.77ns | 21.4ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
net472 | 949ns | 0.0993ns | 0.371ns | 0.0917 | 0 | 0 | 578 B |
| master | StartFinishScope |
net6.0 | 916ns | 1.69ns | 6.31ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
netcoreapp3.1 | 1.2μs | 6.11ns | 29.3ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
net472 | 1.14μs | 0.215ns | 0.806ns | 0.103 | 0 | 0 | 658 B |
| #7788 | StartFinishSpan |
net6.0 | 775ns | 3.52ns | 14.1ns | 0 | 0 | 0 | 576 B |
| #7788 | StartFinishSpan |
netcoreapp3.1 | 958ns | 4.71ns | 18.2ns | 0 | 0 | 0 | 576 B |
| #7788 | StartFinishSpan |
net472 | 977ns | 0.497ns | 1.93ns | 0.0883 | 0 | 0 | 578 B |
| #7788 | StartFinishScope |
net6.0 | 951ns | 0.55ns | 2.13ns | 0 | 0 | 0 | 696 B |
| #7788 | StartFinishScope |
netcoreapp3.1 | 1.2μs | 6.01ns | 24ns | 0 | 0 | 0 | 696 B |
| #7788 | StartFinishScope |
net472 | 1.14μs | 0.15ns | 0.58ns | 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.05μs | 4.93ns | 20.3ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
netcoreapp3.1 | 1.41μs | 7.32ns | 35.1ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
net472 | 1.46μs | 2.39ns | 9.25ns | 0.102 | 0 | 0 | 658 B |
| #7788 | RunOnMethodBegin |
net6.0 | 1.08μs | 4.19ns | 16.2ns | 0 | 0 | 0 | 696 B |
| #7788 | RunOnMethodBegin |
netcoreapp3.1 | 1.41μs | 7.09ns | 30.9ns | 0 | 0 | 0 | 696 B |
| #7788 | RunOnMethodBegin |
net472 | 1.44μs | 0.678ns | 2.54ns | 0.101 | 0 | 0 | 658 B |
8cc08a8 to
0312a2a
Compare
d7a6df3 to
3c51752
Compare
bouwkast
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.
👍
I just assume anything that's |
|
|
||
| // Internal for testing only | ||
| [InternalForTesting] | ||
| public NameValueConfigurationSource(NameValueCollection nameValueCollection) |
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.
This is public, not internal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, but public/internal is irrelevant in Datadog.Trace world😛 Everything public could be internal and vice versa 😉 Maybe we should just have an analyzer that forces us to use public instead of internal for consistency? Or vice versa? 🤷♂️
| /// <param name="spanId">The propagated span id.</param> | ||
| /// <param name="samplingPriority">The propagated sampling priority.</param> | ||
| /// <param name="serviceName">The service name to propagate to child spans.</param> | ||
| [InternalForTesting] |
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.
This is public, not internal.
I think there's a difference.
I might actually tweak this analyzer to account for both cases, so we can remove the comments, and be properly protected 🤔 |
## 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
0312a2a to
d4afe02
Compare
3c51752 to
6e3d383
Compare
## Summary of changes Deletes a bunch of enum members from `PublicApiUsage` which are unused ## Reason 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 - #7786 - #7787 👈 - #7788
ed6fa19 to
4e69bc7
Compare
|
FYI @bouwkast @lucaspimentel, I tweaked the naming of the attribute
|
4e69bc7 to
7e6834a
Compare
Summary of changes
Repurposes the now-defunct
PublicApiAnalyzerto anInternalForTestingAnalyzerReason for change
We have various methods in
Datadog.Tracethat 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
PublicApi*->InternalForTesting*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 testingwhich are a bit different. In those cases, we do call it in Datadog.Trace, the comment is just explaining why the method isn'tprivate. 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
[PublicApi]usages and unused code #7786PublicApiUsagemembers #7787PublicApiAnalyzerasInternalForTestingAnalyzer#7788 👈