dd-trace-dotnet
dd-trace-dotnet copied to clipboard
[Profiler] Leverage new .NET 10 allocation sampling
Summary of changes
Support the new .NET allocation sampling
Reason for change
We should be better statistical results in the allocation profiler; even with upscaling
Implementation details
Listen to the new AllocationSampled event in .NET 10+
Test coverage
Other details
Datadog Report
All test runs 68141b6 :link:
:white_check_mark: 2 Total Test Services: 0 Failed, 2 Passed
Test Services
| Service Name | Failed | Known Flaky | New Flaky | Passed | Skipped | Total Time | Test Service View |
|---|---|---|---|---|---|---|---|
dd-trace-dotnet |
0 | 0 | 0 | 245193 | 2875 | 17h 8m 51.28s | Link |
exploration_tests |
0 | 0 | 0 | 22085 | 3 | 2m 30.14s | Link |
Execution-Time Benchmarks Report :stopwatch:
Execution-time results for samples comparing the following branches/commits:
Execution-time benchmarks measure the whole time it takes to execute a program. And are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are shown in red. The following thresholds were used for comparing the execution times:
- Welch test with statistical test for significance of 5%
- Only results indicating a difference greater than 5% and 5 ms are considered.
Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard.
Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph).
gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (6930) - mean (72ms) : 71, 73
. : milestone, 72,
master - mean (72ms) : 71, 73
. : milestone, 72,
section Baseline
This PR (6930) - mean (68ms) : 66, 70
. : milestone, 68,
master - mean (69ms) : 66, 71
. : milestone, 69,
section CallTarget+Inlining+NGEN
This PR (6930) - mean (1,052ms) : 995, 1109
. : milestone, 1052,
master - mean (1,055ms) : 991, 1120
. : milestone, 1055,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (6930) - mean (107ms) : 105, 108
. : milestone, 107,
master - mean (106ms) : 105, 108
. : milestone, 106,
section Baseline
This PR (6930) - mean (106ms) : 103, 108
. : milestone, 106,
master - mean (106ms) : 103, 108
. : milestone, 106,
section CallTarget+Inlining+NGEN
This PR (6930) - mean (744ms) : 725, 764
. : milestone, 744,
master - mean (744ms) : 722, 767
. : milestone, 744,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (6930) - mean (101ms) : 100, 102
. : milestone, 101,
master - mean (100ms) : 100, 101
. : milestone, 100,
section Baseline
This PR (6930) - mean (100ms) : 98, 102
. : milestone, 100,
master - mean (100ms) : 97, 102
. : milestone, 100,
section CallTarget+Inlining+NGEN
This PR (6930) - mean (775ms) : 726, 824
. : milestone, 775,
master - mean (770ms) : 719, 821
. : milestone, 770,
gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (6930) - mean (93ms) : 91, 94
. : milestone, 93,
master - mean (92ms) : 91, 93
. : milestone, 92,
section Baseline
This PR (6930) - mean (92ms) : 90, 94
. : milestone, 92,
master - mean (92ms) : 89, 94
. : milestone, 92,
section CallTarget+Inlining+NGEN
This PR (6930) - mean (660ms) : 645, 675
. : milestone, 660,
master - mean (664ms) : 649, 679
. : milestone, 664,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (6930) - mean (202ms) : 197, 206
. : milestone, 202,
master - mean (202ms) : 197, 207
. : milestone, 202,
section Baseline
This PR (6930) - mean (198ms) : 193, 204
. : milestone, 198,
master - mean (199ms) : 192, 205
. : milestone, 199,
section CallTarget+Inlining+NGEN
This PR (6930) - mean (1,187ms) : 1108, 1266
. : milestone, 1187,
master - mean (1,181ms) : 1129, 1233
. : milestone, 1181,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (6930) - mean (286ms) : 281, 292
. : milestone, 286,
master - mean (287ms) : 277, 298
. : milestone, 287,
section Baseline
This PR (6930) - mean (286ms) : 279, 293
. : milestone, 286,
master - mean (286ms) : 277, 294
. : milestone, 286,
section CallTarget+Inlining+NGEN
This PR (6930) - mean (950ms) : 910, 989
. : milestone, 950,
master - mean (960ms) : 921, 999
. : milestone, 960,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (6930) - mean (289ms) : 282, 296
. : milestone, 289,
master - mean (289ms) : 282, 296
. : milestone, 289,
section Baseline
This PR (6930) - mean (289ms) : 282, 296
. : milestone, 289,
master - mean (288ms) : 280, 297
. : milestone, 288,
section CallTarget+Inlining+NGEN
This PR (6930) - mean (1,007ms) : 964, 1050
. : milestone, 1007,
master - mean (1,010ms) : 956, 1064
. : milestone, 1010,
gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (6930) - mean (278ms) : 272, 284
. : milestone, 278,
master - mean (279ms) : 270, 288
. : milestone, 279,
section Baseline
This PR (6930) - mean (277ms) : 271, 283
. : milestone, 277,
master - mean (277ms) : 269, 284
. : milestone, 277,
section CallTarget+Inlining+NGEN
This PR (6930) - mean (865ms) : 844, 885
. : milestone, 865,
master - mean (873ms) : 848, 898
. : milestone, 873,
Benchmarks
Benchmarks Report for benchmark platform :snail:
Benchmarks for #6930 compared to master:
- 2 benchmarks are faster, with geometric mean 2.244
- 1 benchmarks are slower, with geometric mean 1.247
- 5 benchmarks have fewer allocations
- 5 benchmarks have more allocations
The following thresholds were used for comparing the benchmark speeds:
- Mann–Whitney U test with statistical test for significance of 5%
- Only results indicating a difference greater than 10% and 0.3 ns are considered.
Allocation changes below 0.5% are ignored.
Benchmark details
Benchmarks.Trace.ActivityBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StartStopWithChild |
net6.0 | 10.5μs | 57.5ns | 350ns | 0 | 0 | 0 | 5.5 KB |
| master | StartStopWithChild |
netcoreapp3.1 | 13.2μs | 64.6ns | 266ns | 0 | 0 | 0 | 5.7 KB |
| master | StartStopWithChild |
net472 | 22.4μs | 124ns | 732ns | 0.945 | 0.42 | 0 | 6.09 KB |
| #6930 | StartStopWithChild |
net6.0 | 10.3μs | 54ns | 270ns | 0 | 0 | 0 | 5.47 KB |
| #6930 | StartStopWithChild |
netcoreapp3.1 | 13.7μs | 65.8ns | 255ns | 0 | 0 | 0 | 5.69 KB |
| #6930 | StartStopWithChild |
net472 | 21.9μs | 121ns | 757ns | 0.989 | 0.33 | 0.11 | 6.06 KB |
Benchmarks.Trace.AgentWriterBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 936μs | 63.9ns | 247ns | 0 | 0 | 0 | 2.71 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.02ms | 176ns | 634ns | 0 | 0 | 0 | 2.7 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 1.2ms | 304ns | 1.1μs | 0 | 0 | 0 | 3.31 KB |
| #6930 | WriteAndFlushEnrichedTraces |
net6.0 | 929μs | 125ns | 467ns | 0 | 0 | 0 | 2.7 KB |
| #6930 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.06ms | 1.83μs | 6.59μs | 0 | 0 | 0 | 2.7 KB |
| #6930 | WriteAndFlushEnrichedTraces |
net472 | 1.2ms | 528ns | 2.04μs | 0 | 0 | 0 | 3.31 KB |
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | AllCycleSimpleBody |
net6.0 | 322μs | 1.32μs | 5.1μs | 0 | 0 | 0 | 172.07 KB |
| master | AllCycleSimpleBody |
netcoreapp3.1 | 462μs | 972ns | 3.77μs | 0 | 0 | 0 | 174.18 KB |
| master | AllCycleSimpleBody |
net472 | 438μs | 315ns | 1.22μs | 30.2 | 0 | 0 | 194.25 KB |
| master | AllCycleMoreComplexBody |
net6.0 | 332μs | 1.56μs | 6.05μs | 0 | 0 | 0 | 175.58 KB |
| master | AllCycleMoreComplexBody |
netcoreapp3.1 | 507μs | 513ns | 1.99μs | 0 | 0 | 0 | 177.6 KB |
| master | AllCycleMoreComplexBody |
net472 | 437μs | 174ns | 674ns | 30.2 | 0 | 0 | 197.76 KB |
| master | ObjectExtractorSimpleBody |
net6.0 | 317ns | 0.108ns | 0.42ns | 0 | 0 | 0 | 280 B |
| master | ObjectExtractorSimpleBody |
netcoreapp3.1 | 402ns | 2.18ns | 11.3ns | 0 | 0 | 0 | 272 B |
| master | ObjectExtractorSimpleBody |
net472 | 300ns | 0.0488ns | 0.189ns | 0.0439 | 0 | 0 | 281 B |
| master | ObjectExtractorMoreComplexBody |
net6.0 | 6.22μs | 23.1ns | 89.3ns | 0 | 0 | 0 | 3.78 KB |
| master | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.86μs | 30.4ns | 118ns | 0 | 0 | 0 | 3.69 KB |
| master | ObjectExtractorMoreComplexBody |
net472 | 6.66μs | 2.03ns | 7.86ns | 0.599 | 0 | 0 | 3.8 KB |
| #6930 | AllCycleSimpleBody |
net6.0 | 328μs | 649ns | 2.51μs | 0 | 0 | 0 | 172.07 KB |
| #6930 | AllCycleSimpleBody |
netcoreapp3.1 | 463μs | 1.59μs | 6.14μs | 0 | 0 | 0 | 174.18 KB |
| #6930 | AllCycleSimpleBody |
net472 | 426μs | 278ns | 1.08μs | 29.2 | 0 | 0 | 194.24 KB |
| #6930 | AllCycleMoreComplexBody |
net6.0 | 322μs | 1.55μs | 6.56μs | 0 | 0 | 0 | 175.58 KB |
| #6930 | AllCycleMoreComplexBody |
netcoreapp3.1 | 470μs | 2.02μs | 7.81μs | 0 | 0 | 0 | 177.6 KB |
| #6930 | AllCycleMoreComplexBody |
net472 | 434μs | 149ns | 578ns | 30.2 | 0 | 0 | 197.76 KB |
| #6930 | ObjectExtractorSimpleBody |
net6.0 | 320ns | 0.256ns | 0.992ns | 0 | 0 | 0 | 280 B |
| #6930 | ObjectExtractorSimpleBody |
netcoreapp3.1 | 403ns | 2.03ns | 9.75ns | 0 | 0 | 0 | 272 B |
| #6930 | ObjectExtractorSimpleBody |
net472 | 307ns | 0.0236ns | 0.0914ns | 0.0445 | 0 | 0 | 281 B |
| #6930 | ObjectExtractorMoreComplexBody |
net6.0 | 6.27μs | 25.3ns | 98.1ns | 0 | 0 | 0 | 3.78 KB |
| #6930 | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.88μs | 9.73ns | 37.7ns | 0 | 0 | 0 | 3.69 KB |
| #6930 | ObjectExtractorMoreComplexBody |
net472 | 6.69μs | 3.52ns | 13.2ns | 0.602 | 0 | 0 | 3.8 KB |
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EncodeArgs |
net6.0 | 76.8μs | 220ns | 823ns | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
netcoreapp3.1 | 98.5μs | 245ns | 948ns | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
net472 | 109μs | 48.6ns | 188ns | 4.92 | 0 | 0 | 32.51 KB |
| master | EncodeLegacyArgs |
net6.0 | 141μs | 30.7ns | 119ns | 0 | 0 | 0 | 2.15 KB |
| master | EncodeLegacyArgs |
netcoreapp3.1 | 199μs | 221ns | 854ns | 0 | 0 | 0 | 2.14 KB |
| master | EncodeLegacyArgs |
net472 | 262μs | 40.4ns | 156ns | 0 | 0 | 0 | 2.16 KB |
| #6930 | EncodeArgs |
net6.0 | 76.2μs | 17.6ns | 68.2ns | 0 | 0 | 0 | 32.4 KB |
| #6930 | EncodeArgs |
netcoreapp3.1 | 98.5μs | 148ns | 555ns | 0 | 0 | 0 | 32.4 KB |
| #6930 | EncodeArgs |
net472 | 109μs | 7.94ns | 30.7ns | 4.9 | 0 | 0 | 32.51 KB |
| #6930 | EncodeLegacyArgs |
net6.0 | 145μs | 28.4ns | 106ns | 0 | 0 | 0 | 2.15 KB |
| #6930 | EncodeLegacyArgs |
netcoreapp3.1 | 199μs | 461ns | 1.78μs | 0 | 0 | 0 | 2.14 KB |
| #6930 | EncodeLegacyArgs |
net472 | 262μs | 33.1ns | 128ns | 0 | 0 | 0 | 2.17 KB |
Benchmarks.Trace.Asm.AppSecWafBenchmark - Faster :tada: Fewer allocations :tada:
Faster :tada: in #6930
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1
2.408
727,621.42
302,147.87
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑netcoreapp3.1
2.091
861,427.05
412,039.48
Fewer allocations :tada: in #6930
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑net472
2.3 KB
2.29 KB
-13 B
-0.56%
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | RunWafRealisticBenchmark |
net6.0 | 396μs | 122ns | 458ns | 0 | 0 | 0 | 4.56 KB |
| master | RunWafRealisticBenchmark |
netcoreapp3.1 | 792μs | 14.9μs | 148μs | 0 | 0 | 0 | 4.48 KB |
| master | RunWafRealisticBenchmark |
net472 | 434μs | 48.4ns | 188ns | 0 | 0 | 0 | 4.66 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net6.0 | 292μs | 50.3ns | 195ns | 0 | 0 | 0 | 2.24 KB |
| master | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 724μs | 3.14μs | 11.3μs | 0 | 0 | 0 | 2.22 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net472 | 313μs | 70.9ns | 275ns | 0 | 0 | 0 | 2.3 KB |
| #6930 | RunWafRealisticBenchmark |
net6.0 | 397μs | 38.1ns | 148ns | 0 | 0 | 0 | 4.55 KB |
| #6930 | RunWafRealisticBenchmark |
netcoreapp3.1 | 412μs | 70.3ns | 272ns | 0 | 0 | 0 | 4.48 KB |
| #6930 | RunWafRealisticBenchmark |
net472 | 432μs | 67ns | 259ns | 0 | 0 | 0 | 4.66 KB |
| #6930 | RunWafRealisticBenchmarkWithAttack |
net6.0 | 290μs | 83.3ns | 300ns | 0 | 0 | 0 | 2.24 KB |
| #6930 | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 303μs | 272ns | 1.05μs | 0 | 0 | 0 | 2.22 KB |
| #6930 | RunWafRealisticBenchmarkWithAttack |
net472 | 313μs | 59.5ns | 230ns | 0 | 0 | 0 | 2.29 KB |
Benchmarks.Trace.AspNetCoreBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | SendRequest |
net6.0 | 61.3μs | 41.5ns | 161ns | 0 | 0 | 0 | 14.52 KB |
| master | SendRequest |
netcoreapp3.1 | 71.3μs | 93.8ns | 325ns | 0 | 0 | 0 | 17.42 KB |
| master | SendRequest |
net472 | 0.0117ns | 0.00328ns | 0.0127ns | 0 | 0 | 0 | 0 b |
| #6930 | SendRequest |
net6.0 | 60.3μs | 62.7ns | 234ns | 0 | 0 | 0 | 14.52 KB |
| #6930 | SendRequest |
netcoreapp3.1 | 70.7μs | 107ns | 400ns | 0 | 0 | 0 | 17.42 KB |
| #6930 | SendRequest |
net472 | 0.00317ns | 0.00144ns | 0.00556ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CharSliceBenchmark - Same speed :heavy_check_mark: More allocations :warning:
More allocations :warning: in #6930
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0
2 B
3 B
1 B
50.00%
Fewer allocations :tada: in #6930
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0
7 B
2 B
-5 B
-71.43%
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | OriginalCharSlice |
net6.0 | 1.97ms | 644ns | 2.41μs | 0 | 0 | 0 | 640.01 KB |
| master | OriginalCharSlice |
netcoreapp3.1 | 2.13ms | 11.2μs | 57μs | 0 | 0 | 0 | 640 KB |
| master | OriginalCharSlice |
net472 | 2.73ms | 174ns | 650ns | 100 | 0 | 0 | 641.95 KB |
| master | OptimizedCharSlice |
net6.0 | 1.36ms | 284ns | 1.1μs | 0 | 0 | 0 | 7 B |
| master | OptimizedCharSlice |
netcoreapp3.1 | 1.72ms | 295ns | 1.14μs | 0 | 0 | 0 | 1 B |
| master | OptimizedCharSlice |
net472 | 1.95ms | 444ns | 1.72μs | 0 | 0 | 0 | 0 b |
| master | OptimizedCharSliceWithPool |
net6.0 | 916μs | 50.4ns | 195ns | 0 | 0 | 0 | 2 B |
| master | OptimizedCharSliceWithPool |
netcoreapp3.1 | 827μs | 72.6ns | 262ns | 0 | 0 | 0 | 1 B |
| master | OptimizedCharSliceWithPool |
net472 | 1.16ms | 87.6ns | 316ns | 0 | 0 | 0 | 0 b |
| #6930 | OriginalCharSlice |
net6.0 | 1.94ms | 2.28μs | 8.85μs | 0 | 0 | 0 | 640.01 KB |
| #6930 | OriginalCharSlice |
netcoreapp3.1 | 2.06ms | 9.43μs | 35.3μs | 0 | 0 | 0 | 640 KB |
| #6930 | OriginalCharSlice |
net472 | 2.66ms | 131ns | 506ns | 100 | 0 | 0 | 641.95 KB |
| #6930 | OptimizedCharSlice |
net6.0 | 1.47ms | 428ns | 1.66μs | 0 | 0 | 0 | 2 B |
| #6930 | OptimizedCharSlice |
netcoreapp3.1 | 1.67ms | 550ns | 2.13μs | 0 | 0 | 0 | 1 B |
| #6930 | OptimizedCharSlice |
net472 | 1.94ms | 396ns | 1.54μs | 0 | 0 | 0 | 0 b |
| #6930 | OptimizedCharSliceWithPool |
net6.0 | 841μs | 33.8ns | 131ns | 0 | 0 | 0 | 3 B |
| #6930 | OptimizedCharSliceWithPool |
netcoreapp3.1 | 837μs | 92.3ns | 358ns | 0 | 0 | 0 | 1 B |
| #6930 | OptimizedCharSliceWithPool |
net472 | 1.16ms | 48ns | 180ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed :heavy_check_mark: More allocations :warning:
More allocations :warning: in #6930
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472
55.98 KB
56.54 KB
561 B
1.00%
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1
41.73 KB
41.99 KB
264 B
0.63%
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 694μs | 571ns | 2.06μs | 0 | 0 | 0 | 41.65 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 677μs | 2.11μs | 7.29μs | 0 | 0 | 0 | 41.73 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 905μs | 4.57μs | 20.4μs | 8.33 | 0 | 0 | 55.98 KB |
| #6930 | WriteAndFlushEnrichedTraces |
net6.0 | 739μs | 952ns | 3.69μs | 0 | 0 | 0 | 41.69 KB |
| #6930 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 739μs | 3.99μs | 21.1μs | 0 | 0 | 0 | 41.99 KB |
| #6930 | WriteAndFlushEnrichedTraces |
net472 | 919μs | 2.03μs | 7.61μs | 8.93 | 0 | 0 | 56.54 KB |
Benchmarks.Trace.DbCommandBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | ExecuteNonQuery |
net6.0 | 1.94μs | 5.81ns | 22.5ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
netcoreapp3.1 | 2.59μs | 11.6ns | 44.9ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
net472 | 2.83μs | 3.08ns | 11.9ns | 0.155 | 0.0141 | 0 | 987 B |
| #6930 | ExecuteNonQuery |
net6.0 | 1.83μs | 8.41ns | 32.6ns | 0 | 0 | 0 | 1.02 KB |
| #6930 | ExecuteNonQuery |
netcoreapp3.1 | 2.71μs | 11.9ns | 46.2ns | 0 | 0 | 0 | 1.02 KB |
| #6930 | ExecuteNonQuery |
net472 | 2.79μs | 4.08ns | 15.8ns | 0.151 | 0.0137 | 0 | 987 B |
Benchmarks.Trace.ElasticsearchBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | CallElasticsearch |
net6.0 | 1.71μs | 8.15ns | 33.6ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
netcoreapp3.1 | 2.35μs | 6.04ns | 23.4ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
net472 | 3.61μs | 2.6ns | 10.1ns | 0.162 | 0 | 0 | 1.04 KB |
| master | CallElasticsearchAsync |
net6.0 | 1.85μs | 2.16ns | 8.35ns | 0 | 0 | 0 | 1.01 KB |
| master | CallElasticsearchAsync |
netcoreapp3.1 | 2.38μs | 11.8ns | 51.3ns | 0 | 0 | 0 | 1.08 KB |
| master | CallElasticsearchAsync |
net472 | 3.74μs | 3.68ns | 14.2ns | 0.168 | 0 | 0 | 1.1 KB |
| #6930 | CallElasticsearch |
net6.0 | 1.73μs | 8.78ns | 42.1ns | 0 | 0 | 0 | 1.03 KB |
| #6930 | CallElasticsearch |
netcoreapp3.1 | 2.3μs | 9.49ns | 35.5ns | 0 | 0 | 0 | 1.03 KB |
| #6930 | CallElasticsearch |
net472 | 3.57μs | 1.53ns | 5.53ns | 0.161 | 0 | 0 | 1.04 KB |
| #6930 | CallElasticsearchAsync |
net6.0 | 1.76μs | 1.43ns | 5.54ns | 0 | 0 | 0 | 1.01 KB |
| #6930 | CallElasticsearchAsync |
netcoreapp3.1 | 2.51μs | 2.16ns | 8.37ns | 0 | 0 | 0 | 1.08 KB |
| #6930 | CallElasticsearchAsync |
net472 | 3.72μs | 1.24ns | 4.79ns | 0.168 | 0 | 0 | 1.1 KB |
Benchmarks.Trace.GraphQLBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | ExecuteAsync |
net6.0 | 1.87μs | 2.26ns | 8.47ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
netcoreapp3.1 | 2.33μs | 11.5ns | 47.2ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
net472 | 2.58μs | 4.02ns | 15.6ns | 0.14 | 0 | 0 | 915 B |
| #6930 | ExecuteAsync |
net6.0 | 1.8μs | 7.33ns | 28.4ns | 0 | 0 | 0 | 952 B |
| #6930 | ExecuteAsync |
netcoreapp3.1 | 2.31μs | 7.46ns | 28.9ns | 0 | 0 | 0 | 952 B |
| #6930 | ExecuteAsync |
net472 | 2.68μs | 2.64ns | 9.88ns | 0.134 | 0 | 0 | 915 B |
Benchmarks.Trace.HttpClientBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | SendAsync |
net6.0 | 7.08μs | 31.8ns | 119ns | 0 | 0 | 0 | 2.36 KB |
| master | SendAsync |
netcoreapp3.1 | 8.35μs | 26.9ns | 104ns | 0 | 0 | 0 | 2.9 KB |
| master | SendAsync |
net472 | 12.2μs | 8.46ns | 31.6ns | 0.486 | 0 | 0 | 3.18 KB |
| #6930 | SendAsync |
net6.0 | 6.9μs | 25.3ns | 94.6ns | 0 | 0 | 0 | 2.36 KB |
| #6930 | SendAsync |
netcoreapp3.1 | 8.52μs | 28.1ns | 109ns | 0 | 0 | 0 | 2.9 KB |
| #6930 | SendAsync |
net472 | 12.3μs | 13.1ns | 50.6ns | 0.491 | 0 | 0 | 3.18 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Slower :warning: More allocations :warning:
Slower :warning: in #6930
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
1.247
417,850.00
521,200.00
More allocations :warning: in #6930
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472
57.34 KB
65.54 KB
8.19 KB
14.29%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1
42.64 KB
43.93 KB
1.29 KB
3.02%
Fewer allocations :tada: in #6930
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0
44.33 KB
44.06 KB
-264 B
-0.60%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
276.1 KB
274.17 KB
-1.93 KB
-0.70%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0
258.64 KB
248.5 KB
-10.14 KB
-3.92%
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StringConcatBenchmark |
net6.0 | 49μs | 387ns | 3.67μs | 0 | 0 | 0 | 44.33 KB |
| master | StringConcatBenchmark |
netcoreapp3.1 | 49.7μs | 236ns | 1.9μs | 0 | 0 | 0 | 42.64 KB |
| master | StringConcatBenchmark |
net472 | 57.9μs | 130ns | 449ns | 0 | 0 | 0 | 57.34 KB |
| master | StringConcatAspectBenchmark |
net6.0 | 457μs | 2.16μs | 9.4μs | 0 | 0 | 0 | 258.64 KB |
| master | StringConcatAspectBenchmark |
netcoreapp3.1 | 441μs | 4.74μs | 46.2μs | 0 | 0 | 0 | 276.1 KB |
| master | StringConcatAspectBenchmark |
net472 | 407μs | 2.25μs | 17μs | 0 | 0 | 0 | 277.66 KB |
| #6930 | StringConcatBenchmark |
net6.0 | 48.9μs | 286ns | 2.27μs | 0 | 0 | 0 | 44.06 KB |
| #6930 | StringConcatBenchmark |
netcoreapp3.1 | 49.4μs | 234ns | 938ns | 0 | 0 | 0 | 43.93 KB |
| #6930 | StringConcatBenchmark |
net472 | 58.1μs | 216ns | 836ns | 0 | 0 | 0 | 65.54 KB |
| #6930 | StringConcatAspectBenchmark |
net6.0 | 453μs | 1.52μs | 5.89μs | 0 | 0 | 0 | 248.5 KB |
| #6930 | StringConcatAspectBenchmark |
netcoreapp3.1 | 524μs | 2.49μs | 9.64μs | 0 | 0 | 0 | 274.17 KB |
| #6930 | StringConcatAspectBenchmark |
net472 | 400μs | 1.99μs | 13.4μs | 0 | 0 | 0 | 278.53 KB |
Benchmarks.Trace.ILoggerBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EnrichedLog |
net6.0 | 2.52μs | 13.6ns | 70.5ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
netcoreapp3.1 | 3.47μs | 12.3ns | 47.8ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
net472 | 3.91μs | 4.06ns | 15.7ns | 0.254 | 0 | 0 | 1.64 KB |
| #6930 | EnrichedLog |
net6.0 | 2.53μs | 12ns | 47.9ns | 0 | 0 | 0 | 1.7 KB |
| #6930 | EnrichedLog |
netcoreapp3.1 | 3.43μs | 7.48ns | 28ns | 0 | 0 | 0 | 1.7 KB |
| #6930 | EnrichedLog |
net472 | 4.07μs | 3.97ns | 15.4ns | 0.242 | 0 | 0 | 1.64 KB |
Benchmarks.Trace.Log4netBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EnrichedLog |
net6.0 | 123μs | 31.3ns | 113ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
netcoreapp3.1 | 128μs | 205ns | 769ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
net472 | 168μs | 40.6ns | 157ns | 0 | 0 | 0 | 4.52 KB |
| #6930 | EnrichedLog |
net6.0 | 123μs | 78.6ns | 283ns | 0 | 0 | 0 | 4.31 KB |
| #6930 | EnrichedLog |
netcoreapp3.1 | 127μs | 185ns | 694ns | 0 | 0 | 0 | 4.31 KB |
| #6930 | EnrichedLog |
net472 | 168μs | 209ns | 781ns | 0 | 0 | 0 | 4.52 KB |
Benchmarks.Trace.NLogBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EnrichedLog |
net6.0 | 4.96μs | 16ns | 57.8ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
netcoreapp3.1 | 6.64μs | 15.1ns | 58.6ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
net472 | 7.64μs | 4.79ns | 17.9ns | 0.306 | 0 | 0 | 2.08 KB |
| #6930 | EnrichedLog |
net6.0 | 5.07μs | 5.45ns | 20.4ns | 0 | 0 | 0 | 2.26 KB |
| #6930 | EnrichedLog |
netcoreapp3.1 | 6.68μs | 10.2ns | 39.6ns | 0 | 0 | 0 | 2.26 KB |
| #6930 | EnrichedLog |
net472 | 7.72μs | 6.99ns | 27.1ns | 0.309 | 0 | 0 | 2.08 KB |
Benchmarks.Trace.RedisBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | SendReceive |
net6.0 | 1.96μs | 8.88ns | 35.5ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
netcoreapp3.1 | 2.65μs | 8.52ns | 30.7ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
net472 | 3.11μs | 2.93ns | 11ns | 0.185 | 0 | 0 | 1.2 KB |
| #6930 | SendReceive |
net6.0 | 1.98μs | 9.18ns | 36.7ns | 0 | 0 | 0 | 1.2 KB |
| #6930 | SendReceive |
netcoreapp3.1 | 2.56μs | 9.05ns | 33.9ns | 0 | 0 | 0 | 1.2 KB |
| #6930 | SendReceive |
net472 | 3.14μs | 3.09ns | 11.6ns | 0.187 | 0 | 0 | 1.2 KB |
Benchmarks.Trace.SerilogBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EnrichedLog |
net6.0 | 4.15μs | 7.6ns | 29.4ns | 0 | 0 | 0 | 1.58 KB |
| master | EnrichedLog |
netcoreapp3.1 | 5.61μs | 12ns | 44.9ns | 0 | 0 | 0 | 1.63 KB |
| master | EnrichedLog |
net472 | 6.63μs | 6.9ns | 26.7ns | 0.298 | 0 | 0 | 2.03 KB |
| #6930 | EnrichedLog |
net6.0 | 4.1μs | 5.78ns | 22.4ns | 0 | 0 | 0 | 1.58 KB |
| #6930 | EnrichedLog |
netcoreapp3.1 | 5.63μs | 16.2ns | 60.6ns | 0 | 0 | 0 | 1.63 KB |
| #6930 | EnrichedLog |
net472 | 6.71μs | 7.71ns | 29.9ns | 0.303 | 0 | 0 | 2.03 KB |
Benchmarks.Trace.SpanBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StartFinishSpan |
net6.0 | 733ns | 3.49ns | 13.5ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
netcoreapp3.1 | 945ns | 5ns | 22.4ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
net472 | 896ns | 0.431ns | 1.61ns | 0.0904 | 0 | 0 | 578 B |
| master | StartFinishScope |
net6.0 | 884ns | 4.87ns | 30.4ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
netcoreapp3.1 | 1.17μs | 5.23ns | 20.3ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
net472 | 1.1μs | 0.952ns | 3.56ns | 0.0991 | 0 | 0 | 658 B |
| #6930 | StartFinishSpan |
net6.0 | 742ns | 3.64ns | 14.5ns | 0 | 0 | 0 | 576 B |
| #6930 | StartFinishSpan |
netcoreapp3.1 | 935ns | 5.01ns | 27.9ns | 0 | 0 | 0 | 576 B |
| #6930 | StartFinishSpan |
net472 | 927ns | 0.0525ns | 0.197ns | 0.0885 | 0 | 0 | 578 B |
| #6930 | StartFinishScope |
net6.0 | 873ns | 4.5ns | 22.1ns | 0 | 0 | 0 | 696 B |
| #6930 | StartFinishScope |
netcoreapp3.1 | 1.11μs | 5.82ns | 27.9ns | 0 | 0 | 0 | 696 B |
| #6930 | StartFinishScope |
net472 | 1.15μs | 2ns | 7.74ns | 0.103 | 0 | 0 | 658 B |
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | RunOnMethodBegin |
net6.0 | 1.03μs | 5.21ns | 25ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
netcoreapp3.1 | 1.44μs | 0.341ns | 1.18ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
net472 | 1.36μs | 1.39ns | 5.39ns | 0.102 | 0 | 0 | 658 B |
| #6930 | RunOnMethodBegin |
net6.0 | 1.03μs | 5.19ns | 22ns | 0 | 0 | 0 | 696 B |
| #6930 | RunOnMethodBegin |
netcoreapp3.1 | 1.37μs | 6.78ns | 27.9ns | 0 | 0 | 0 | 696 B |
| #6930 | RunOnMethodBegin |
net472 | 1.41μs | 1.58ns | 6.13ns | 0.0987 | 0 | 0 | 658 B |
✅ Tests
🎉 All green!
❄️ No new flaky tests detected
🧪 All tests passed
🔗 Commit SHA: 9721d1f | Docs | Was this helpful? Give us feedback!
The only that bothers me (but I know it's hard to pull this) is there is no integration tests on our part 🤔 Otherwise looks good
Adding an integation test that validates which event (AllocationSamples/AllocationTick is used depending on the CLR version).