Pre-cache reference assemblies as package references in analyzers tests#7959
Conversation
|
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (7959) 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 (7959) - mean (68ms) : 67, 70
master - mean (68ms) : 67, 70
section Bailout
This PR (7959) - mean (72ms) : 71, 73
master - mean (72ms) : 71, 73
section CallTarget+Inlining+NGEN
This PR (7959) - mean (1,003ms) : 966, 1041
master - mean (1,007ms) : 954, 1060
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 (7959) - mean (106ms) : 103, 108
master - mean (106ms) : 103, 108
section Bailout
This PR (7959) - mean (106ms) : 105, 108
master - mean (106ms) : 105, 108
section CallTarget+Inlining+NGEN
This PR (7959) - mean (711ms) : 676, 747
master - mean (710ms) : 680, 740
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7959) - mean (94ms) : 91, 96
master - mean (93ms) : 91, 95
section Bailout
This PR (7959) - mean (94ms) : 93, 95
master - mean (94ms) : 93, 95
section CallTarget+Inlining+NGEN
This PR (7959) - mean (666ms) : 643, 689
master - mean (663ms) : 641, 685
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7959) - mean (92ms) : 89, 94
master - mean (91ms) : 90, 93
section Bailout
This PR (7959) - mean (93ms) : 92, 93
master - mean (92ms) : 91, 94
section CallTarget+Inlining+NGEN
This PR (7959) - mean (629ms) : 612, 646
master - mean (628ms) : 615, 641
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 (7959) - mean (194ms) : 190, 197
master - mean (193ms) : 189, 197
section Bailout
This PR (7959) - mean (198ms) : 195, 201
master - mean (197ms) : 194, 200
section CallTarget+Inlining+NGEN
This PR (7959) - mean (1,125ms) : 1056, 1195
master - mean (1,118ms) : 1051, 1185
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 (7959) - mean (279ms) : 271, 286
master - mean (277ms) : 271, 283
section Bailout
This PR (7959) - mean (278ms) : 274, 282
master - mean (276ms) : 273, 280
section CallTarget+Inlining+NGEN
This PR (7959) - mean (905ms) : 852, 958
master - mean (909ms) : 853, 965
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7959) - mean (272ms) : 266, 279
master - mean (270ms) : 266, 273
section Bailout
This PR (7959) - mean (272ms) : 266, 277
master - mean (269ms) : 266, 272
section CallTarget+Inlining+NGEN
This PR (7959) - mean (889ms) : 844, 935
master - mean (878ms) : 846, 911
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7959) - mean (271ms) : 265, 276
master - mean (268ms) : 264, 271
section Bailout
This PR (7959) - mean (270ms) : 267, 274
master - mean (269ms) : 263, 275
section CallTarget+Inlining+NGEN
This PR (7959) - mean (826ms) : 807, 845
master - mean (826ms) : 800, 853
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
tracer/test/Datadog.Trace.Tools.Analyzers.Tests/Datadog.Trace.Tools.Analyzers.Tests.csproj
Outdated
Show resolved
Hide resolved
…Tools.Analyzers.Tests.csproj Co-authored-by: Andrew Lock <andrew.lock@datadoghq.com>
BenchmarksBenchmarks Report for benchmark platform 🐌Benchmarks for #7959 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 ✔️ More allocations
|
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 | 3.26 KB | 3.39 KB | 128 B | 3.92% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 1.28ms | 110ns | 410ns | 0 | 0 | 0 | 2.7 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.37ms | 97ns | 363ns | 0 | 0 | 0 | 2.7 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 1.72ms | 205ns | 794ns | 0 | 0 | 0 | 3.26 KB |
| #7959 | WriteAndFlushEnrichedTraces |
net6.0 | 1.27ms | 1.46μs | 5.64μs | 0 | 0 | 0 | 2.7 KB |
| #7959 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.39ms | 1.29μs | 4.99μs | 0 | 0 | 0 | 2.7 KB |
| #7959 | WriteAndFlushEnrichedTraces |
net472 | 1.7ms | 463ns | 1.79μs | 0 | 0 | 0 | 3.39 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.14μs | 6.25ns | 37ns | 0 | 0 | 0 | 1.22 KB |
| master | AllCycleSimpleBody |
netcoreapp3.1 | 1.38μs | 7.92ns | 53.7ns | 0 | 0 | 0 | 1.2 KB |
| master | AllCycleSimpleBody |
net472 | 1.03μs | 0.37ns | 1.39ns | 0.195 | 0 | 0 | 1.23 KB |
| master | AllCycleMoreComplexBody |
net6.0 | 7.41μs | 36.9ns | 165ns | 0 | 0 | 0 | 4.72 KB |
| master | AllCycleMoreComplexBody |
netcoreapp3.1 | 8.97μs | 42.5ns | 175ns | 0 | 0 | 0 | 4.62 KB |
| master | AllCycleMoreComplexBody |
net472 | 7.72μs | 4.4ns | 16.5ns | 0.732 | 0 | 0 | 4.74 KB |
| master | ObjectExtractorSimpleBody |
net6.0 | 327ns | 1.84ns | 11.5ns | 0 | 0 | 0 | 280 B |
| master | ObjectExtractorSimpleBody |
netcoreapp3.1 | 400ns | 2.25ns | 13.9ns | 0 | 0 | 0 | 272 B |
| master | ObjectExtractorSimpleBody |
net472 | 304ns | 0.076ns | 0.294ns | 0.0444 | 0 | 0 | 281 B |
| master | ObjectExtractorMoreComplexBody |
net6.0 | 6.6μs | 29ns | 112ns | 0 | 0 | 0 | 3.78 KB |
| master | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.98μs | 6.04ns | 23.4ns | 0 | 0 | 0 | 3.69 KB |
| master | ObjectExtractorMoreComplexBody |
net472 | 6.79μs | 3.38ns | 12.2ns | 0.577 | 0 | 0 | 3.8 KB |
| #7959 | AllCycleSimpleBody |
net6.0 | 1.1μs | 5.99ns | 35.9ns | 0 | 0 | 0 | 1.22 KB |
| #7959 | AllCycleSimpleBody |
netcoreapp3.1 | 1.37μs | 7.62ns | 50ns | 0 | 0 | 0 | 1.2 KB |
| #7959 | AllCycleSimpleBody |
net472 | 1.03μs | 1.31ns | 5.08ns | 0.194 | 0 | 0 | 1.23 KB |
| #7959 | AllCycleMoreComplexBody |
net6.0 | 7.49μs | 7.68ns | 29.7ns | 0 | 0 | 0 | 4.72 KB |
| #7959 | AllCycleMoreComplexBody |
netcoreapp3.1 | 9.06μs | 43.4ns | 184ns | 0 | 0 | 0 | 4.62 KB |
| #7959 | AllCycleMoreComplexBody |
net472 | 7.65μs | 4.3ns | 15.5ns | 0.727 | 0 | 0 | 4.74 KB |
| #7959 | ObjectExtractorSimpleBody |
net6.0 | 341ns | 1.87ns | 10.6ns | 0 | 0 | 0 | 280 B |
| #7959 | ObjectExtractorSimpleBody |
netcoreapp3.1 | 398ns | 2.01ns | 9.2ns | 0 | 0 | 0 | 272 B |
| #7959 | ObjectExtractorSimpleBody |
net472 | 303ns | 0.0107ns | 0.0372ns | 0.0443 | 0 | 0 | 281 B |
| #7959 | ObjectExtractorMoreComplexBody |
net6.0 | 6.47μs | 1.47ns | 5.5ns | 0 | 0 | 0 | 3.78 KB |
| #7959 | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.82μs | 40.1ns | 179ns | 0 | 0 | 0 | 3.69 KB |
| #7959 | ObjectExtractorMoreComplexBody |
net472 | 6.7μs | 3.79ns | 14.7ns | 0.57 | 0 | 0 | 3.8 KB |
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed ✔️ Fewer allocations 🎉
Fewer allocations 🎉 in #7959
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs‑net6.0
2.16 KB
2.14 KB
-18 B
-0.83%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs‑net6.0 | 2.16 KB | 2.14 KB | -18 B | -0.83% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EncodeArgs |
net6.0 | 76.1μs | 292ns | 1.09μs | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
netcoreapp3.1 | 97.1μs | 251ns | 971ns | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
net472 | 108μs | 10.3ns | 39.8ns | 4.89 | 0 | 0 | 32.5 KB |
| master | EncodeLegacyArgs |
net6.0 | 143μs | 47.5ns | 171ns | 0 | 0 | 0 | 2.16 KB |
| master | EncodeLegacyArgs |
netcoreapp3.1 | 198μs | 331ns | 1.28μs | 0 | 0 | 0 | 2.14 KB |
| master | EncodeLegacyArgs |
net472 | 264μs | 42.8ns | 166ns | 0 | 0 | 0 | 2.14 KB |
| #7959 | EncodeArgs |
net6.0 | 77.7μs | 232ns | 867ns | 0 | 0 | 0 | 32.4 KB |
| #7959 | EncodeArgs |
netcoreapp3.1 | 98.5μs | 181ns | 676ns | 0 | 0 | 0 | 32.4 KB |
| #7959 | EncodeArgs |
net472 | 108μs | 10.5ns | 39.4ns | 4.88 | 0 | 0 | 32.5 KB |
| #7959 | EncodeLegacyArgs |
net6.0 | 143μs | 13.6ns | 52.5ns | 0 | 0 | 0 | 2.14 KB |
| #7959 | EncodeLegacyArgs |
netcoreapp3.1 | 199μs | 64.3ns | 249ns | 0 | 0 | 0 | 2.14 KB |
| #7959 | EncodeLegacyArgs |
net472 | 265μs | 38.6ns | 149ns | 0 | 0 | 0 | 2.15 KB |
Benchmarks.Trace.Asm.AppSecWafBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | RunWafRealisticBenchmark |
net6.0 | 423μs | 2.03μs | 11.3μs | 0 | 0 | 0 | 4.55 KB |
| master | RunWafRealisticBenchmark |
netcoreapp3.1 | 466μs | 2.78μs | 26.3μs | 0 | 0 | 0 | 4.48 KB |
| master | RunWafRealisticBenchmark |
net472 | 486μs | 426ns | 1.54μs | 0 | 0 | 0 | 0 b |
| master | RunWafRealisticBenchmarkWithAttack |
net6.0 | 305μs | 887ns | 3.2μs | 0 | 0 | 0 | 2.24 KB |
| master | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 329μs | 1.38μs | 5.16μs | 0 | 0 | 0 | 2.22 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net472 | 366μs | 271ns | 976ns | 0 | 0 | 0 | 0 b |
| #7959 | RunWafRealisticBenchmark |
net6.0 | 424μs | 1.57μs | 5.65μs | 0 | 0 | 0 | 4.55 KB |
| #7959 | RunWafRealisticBenchmark |
netcoreapp3.1 | 466μs | 3.84μs | 36.8μs | 0 | 0 | 0 | 4.48 KB |
| #7959 | RunWafRealisticBenchmark |
net472 | 487μs | 427ns | 1.54μs | 0 | 0 | 0 | 0 b |
| #7959 | RunWafRealisticBenchmarkWithAttack |
net6.0 | 321μs | 1.75μs | 9.57μs | 0 | 0 | 0 | 2.24 KB |
| #7959 | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 376μs | 3.71μs | 36.7μs | 0 | 0 | 0 | 2.22 KB |
| #7959 | RunWafRealisticBenchmarkWithAttack |
net472 | 365μs | 144ns | 520ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Fewer allocations 🎉
Fewer allocations 🎉 in #7959
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.AspNetCoreBenchmark.SendRequest‑netcoreapp3.1
21.34 KB
21.18 KB
-155 B
-0.73%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.AspNetCoreBenchmark.SendRequest‑netcoreapp3.1 | 21.34 KB | 21.18 KB | -155 B | -0.73% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | SendRequest |
net6.0 | 84.1μs | 165ns | 638ns | 0 | 0 | 0 | 18.97 KB |
| master | SendRequest |
netcoreapp3.1 | 98.4μs | 397ns | 1.9μs | 0 | 0 | 0 | 21.34 KB |
| master | SendRequest |
net472 | 0ns | 0ns | 0ns | 0 | 0 | 0 | 0 b |
| #7959 | SendRequest |
net6.0 | 85.4μs | 109ns | 393ns | 0 | 0 | 0 | 18.97 KB |
| #7959 | SendRequest |
netcoreapp3.1 | 97.4μs | 408ns | 2.77μs | 0 | 0 | 0 | 21.18 KB |
| #7959 | SendRequest |
net472 | 0ns | 0ns | 0ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CharSliceBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #7959
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1
2.188
853,800.00
1,868,000.00
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑netcoreapp3.1
1.656
1,698,800.00
2,813,900.00
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1 | 2.188 | 853,800.00 | 1,868,000.00 | |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑netcoreapp3.1 | 1.656 | 1,698,800.00 | 2,813,900.00 |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | OriginalCharSlice |
net6.0 | 1.98ms | 653ns | 2.44μs | 0 | 0 | 0 | 640 KB |
| master | OriginalCharSlice |
netcoreapp3.1 | 3.92ms | 1.18μs | 4.43μs | 0 | 0 | 0 | 640 KB |
| master | OriginalCharSlice |
net472 | 2.71ms | 365ns | 1.31μs | 0 | 0 | 0 | 638.98 KB |
| master | OptimizedCharSlice |
net6.0 | 1.38ms | 973ns | 3.77μs | 0 | 0 | 0 | 0 b |
| master | OptimizedCharSlice |
netcoreapp3.1 | 1.71ms | 9.48μs | 60.7μs | 0 | 0 | 0 | 0 b |
| master | OptimizedCharSlice |
net472 | 2.06ms | 642ns | 2.49μs | 0 | 0 | 0 | 0 b |
| master | OptimizedCharSliceWithPool |
net6.0 | 1.01ms | 559ns | 2.17μs | 0 | 0 | 0 | 0 b |
| master | OptimizedCharSliceWithPool |
netcoreapp3.1 | 853μs | 301ns | 2.04μs | 0 | 0 | 0 | 0 b |
| master | OptimizedCharSliceWithPool |
net472 | 1.21ms | 295ns | 1.14μs | 0 | 0 | 0 | 0 b |
| #7959 | OriginalCharSlice |
net6.0 | 2.19ms | 1.54μs | 5.95μs | 0 | 0 | 0 | 640 KB |
| #7959 | OriginalCharSlice |
netcoreapp3.1 | 3.97ms | 1.34μs | 4.84μs | 0 | 0 | 0 | 640.05 KB |
| #7959 | OriginalCharSlice |
net472 | 2.76ms | 1.41μs | 5.29μs | 0 | 0 | 0 | 638.98 KB |
| #7959 | OptimizedCharSlice |
net6.0 | 1.41ms | 271ns | 939ns | 0 | 0 | 0 | 0 b |
| #7959 | OptimizedCharSlice |
netcoreapp3.1 | 2.81ms | 774ns | 2.9μs | 0 | 0 | 0 | 0 b |
| #7959 | OptimizedCharSlice |
net472 | 1.94ms | 504ns | 1.82μs | 0 | 0 | 0 | 0 b |
| #7959 | OptimizedCharSliceWithPool |
net6.0 | 1.03ms | 216ns | 778ns | 0 | 0 | 0 | 0 b |
| #7959 | OptimizedCharSliceWithPool |
netcoreapp3.1 | 1.87ms | 1.94μs | 7.52μs | 0 | 0 | 0 | 0 b |
| #7959 | OptimizedCharSliceWithPool |
net472 | 1.13ms | 335ns | 1.3μs | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Faster 🎉 More allocations ⚠️
Faster 🎉 in #7959
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472
1.143
967,817.79
846,580.73
More allocations ⚠️ in #7959
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472
55.73 KB
56.28 KB
551 B
0.99%
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0
41.77 KB
42.05 KB
275 B
0.66%
Fewer allocations 🎉 in #7959
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1
43.15 KB
41.98 KB
-1.17 KB
-2.70%
| Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 | 1.143 | 967,817.79 | 846,580.73 |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 | 55.73 KB | 56.28 KB | 551 B | 0.99% |
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 | 41.77 KB | 42.05 KB | 275 B | 0.66% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 | 43.15 KB | 41.98 KB | -1.17 KB | -2.70% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 655μs | 3.22μs | 13.3μs | 0 | 0 | 0 | 41.77 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 795μs | 4.42μs | 26.5μs | 0 | 0 | 0 | 43.15 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 967μs | 3.42μs | 12.8μs | 4.81 | 0 | 0 | 55.73 KB |
| #7959 | WriteAndFlushEnrichedTraces |
net6.0 | 655μs | 3.45μs | 17.9μs | 0 | 0 | 0 | 42.05 KB |
| #7959 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 731μs | 4.25μs | 38.9μs | 0 | 0 | 0 | 41.98 KB |
| #7959 | WriteAndFlushEnrichedTraces |
net472 | 849μs | 3.14μs | 11.8μs | 5.21 | 0 | 0 | 56.28 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.89μs | 4.95ns | 19.2ns | 0 | 0 | 0 | 968 B |
| master | ExecuteNonQuery |
netcoreapp3.1 | 2.42μs | 9.13ns | 35.4ns | 0 | 0 | 0 | 960 B |
| master | ExecuteNonQuery |
net472 | 2.63μs | 3.05ns | 11.4ns | 0.147 | 0 | 0 | 931 B |
| #7959 | ExecuteNonQuery |
net6.0 | 1.82μs | 9.25ns | 40.3ns | 0 | 0 | 0 | 968 B |
| #7959 | ExecuteNonQuery |
netcoreapp3.1 | 2.57μs | 9.79ns | 37.9ns | 0 | 0 | 0 | 960 B |
| #7959 | ExecuteNonQuery |
net472 | 2.69μs | 0.973ns | 3.51ns | 0.148 | 0 | 0 | 931 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.64μs | 8.49ns | 41.6ns | 0 | 0 | 0 | 952 B |
| master | CallElasticsearch |
netcoreapp3.1 | 2.16μs | 8.7ns | 33.7ns | 0 | 0 | 0 | 968 B |
| master | CallElasticsearch |
net472 | 3.42μs | 5.5ns | 21.3ns | 0.136 | 0 | 0 | 955 B |
| master | CallElasticsearchAsync |
net6.0 | 1.76μs | 3.13ns | 11.3ns | 0 | 0 | 0 | 928 B |
| master | CallElasticsearchAsync |
netcoreapp3.1 | 2.28μs | 10.8ns | 44.7ns | 0 | 0 | 0 | 1.02 KB |
| master | CallElasticsearchAsync |
net472 | 3.54μs | 3.34ns | 12.5ns | 0.16 | 0 | 0 | 1.01 KB |
| #7959 | CallElasticsearch |
net6.0 | 1.67μs | 7.63ns | 29.6ns | 0 | 0 | 0 | 952 B |
| #7959 | CallElasticsearch |
netcoreapp3.1 | 2.23μs | 7.73ns | 29.9ns | 0 | 0 | 0 | 968 B |
| #7959 | CallElasticsearch |
net472 | 3.5μs | 5.04ns | 19.5ns | 0.14 | 0 | 0 | 955 B |
| #7959 | CallElasticsearchAsync |
net6.0 | 1.74μs | 0.413ns | 1.43ns | 0 | 0 | 0 | 928 B |
| #7959 | CallElasticsearchAsync |
netcoreapp3.1 | 2.36μs | 12.4ns | 60.6ns | 0 | 0 | 0 | 1.02 KB |
| #7959 | CallElasticsearchAsync |
net472 | 3.38μs | 2.1ns | 8.13ns | 0.153 | 0 | 0 | 1.01 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.89μs | 0.552ns | 1.99ns | 0 | 0 | 0 | 896 B |
| master | ExecuteAsync |
netcoreapp3.1 | 2.37μs | 9.03ns | 35ns | 0 | 0 | 0 | 896 B |
| master | ExecuteAsync |
net472 | 2.55μs | 2.78ns | 10.8ns | 0.128 | 0 | 0 | 859 B |
| #7959 | ExecuteAsync |
net6.0 | 1.83μs | 7.74ns | 30ns | 0 | 0 | 0 | 896 B |
| #7959 | ExecuteAsync |
netcoreapp3.1 | 2.36μs | 11.6ns | 46.2ns | 0 | 0 | 0 | 896 B |
| #7959 | ExecuteAsync |
net472 | 2.56μs | 0.559ns | 2.09ns | 0.127 | 0 | 0 | 858 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.59μs | 18.9ns | 68.2ns | 0 | 0 | 0 | 2.29 KB |
| master | SendAsync |
netcoreapp3.1 | 8.38μs | 24.9ns | 96.3ns | 0 | 0 | 0 | 2.83 KB |
| master | SendAsync |
net472 | 12μs | 10.7ns | 41.3ns | 0.478 | 0 | 0 | 3.08 KB |
| #7959 | SendAsync |
net6.0 | 6.72μs | 9.88ns | 38.2ns | 0 | 0 | 0 | 2.29 KB |
| #7959 | SendAsync |
netcoreapp3.1 | 8.59μs | 17.8ns | 69ns | 0 | 0 | 0 | 2.83 KB |
| #7959 | SendAsync |
net472 | 11.9μs | 8.08ns | 31.3ns | 0.473 | 0 | 0 | 3.08 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7959
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
247.43 KB
258.73 KB
11.3 KB
4.57%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0
250.07 KB
259.03 KB
8.96 KB
3.58%
Fewer allocations 🎉 in #7959
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472
273.72 KB
270.34 KB
-3.38 KB
-1.24%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 | 247.43 KB | 258.73 KB | 11.3 KB | 4.57% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 | 250.07 KB | 259.03 KB | 8.96 KB | 3.58% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 | 273.72 KB | 270.34 KB | -3.38 KB | -1.24% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StringConcatBenchmark |
net6.0 | 47.1μs | 591ns | 5.64μs | 0 | 0 | 0 | 42.51 KB |
| master | StringConcatBenchmark |
netcoreapp3.1 | 48.1μs | 237ns | 1.01μs | 0 | 0 | 0 | 42.54 KB |
| master | StringConcatBenchmark |
net472 | 59.3μs | 289ns | 1.15μs | 0 | 0 | 0 | 49.15 KB |
| master | StringConcatAspectBenchmark |
net6.0 | 463μs | 2.42μs | 12.4μs | 0 | 0 | 0 | 250.07 KB |
| master | StringConcatAspectBenchmark |
netcoreapp3.1 | 499μs | 1.92μs | 7.44μs | 0 | 0 | 0 | 247.43 KB |
| master | StringConcatAspectBenchmark |
net472 | 401μs | 2.05μs | 14.9μs | 0 | 0 | 0 | 273.72 KB |
| #7959 | StringConcatBenchmark |
net6.0 | 41.9μs | 205ns | 821ns | 0 | 0 | 0 | 42.51 KB |
| #7959 | StringConcatBenchmark |
netcoreapp3.1 | 49.7μs | 287ns | 2.11μs | 0 | 0 | 0 | 42.54 KB |
| #7959 | StringConcatBenchmark |
net472 | 56.9μs | 120ns | 431ns | 0 | 0 | 0 | 49.15 KB |
| #7959 | StringConcatAspectBenchmark |
net6.0 | 466μs | 2.41μs | 11.3μs | 0 | 0 | 0 | 259.03 KB |
| #7959 | StringConcatAspectBenchmark |
netcoreapp3.1 | 478μs | 7.29μs | 72.5μs | 0 | 0 | 0 | 258.73 KB |
| #7959 | StringConcatAspectBenchmark |
net472 | 395μs | 2.04μs | 9.79μs | 0 | 0 | 0 | 270.34 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.66μs | 12.1ns | 48.5ns | 0 | 0 | 0 | 1.69 KB |
| master | EnrichedLog |
netcoreapp3.1 | 3.63μs | 12.9ns | 50ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
net472 | 3.8μs | 3.12ns | 11.7ns | 0.248 | 0 | 0 | 1.6 KB |
| #7959 | EnrichedLog |
net6.0 | 2.82μs | 13.3ns | 51.5ns | 0 | 0 | 0 | 1.69 KB |
| #7959 | EnrichedLog |
netcoreapp3.1 | 3.53μs | 12.7ns | 49ns | 0 | 0 | 0 | 1.7 KB |
| #7959 | EnrichedLog |
net472 | 3.83μs | 3.56ns | 13.3ns | 0.249 | 0 | 0 | 1.6 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 | 59.3ns | 222ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
netcoreapp3.1 | 127μs | 213ns | 767ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
net472 | 166μs | 49.5ns | 192ns | 0 | 0 | 0 | 4.51 KB |
| #7959 | EnrichedLog |
net6.0 | 123μs | 103ns | 372ns | 0 | 0 | 0 | 4.31 KB |
| #7959 | EnrichedLog |
netcoreapp3.1 | 128μs | 217ns | 784ns | 0 | 0 | 0 | 4.31 KB |
| #7959 | EnrichedLog |
net472 | 166μs | 63.6ns | 246ns | 0 | 0 | 0 | 4.51 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.97μs | 18.5ns | 69.4ns | 0 | 0 | 0 | 2.24 KB |
| master | EnrichedLog |
netcoreapp3.1 | 6.72μs | 18.2ns | 70.7ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
net472 | 7.62μs | 3.24ns | 12.6ns | 0.304 | 0 | 0 | 2.05 KB |
| #7959 | EnrichedLog |
net6.0 | 5.01μs | 19.1ns | 73.8ns | 0 | 0 | 0 | 2.24 KB |
| #7959 | EnrichedLog |
netcoreapp3.1 | 6.96μs | 24ns | 92.8ns | 0 | 0 | 0 | 2.26 KB |
| #7959 | EnrichedLog |
net472 | 7.55μs | 7.75ns | 30ns | 0.301 | 0 | 0 | 2.05 KB |
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | SendReceive |
net6.0 | 1.91μs | 8.46ns | 31.6ns | 0 | 0 | 0 | 1.12 KB |
| master | SendReceive |
netcoreapp3.1 | 2.58μs | 10.7ns | 41.3ns | 0 | 0 | 0 | 1.14 KB |
| master | SendReceive |
net472 | 2.97μs | 2.29ns | 8.57ns | 0.164 | 0 | 0 | 1.12 KB |
| #7959 | SendReceive |
net6.0 | 1.91μs | 2.24ns | 8.66ns | 0 | 0 | 0 | 1.12 KB |
| #7959 | SendReceive |
netcoreapp3.1 | 2.52μs | 12.7ns | 59.4ns | 0 | 0 | 0 | 1.14 KB |
| #7959 | SendReceive |
net472 | 2.82μs | 2.21ns | 8.54ns | 0.172 | 0 | 0 | 1.12 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.39μs | 1.78ns | 6.41ns | 0 | 0 | 0 | 1.58 KB |
| master | EnrichedLog |
netcoreapp3.1 | 6.19μs | 13.9ns | 53.7ns | 0 | 0 | 0 | 1.63 KB |
| master | EnrichedLog |
net472 | 6.81μs | 7.88ns | 30.5ns | 0.304 | 0 | 0 | 2.03 KB |
| #7959 | EnrichedLog |
net6.0 | 4.51μs | 3.83ns | 14.3ns | 0 | 0 | 0 | 1.58 KB |
| #7959 | EnrichedLog |
netcoreapp3.1 | 5.66μs | 12.4ns | 48.2ns | 0 | 0 | 0 | 1.63 KB |
| #7959 | EnrichedLog |
net472 | 6.8μs | 11.6ns | 45ns | 0.305 | 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 | 767ns | 1.89ns | 7.33ns | 0 | 0 | 0 | 520 B |
| master | StartFinishSpan |
netcoreapp3.1 | 947ns | 4.93ns | 25.1ns | 0 | 0 | 0 | 520 B |
| master | StartFinishSpan |
net472 | 892ns | 0.0506ns | 0.196ns | 0.0808 | 0 | 0 | 522 B |
| master | StartFinishScope |
net6.0 | 916ns | 4.25ns | 17.5ns | 0 | 0 | 0 | 640 B |
| master | StartFinishScope |
netcoreapp3.1 | 1.14μs | 5.74ns | 25ns | 0 | 0 | 0 | 640 B |
| master | StartFinishScope |
net472 | 1.09μs | 0.15ns | 0.542ns | 0.0928 | 0 | 0 | 602 B |
| master | StartFinishTwoScopes |
net6.0 | 1.79μs | 1.45ns | 5.62ns | 0 | 0 | 0 | 1.19 KB |
| master | StartFinishTwoScopes |
netcoreapp3.1 | 2.19μs | 9.43ns | 36.5ns | 0 | 0 | 0 | 1.19 KB |
| master | StartFinishTwoScopes |
net472 | 2.14μs | 3.45ns | 13.3ns | 0.161 | 0 | 0 | 1.08 KB |
| #7959 | StartFinishSpan |
net6.0 | 786ns | 0.553ns | 2.14ns | 0 | 0 | 0 | 520 B |
| #7959 | StartFinishSpan |
netcoreapp3.1 | 987ns | 5.28ns | 28.5ns | 0 | 0 | 0 | 520 B |
| #7959 | StartFinishSpan |
net472 | 893ns | 0.337ns | 1.26ns | 0.0806 | 0 | 0 | 522 B |
| #7959 | StartFinishScope |
net6.0 | 921ns | 3.42ns | 13.3ns | 0 | 0 | 0 | 640 B |
| #7959 | StartFinishScope |
netcoreapp3.1 | 1.13μs | 4.87ns | 18.9ns | 0 | 0 | 0 | 640 B |
| #7959 | StartFinishScope |
net472 | 1.07μs | 0.114ns | 0.412ns | 0.0916 | 0 | 0 | 602 B |
| #7959 | StartFinishTwoScopes |
net6.0 | 1.8μs | 2.36ns | 9.15ns | 0 | 0 | 0 | 1.19 KB |
| #7959 | StartFinishTwoScopes |
netcoreapp3.1 | 2.2μs | 10.6ns | 42.3ns | 0 | 0 | 0 | 1.19 KB |
| #7959 | StartFinishTwoScopes |
net472 | 2.13μs | 0.246ns | 0.952ns | 0.171 | 0 | 0 | 1.08 KB |
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.04μs | 4.92ns | 20.3ns | 0 | 0 | 0 | 640 B |
| master | RunOnMethodBegin |
netcoreapp3.1 | 1.36μs | 6.96ns | 31.9ns | 0 | 0 | 0 | 640 B |
| master | RunOnMethodBegin |
net472 | 1.43μs | 0.869ns | 3.25ns | 0.0934 | 0 | 0 | 602 B |
| #7959 | RunOnMethodBegin |
net6.0 | 1.05μs | 4.92ns | 19.1ns | 0 | 0 | 0 | 640 B |
| #7959 | RunOnMethodBegin |
netcoreapp3.1 | 1.34μs | 6.35ns | 26.2ns | 0 | 0 | 0 | 640 B |
| #7959 | RunOnMethodBegin |
net472 | 1.44μs | 3.27ns | 12.7ns | 0.0936 | 0 | 0 | 602 B |
| <!-- Based on actual runtime monitoring of packages requested during test execution --> | ||
|
|
||
| <!-- .NET Framework 4.8 --> | ||
| <ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' "> |
There was a problem hiding this comment.
Checking TargetFrameworkIdentifier works, but you could also use TargetFramework for consistency with the other checks below. (level of care: low)
<ItemGroup Condition=" '$(TargetFramework)' == 'net48' ">There was a problem hiding this comment.
Yes, it makes sense, thanks. On the other hand, we usually seem to use '$(TargetFrameworkIdentifier)' == '.NETFramework' in other projects and we dont have any '$(TargetFramework)' == 'net48' even though it's also valid, so I decided to go for that option as it seems to be the default one for this case.
|
Thanks for your feedback and reviews! |
Summary of changes
Pre-cache reference assemblies as package references in
Datadog.Trace.Tools.Analyzers.Teststo prevent flaky test failures caused by NuGet 503 errors during test runtime.Reason for change
The analyzer tests experience intermittent failures in CI when NuGet.org returns 503 errors. This happens because
Microsoft.CodeAnalysis.Testingframework dynamically downloads reference assemblies (e.g.,Microsoft.NETCore.App.Ref,NETStandard.Library) at test runtime to compile analyzer test code snippets.Example error:
NuGet.Protocol.Core.Types.FatalProtocolException : An error occurred while retrieving package metadata for 'Microsoft.NETCore.App.Ref.3.1.0' from source 'nuget.org'.
The issue occurs because while build-time packages are restored during the
Restoretarget, theMicrosoft.CodeAnalysis.Testingframework requires additional reference assemblies that aren't direct dependencies of the test project. When these aren't in the local NuGet cache, the framework attempts to download them at runtime, which fails when NuGet.org is experiencing issues.Implementation details
Added conditional package references to
tracer/test/Datadog.Trace.Tools.Analyzers.Tests/Datadog.Trace.Tools.Analyzers.Tests.csprojbased on actual runtime monitoring of which packages are requested during test execution:Package mapping by target framework:
TargetFrameworkIdentifier == '.NETFramework'):Microsoft.NETFramework.ReferenceAssemblies.net472 1.0.2TargetFramework == 'netcoreapp2.1' OR 'netcoreapp3.0'):NETStandard.Library 2.0.3Microsoft.NETCore.Platforms 1.1.0TargetFrameworkIdentifier == '.NETCoreApp' AND NOT netcoreapp2.1/3.0):Microsoft.NETCore.App.Ref 3.1.0All packages use
PrivateAssets="all" ExcludeAssets="all"to:RestoretargetMicrosoft.CodeAnalysis.Testingat test runtimeAdded
NoWarnsuppression for NU1605 (package downgrade warning) sinceMicrosoft.NETCore.Platforms 1.1.0is intentionally used despite being an older version.Test coverage
Other details