More cleanup in native loader code#7475
Conversation
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing the following branches/commits: Execution-time benchmarks measure the whole time it takes to execute a program. And are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are shown in red. The following thresholds were used for comparing the execution times:
Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard. Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph). gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7475) - mean (72ms) : 71, 73
. : milestone, 72,
master - mean (72ms) : 71, 73
. : milestone, 72,
section Baseline
This PR (7475) - mean (69ms) : 63, 75
. : milestone, 69,
master - mean (70ms) : 63, 76
. : milestone, 70,
section CallTarget+Inlining+NGEN
This PR (7475) - mean (989ms) : 961, 1018
. : milestone, 989,
master - mean (986ms) : 961, 1011
. : milestone, 986,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7475) - mean (106ms) : 105, 107
. : milestone, 106,
master - mean (106ms) : 105, 108
. : milestone, 106,
section Baseline
This PR (7475) - mean (106ms) : 103, 108
. : milestone, 106,
master - mean (106ms) : 103, 108
. : milestone, 106,
section CallTarget+Inlining+NGEN
This PR (7475) - mean (701ms) : 676, 727
. : milestone, 701,
master - mean (699ms) : 679, 719
. : milestone, 699,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7475) - mean (94ms) : 93, 95
. : milestone, 94,
master - mean (94ms) : 93, 95
. : milestone, 94,
section Baseline
This PR (7475) - mean (93ms) : 91, 95
. : milestone, 93,
master - mean (93ms) : 91, 95
. : milestone, 93,
section CallTarget+Inlining+NGEN
This PR (7475) - mean (657ms) : 637, 678
. : milestone, 657,
master - mean (656ms) : 637, 674
. : milestone, 656,
gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7475) - mean (93ms) : 92, 94
. : milestone, 93,
master - mean (93ms) : 92, 94
. : milestone, 93,
section Baseline
This PR (7475) - mean (92ms) : 90, 94
. : milestone, 92,
master - mean (92ms) : 90, 94
. : milestone, 92,
section CallTarget+Inlining+NGEN
This PR (7475) - mean (590ms) : 579, 601
. : milestone, 590,
master - mean (597ms) : 584, 610
. : milestone, 597,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7475) - mean (188ms) : 180, 196
. : milestone, 188,
master - mean (189ms) : 181, 197
. : milestone, 189,
section Baseline
This PR (7475) - mean (185ms) : 177, 194
. : milestone, 185,
master - mean (185ms) : 177, 193
. : milestone, 185,
section CallTarget+Inlining+NGEN
This PR (7475) - mean (1,068ms) : 1039, 1097
. : milestone, 1068,
master - mean (1,077ms) : 1036, 1117
. : milestone, 1077,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7475) - mean (269ms) : 261, 277
. : milestone, 269,
master - mean (269ms) : 261, 277
. : milestone, 269,
section Baseline
This PR (7475) - mean (269ms) : 257, 280
. : milestone, 269,
master - mean (268ms) : 257, 279
. : milestone, 268,
section CallTarget+Inlining+NGEN
This PR (7475) - mean (878ms) : 831, 926
. : milestone, 878,
master - mean (872ms) : 834, 911
. : milestone, 872,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7475) - mean (260ms) : 251, 268
. : milestone, 260,
master - mean (259ms) : 251, 266
. : milestone, 259,
section Baseline
This PR (7475) - mean (259ms) : 250, 267
. : milestone, 259,
master - mean (261ms) : 255, 267
. : milestone, 261,
section CallTarget+Inlining+NGEN
This PR (7475) - mean (856ms) : 826, 886
. : milestone, 856,
master - mean (854ms) : 812, 897
. : milestone, 854,
gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7475) - mean (260ms) : 251, 269
. : milestone, 260,
master - mean (261ms) : 252, 270
. : milestone, 261,
section Baseline
This PR (7475) - mean (260ms) : 252, 268
. : milestone, 260,
master - mean (258ms) : 249, 268
. : milestone, 258,
section CallTarget+Inlining+NGEN
This PR (7475) - mean (768ms) : 739, 797
. : milestone, 768,
master - mean (770ms) : 740, 801
. : milestone, 770,
|
4cc04cd to
d958ee8
Compare
BenchmarksBenchmarks Report for benchmark platform 🐌Benchmarks for #7475 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 ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Asm.AppSecWafBenchmark - Slower
|
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1 | 2.473 | 300,467.07 | 743,078.66 | |
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑netcoreapp3.1 | 2.072 | 415,018.75 | 859,782.00 |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | RunWafRealisticBenchmark |
net6.0 | 394μs | 294ns | 1.06μs | 0 | 0 | 0 | 4.55 KB |
| master | RunWafRealisticBenchmark |
netcoreapp3.1 | 415μs | 376ns | 1.46μs | 0 | 0 | 0 | 4.48 KB |
| master | RunWafRealisticBenchmark |
net472 | 434μs | 84.1ns | 326ns | 0 | 0 | 0 | 4.66 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net6.0 | 290μs | 112ns | 418ns | 0 | 0 | 0 | 2.24 KB |
| master | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 301μs | 140ns | 522ns | 0 | 0 | 0 | 2.22 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net472 | 312μs | 91.1ns | 341ns | 0 | 0 | 0 | 2.29 KB |
| #7475 | RunWafRealisticBenchmark |
net6.0 | 392μs | 62.7ns | 243ns | 0 | 0 | 0 | 4.55 KB |
| #7475 | RunWafRealisticBenchmark |
netcoreapp3.1 | 817μs | 10.1μs | 101μs | 0 | 0 | 0 | 4.48 KB |
| #7475 | RunWafRealisticBenchmark |
net472 | 433μs | 74ns | 287ns | 0 | 0 | 0 | 4.66 KB |
| #7475 | RunWafRealisticBenchmarkWithAttack |
net6.0 | 291μs | 80.6ns | 312ns | 0 | 0 | 0 | 2.24 KB |
| #7475 | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 674μs | 14.9μs | 148μs | 0 | 0 | 0 | 2.22 KB |
| #7475 | RunWafRealisticBenchmarkWithAttack |
net472 | 313μs | 47.8ns | 185ns | 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 | 62μs | 292ns | 1.13μs | 0 | 0 | 0 | 14.52 KB |
| master | SendRequest |
netcoreapp3.1 | 71.5μs | 52.2ns | 202ns | 0 | 0 | 0 | 17.42 KB |
| master | SendRequest |
net472 | 0.0138ns | 0.00141ns | 0.00546ns | 0 | 0 | 0 | 0 b |
| #7475 | SendRequest |
net6.0 | 60.9μs | 31.4ns | 113ns | 0 | 0 | 0 | 14.52 KB |
| #7475 | SendRequest |
netcoreapp3.1 | 70.7μs | 217ns | 783ns | 0 | 0 | 0 | 17.47 KB |
| #7475 | SendRequest |
net472 | 0.0224ns | 0.00126ns | 0.00472ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CharSliceBenchmark - Faster 🎉 More allocations ⚠️
Faster 🎉 in #7475
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑netcoreapp3.1
1.204
2,068,445.83
1,717,497.50
Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice‑netcoreapp3.1
1.195
2,466,977.08
2,063,678.12
More allocations ⚠️ in #7475
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1
0 b
1 B
1 B
∞
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0
5 B
7 B
2 B
40.00%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0
3 B
4 B
1 B
33.33%
Fewer allocations 🎉 in #7475
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net472
73 B
0 b
-73 B
-100.00%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472
47 B
0 b
-47 B
-100.00%
| Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑netcoreapp3.1 | 1.204 | 2,068,445.83 | 1,717,497.50 | |
| Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice‑netcoreapp3.1 | 1.195 | 2,466,977.08 | 2,063,678.12 |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1 | 0 b | 1 B | 1 B | ∞ |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 | 5 B | 7 B | 2 B | 40.00% |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0 | 3 B | 4 B | 1 B | 33.33% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net472 | 73 B | 0 b | -73 B | -100.00% |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472 | 47 B | 0 b | -47 B | -100.00% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | OriginalCharSlice |
net6.0 | 1.92ms | 5.86μs | 22.7μs | 0 | 0 | 0 | 640.01 KB |
| master | OriginalCharSlice |
netcoreapp3.1 | 2.46ms | 6.72μs | 26μs | 0 | 0 | 0 | 640.11 KB |
| master | OriginalCharSlice |
net472 | 2.72ms | 201ns | 751ns | 100 | 0 | 0 | 641.95 KB |
| master | OptimizedCharSlice |
net6.0 | 1.41ms | 181ns | 701ns | 0 | 0 | 0 | 5 B |
| master | OptimizedCharSlice |
netcoreapp3.1 | 2.07ms | 409ns | 1.59μs | 0 | 0 | 0 | 1 B |
| master | OptimizedCharSlice |
net472 | 1.99ms | 104ns | 405ns | 0 | 0 | 0 | 73 B |
| master | OptimizedCharSliceWithPool |
net6.0 | 801μs | 14ns | 50.5ns | 0 | 0 | 0 | 3 B |
| master | OptimizedCharSliceWithPool |
netcoreapp3.1 | 832μs | 41.2ns | 160ns | 0 | 0 | 0 | 0 b |
| master | OptimizedCharSliceWithPool |
net472 | 1.14ms | 451ns | 1.69μs | 0 | 0 | 0 | 47 B |
| #7475 | OriginalCharSlice |
net6.0 | 1.93ms | 544ns | 1.96μs | 0 | 0 | 0 | 640.01 KB |
| #7475 | OriginalCharSlice |
netcoreapp3.1 | 2.06ms | 4.25μs | 16.5μs | 0 | 0 | 0 | 640 KB |
| #7475 | OriginalCharSlice |
net472 | 2.61ms | 154ns | 596ns | 100 | 0 | 0 | 641.95 KB |
| #7475 | OptimizedCharSlice |
net6.0 | 1.38ms | 603ns | 2.33μs | 0 | 0 | 0 | 7 B |
| #7475 | OptimizedCharSlice |
netcoreapp3.1 | 1.72ms | 130ns | 502ns | 0 | 0 | 0 | 1 B |
| #7475 | OptimizedCharSlice |
net472 | 1.93ms | 148ns | 573ns | 0 | 0 | 0 | 0 b |
| #7475 | OptimizedCharSliceWithPool |
net6.0 | 804μs | 26.8ns | 100ns | 0 | 0 | 0 | 4 B |
| #7475 | OptimizedCharSliceWithPool |
netcoreapp3.1 | 815μs | 211ns | 815ns | 0 | 0 | 0 | 1 B |
| #7475 | OptimizedCharSliceWithPool |
net472 | 1.14ms | 113ns | 409ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7475
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1
41.82 KB
42.35 KB
530 B
1.27%
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0
41.9 KB
42.29 KB
388 B
0.93%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 | 41.82 KB | 42.35 KB | 530 B | 1.27% |
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 | 41.9 KB | 42.29 KB | 388 B | 0.93% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 682μs | 3.9μs | 28.1μs | 0 | 0 | 0 | 41.9 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 687μs | 3.04μs | 11.8μs | 0 | 0 | 0 | 41.82 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 867μs | 2.7μs | 9.73μs | 8.33 | 0 | 0 | 56.15 KB |
| #7475 | WriteAndFlushEnrichedTraces |
net6.0 | 679μs | 3.97μs | 36.2μs | 0 | 0 | 0 | 42.29 KB |
| #7475 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 640μs | 599ns | 2.24μs | 0 | 0 | 0 | 42.35 KB |
| #7475 | WriteAndFlushEnrichedTraces |
net472 | 908μs | 4.99μs | 30.8μs | 8.33 | 0 | 0 | 56.25 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.9μs | 8.21ns | 31.8ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
netcoreapp3.1 | 2.46μs | 7.98ns | 27.6ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
net472 | 2.87μs | 6.03ns | 23.4ns | 0.156 | 0.0141 | 0 | 987 B |
| #7475 | ExecuteNonQuery |
net6.0 | 1.89μs | 9.05ns | 37.3ns | 0 | 0 | 0 | 1.02 KB |
| #7475 | ExecuteNonQuery |
netcoreapp3.1 | 2.55μs | 8.59ns | 33.3ns | 0 | 0 | 0 | 1.02 KB |
| #7475 | ExecuteNonQuery |
net472 | 2.74μs | 2.49ns | 8.97ns | 0.151 | 0.0137 | 0 | 987 B |
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | CallElasticsearch |
net6.0 | 1.69μs | 1.26ns | 4.89ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
netcoreapp3.1 | 2.24μs | 7.46ns | 28.9ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
net472 | 3.63μs | 6.99ns | 27.1ns | 0.162 | 0 | 0 | 1.04 KB |
| master | CallElasticsearchAsync |
net6.0 | 1.79μs | 1.24ns | 4.79ns | 0 | 0 | 0 | 1.01 KB |
| master | CallElasticsearchAsync |
netcoreapp3.1 | 2.41μs | 5.22ns | 20.2ns | 0 | 0 | 0 | 1.08 KB |
| master | CallElasticsearchAsync |
net472 | 3.74μs | 3.08ns | 11.9ns | 0.168 | 0 | 0 | 1.1 KB |
| #7475 | CallElasticsearch |
net6.0 | 1.74μs | 8.39ns | 35.6ns | 0 | 0 | 0 | 1.03 KB |
| #7475 | CallElasticsearch |
netcoreapp3.1 | 2.25μs | 1.02ns | 3.83ns | 0 | 0 | 0 | 1.03 KB |
| #7475 | CallElasticsearch |
net472 | 3.57μs | 6.59ns | 25.5ns | 0.16 | 0 | 0 | 1.04 KB |
| #7475 | CallElasticsearchAsync |
net6.0 | 1.93μs | 1.44ns | 5.56ns | 0 | 0 | 0 | 1.01 KB |
| #7475 | CallElasticsearchAsync |
netcoreapp3.1 | 2.31μs | 12ns | 56.4ns | 0 | 0 | 0 | 1.08 KB |
| #7475 | CallElasticsearchAsync |
net472 | 3.84μs | 5.01ns | 19.4ns | 0.172 | 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.88μs | 6.92ns | 25.9ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
netcoreapp3.1 | 2.36μs | 12.1ns | 53.9ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
net472 | 2.59μs | 4.64ns | 18ns | 0.144 | 0 | 0 | 915 B |
| #7475 | ExecuteAsync |
net6.0 | 1.84μs | 7.3ns | 28.3ns | 0 | 0 | 0 | 952 B |
| #7475 | ExecuteAsync |
netcoreapp3.1 | 2.25μs | 5.97ns | 22.3ns | 0 | 0 | 0 | 952 B |
| #7475 | ExecuteAsync |
net472 | 2.48μs | 10.3ns | 39.9ns | 0.136 | 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.93μs | 6.2ns | 21.5ns | 0 | 0 | 0 | 2.36 KB |
| master | SendAsync |
netcoreapp3.1 | 8.77μs | 11.5ns | 44.5ns | 0 | 0 | 0 | 2.9 KB |
| master | SendAsync |
net472 | 12.5μs | 10.5ns | 40.6ns | 0.496 | 0 | 0 | 3.18 KB |
| #7475 | SendAsync |
net6.0 | 6.98μs | 11.3ns | 43.9ns | 0 | 0 | 0 | 2.36 KB |
| #7475 | SendAsync |
netcoreapp3.1 | 8.36μs | 23.6ns | 91.6ns | 0 | 0 | 0 | 2.9 KB |
| #7475 | SendAsync |
net472 | 12.3μs | 11.8ns | 45.6ns | 0.493 | 0 | 0 | 3.18 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Slower ⚠️ More allocations ⚠️
Slower ⚠️ in #7475
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1
1.261
49,850.00
62,850.00
several?
More allocations ⚠️ in #7475
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0
43.1 KB
47.66 KB
4.56 KB
10.58%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
255.09 KB
275.73 KB
20.64 KB
8.09%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0
259.59 KB
274.81 KB
15.22 KB
5.86%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472
278.53 KB
286.72 KB
8.19 KB
2.94%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1
42.91 KB
43.14 KB
224 B
0.52%
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1 | 1.261 | 49,850.00 | 62,850.00 | several? |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 | 43.1 KB | 47.66 KB | 4.56 KB | 10.58% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 | 255.09 KB | 275.73 KB | 20.64 KB | 8.09% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 | 259.59 KB | 274.81 KB | 15.22 KB | 5.86% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 | 278.53 KB | 286.72 KB | 8.19 KB | 2.94% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1 | 42.91 KB | 43.14 KB | 224 B | 0.52% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StringConcatBenchmark |
net6.0 | 42.9μs | 241ns | 1.94μs | 0 | 0 | 0 | 43.1 KB |
| master | StringConcatBenchmark |
netcoreapp3.1 | 51.8μs | 475ns | 4.65μs | 0 | 0 | 0 | 42.91 KB |
| master | StringConcatBenchmark |
net472 | 57.1μs | 222ns | 800ns | 0 | 0 | 0 | 65.54 KB |
| master | StringConcatAspectBenchmark |
net6.0 | 465μs | 1.45μs | 5.62μs | 0 | 0 | 0 | 259.59 KB |
| master | StringConcatAspectBenchmark |
netcoreapp3.1 | 487μs | 2.27μs | 9.38μs | 0 | 0 | 0 | 255.09 KB |
| master | StringConcatAspectBenchmark |
net472 | 408μs | 2.29μs | 14.6μs | 0 | 0 | 0 | 278.53 KB |
| #7475 | StringConcatBenchmark |
net6.0 | 44.7μs | 254ns | 2.15μs | 0 | 0 | 0 | 47.66 KB |
| #7475 | StringConcatBenchmark |
netcoreapp3.1 | 59.8μs | 715ns | 7.08μs | 0 | 0 | 0 | 43.14 KB |
| #7475 | StringConcatBenchmark |
net472 | 57.6μs | 185ns | 665ns | 0 | 0 | 0 | 65.54 KB |
| #7475 | StringConcatAspectBenchmark |
net6.0 | 488μs | 2.22μs | 8μs | 0 | 0 | 0 | 274.81 KB |
| #7475 | StringConcatAspectBenchmark |
netcoreapp3.1 | 477μs | 5.82μs | 57.6μs | 0 | 0 | 0 | 275.73 KB |
| #7475 | StringConcatAspectBenchmark |
net472 | 406μs | 2.05μs | 8.93μs | 0 | 0 | 0 | 286.72 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.57μs | 14ns | 79.1ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
netcoreapp3.1 | 3.47μs | 10.7ns | 41.4ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
net472 | 4.23μs | 4.47ns | 17.3ns | 0.253 | 0 | 0 | 1.64 KB |
| #7475 | EnrichedLog |
net6.0 | 2.53μs | 12.7ns | 55.5ns | 0 | 0 | 0 | 1.7 KB |
| #7475 | EnrichedLog |
netcoreapp3.1 | 3.32μs | 16.5ns | 70.2ns | 0 | 0 | 0 | 1.7 KB |
| #7475 | EnrichedLog |
net472 | 3.91μs | 2.32ns | 8.99ns | 0.254 | 0 | 0 | 1.64 KB |
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EnrichedLog |
net6.0 | 123μs | 100ns | 374ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
netcoreapp3.1 | 127μs | 234ns | 877ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
net472 | 165μs | 21.8ns | 78.6ns | 0 | 0 | 0 | 4.51 KB |
| #7475 | EnrichedLog |
net6.0 | 122μs | 30.8ns | 115ns | 0 | 0 | 0 | 4.31 KB |
| #7475 | EnrichedLog |
netcoreapp3.1 | 128μs | 397ns | 1.54μs | 0 | 0 | 0 | 4.31 KB |
| #7475 | EnrichedLog |
net472 | 167μs | 36ns | 139ns | 0 | 0 | 0 | 4.52 KB |
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EnrichedLog |
net6.0 | 4.96μs | 23.6ns | 91.3ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
netcoreapp3.1 | 6.75μs | 11.8ns | 44.3ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
net472 | 7.53μs | 9.06ns | 35.1ns | 0.298 | 0 | 0 | 2.08 KB |
| #7475 | EnrichedLog |
net6.0 | 5.08μs | 18ns | 64.8ns | 0 | 0 | 0 | 2.26 KB |
| #7475 | EnrichedLog |
netcoreapp3.1 | 6.73μs | 13.1ns | 50.6ns | 0 | 0 | 0 | 2.26 KB |
| #7475 | EnrichedLog |
net472 | 7.32μs | 4.17ns | 15.6ns | 0.33 | 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μs | 9.98ns | 45.7ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
netcoreapp3.1 | 2.55μs | 11.7ns | 45.3ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
net472 | 3.17μs | 2.33ns | 8.39ns | 0.187 | 0 | 0 | 1.2 KB |
| #7475 | SendReceive |
net6.0 | 1.94μs | 0.611ns | 2.29ns | 0 | 0 | 0 | 1.2 KB |
| #7475 | SendReceive |
netcoreapp3.1 | 2.76μs | 12.7ns | 49.2ns | 0 | 0 | 0 | 1.2 KB |
| #7475 | SendReceive |
net472 | 3.09μs | 5.87ns | 22.7ns | 0.186 | 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.22μs | 14.9ns | 57.9ns | 0 | 0 | 0 | 1.58 KB |
| master | EnrichedLog |
netcoreapp3.1 | 5.53μs | 7.87ns | 30.5ns | 0 | 0 | 0 | 1.63 KB |
| master | EnrichedLog |
net472 | 6.86μs | 11.2ns | 43.4ns | 0.308 | 0 | 0 | 2.03 KB |
| #7475 | EnrichedLog |
net6.0 | 4.13μs | 2.41ns | 9.03ns | 0 | 0 | 0 | 1.58 KB |
| #7475 | EnrichedLog |
netcoreapp3.1 | 5.59μs | 10.5ns | 40.6ns | 0 | 0 | 0 | 1.63 KB |
| #7475 | EnrichedLog |
net472 | 6.59μs | 6.12ns | 23.7ns | 0.295 | 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 | 760ns | 0.166ns | 0.644ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
netcoreapp3.1 | 961ns | 5.24ns | 25.7ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
net472 | 895ns | 0.0206ns | 0.0742ns | 0.09 | 0 | 0 | 578 B |
| master | StartFinishScope |
net6.0 | 869ns | 4.79ns | 29.1ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
netcoreapp3.1 | 1.19μs | 0.544ns | 2.11ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
net472 | 1.08μs | 0.0897ns | 0.324ns | 0.103 | 0 | 0 | 658 B |
| #7475 | StartFinishSpan |
net6.0 | 744ns | 0.414ns | 1.6ns | 0 | 0 | 0 | 576 B |
| #7475 | StartFinishSpan |
netcoreapp3.1 | 933ns | 4.27ns | 17.1ns | 0 | 0 | 0 | 576 B |
| #7475 | StartFinishSpan |
net472 | 895ns | 0.136ns | 0.473ns | 0.0898 | 0 | 0 | 578 B |
| #7475 | StartFinishScope |
net6.0 | 880ns | 4.11ns | 16.5ns | 0 | 0 | 0 | 696 B |
| #7475 | StartFinishScope |
netcoreapp3.1 | 1.11μs | 5.99ns | 31.7ns | 0 | 0 | 0 | 696 B |
| #7475 | StartFinishScope |
net472 | 1.09μs | 0.0767ns | 0.277ns | 0.104 | 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.02μs | 0.524ns | 2.03ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
netcoreapp3.1 | 1.33μs | 5.91ns | 22.1ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
net472 | 1.37μs | 0.187ns | 0.699ns | 0.103 | 0 | 0 | 658 B |
| #7475 | RunOnMethodBegin |
net6.0 | 1.01μs | 5.01ns | 20.7ns | 0 | 0 | 0 | 696 B |
| #7475 | RunOnMethodBegin |
netcoreapp3.1 | 1.35μs | 1.14ns | 4.43ns | 0 | 0 | 0 | 696 B |
| #7475 | RunOnMethodBegin |
net472 | 1.39μs | 0.717ns | 2.78ns | 0.0983 | 0 | 0 | 658 B |
| inline static const shared::WSTRING include_process_names = WStr("DD_PROFILER_PROCESSES"); | ||
| inline static const shared::WSTRING exclude_process_names = WStr("DD_PROFILER_EXCLUDE_PROCESSES"); |
There was a problem hiding this comment.
Not for this PR, but we should consider renaming these two env vars to remove PROFILER from their names (while keeping backwards support for the old names). Something like:
DD_PROFILER_PROCESSES -> DD_INCLUDE_PROCESS_NAMES
DD_PROFILER_EXCLUDE_PROCESSES -> DD_EXCLUDE_PROCESS_NAMES
There was a problem hiding this comment.
Yeah, while I totally agree in principal, this is very low down on the priority list (as I think you'd agree) given it's essentially an undocumented feature too. It would also be the first and only case of supporting "fallbacks" on the native-side I think
| // Note that you should also consider adding to the SSI tracer/build/artifacts/requirements.json file | ||
| // FIXME: this should also take into account case insensitivity, but that is not yet supported | ||
| // https://devblogs.microsoft.com/oldnewthing/20241007-00/?p=110345 | ||
| const shared::WSTRING default_exclude_assemblies[]{ |
There was a problem hiding this comment.
(commenting here because the new UI doesn't support file-level comments)
Should we rename this file to remove "profiler" from the name? Maybe constants.h?
There was a problem hiding this comment.
Yeah, why not I guess 😄
There was a problem hiding this comment.
But given this touches like 30 files, I'll defer to a different PR 😅
lucaspimentel
left a comment
There was a problem hiding this comment.
I love cleanups, thanks!
Co-authored-by: Lucas Pimentel <lucas.pimentel@datadoghq.com>
9fc398b to
6879900
Compare
Summary of changes
createdumpto the exclude listReason for change
Various minor things that have been bugging me for a while.
Implementation details
default_exclude_assembliesfrom the native tracer as it's no longer used (after [Crashtracker] Add module path to frames #7642)default_exclude_assembliestodefault_exclude_processesas it was named incorrectly!util.hinto theEnvironmentVariablestype that's designed for this (and remove duplicates)EnvironmentVariables.htoenvironment.hfor consistency with the majoring of the native loader code + native tracer. Use snake casing instead of PascalCasingutil.hintoconstants.hto avoid cluttering itcreatedumpto the process exclude list (I noticed we apparently instrument thecreatedumpcalls themselves in our CI!)Test coverage
Covered by existing
Other details
Commit-by-commit review is easiest, as they're all small self-contained updates!