Refactor the profiling configuration reading#7303
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 (7303) - mean (72ms) : 70, 73
. : milestone, 72,
master - mean (72ms) : 70, 73
. : milestone, 72,
section Baseline
This PR (7303) - mean (68ms) : 66, 70
. : milestone, 68,
master - mean (69ms) : 64, 73
. : milestone, 69,
section CallTarget+Inlining+NGEN
This PR (7303) - mean (1,049ms) : 1030, 1067
. : milestone, 1049,
master - mean (1,045ms) : 1021, 1070
. : milestone, 1045,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7303) - mean (106ms) : 105, 107
. : milestone, 106,
master - mean (106ms) : 105, 108
. : milestone, 106,
section Baseline
This PR (7303) - mean (106ms) : 103, 108
. : milestone, 106,
master - mean (106ms) : 103, 109
. : milestone, 106,
section CallTarget+Inlining+NGEN
This PR (7303) - mean (727ms) : 713, 741
. : milestone, 727,
master - mean (731ms) : 713, 749
. : milestone, 731,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7303) - mean (95ms) : 93, 97
. : milestone, 95,
master - mean (94ms) : 93, 96
. : milestone, 94,
section Baseline
This PR (7303) - mean (94ms) : 92, 96
. : milestone, 94,
master - mean (93ms) : 91, 96
. : milestone, 93,
section CallTarget+Inlining+NGEN
This PR (7303) - mean (687ms) : 665, 709
. : milestone, 687,
master - mean (691ms) : 669, 712
. : milestone, 691,
gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7303) - mean (93ms) : 92, 94
. : milestone, 93,
master - mean (93ms) : 92, 94
. : milestone, 93,
section Baseline
This PR (7303) - mean (93ms) : 90, 95
. : milestone, 93,
master - mean (93ms) : 90, 95
. : milestone, 93,
section CallTarget+Inlining+NGEN
This PR (7303) - mean (620ms) : 609, 632
. : milestone, 620,
master - mean (626ms) : 614, 638
. : milestone, 626,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7303) - mean (192ms) : 185, 199
. : milestone, 192,
master - mean (192ms) : 183, 201
. : milestone, 192,
section Baseline
This PR (7303) - mean (191ms) : 180, 202
. : milestone, 191,
master - mean (190ms) : 182, 198
. : milestone, 190,
section CallTarget+Inlining+NGEN
This PR (7303) - mean (1,149ms) : 1118, 1180
. : milestone, 1149,
master - mean (1,145ms) : 1114, 1176
. : milestone, 1145,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7303) - mean (274ms) : 266, 282
. : milestone, 274,
master - mean (274ms) : 263, 284
. : milestone, 274,
section Baseline
This PR (7303) - mean (274ms) : 263, 286
. : milestone, 274,
master - mean (274ms) : 262, 286
. : milestone, 274,
section CallTarget+Inlining+NGEN
This PR (7303) - mean (916ms) : 886, 945
. : milestone, 916,
master - mean (922ms) : 893, 951
. : milestone, 922,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7303) - mean (268ms) : 259, 276
. : milestone, 268,
master - mean (269ms) : 260, 279
. : milestone, 269,
section Baseline
This PR (7303) - mean (266ms) : 256, 276
. : milestone, 266,
master - mean (267ms) : 259, 275
. : milestone, 267,
section CallTarget+Inlining+NGEN
This PR (7303) - mean (902ms) : 869, 934
. : milestone, 902,
master - mean (912ms) : 880, 945
. : milestone, 912,
gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7303) - mean (269ms) : 260, 278
. : milestone, 269,
master - mean (267ms) : 258, 276
. : milestone, 267,
section Baseline
This PR (7303) - mean (266ms) : 256, 276
. : milestone, 266,
master - mean (267ms) : 257, 276
. : milestone, 267,
section CallTarget+Inlining+NGEN
This PR (7303) - mean (813ms) : 785, 840
. : milestone, 813,
master - mean (812ms) : 793, 831
. : milestone, 812,
|
BenchmarksBenchmarks Report for benchmark platform 🐌Benchmarks for #7303 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 - Faster 🎉 Same allocations ✔️
|
| Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑netcoreapp3.1 | 2.079 | 857,550.54 | 412,544.94 |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | RunWafRealisticBenchmark |
net6.0 | 395μs | 143ns | 536ns | 0 | 0 | 0 | 4.55 KB |
| master | RunWafRealisticBenchmark |
netcoreapp3.1 | 804μs | 14.3μs | 143μs | 0 | 0 | 0 | 4.48 KB |
| master | RunWafRealisticBenchmark |
net472 | 432μs | 107ns | 416ns | 0 | 0 | 0 | 4.68 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net6.0 | 293μs | 85.8ns | 332ns | 0 | 0 | 0 | 2.24 KB |
| master | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 304μs | 82.6ns | 320ns | 0 | 0 | 0 | 2.22 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net472 | 313μs | 73.4ns | 284ns | 0 | 0 | 0 | 2.29 KB |
| #7303 | RunWafRealisticBenchmark |
net6.0 | 395μs | 66.6ns | 240ns | 0 | 0 | 0 | 4.56 KB |
| #7303 | RunWafRealisticBenchmark |
netcoreapp3.1 | 413μs | 68.7ns | 248ns | 0 | 0 | 0 | 4.48 KB |
| #7303 | RunWafRealisticBenchmark |
net472 | 432μs | 77.7ns | 301ns | 0 | 0 | 0 | 4.66 KB |
| #7303 | RunWafRealisticBenchmarkWithAttack |
net6.0 | 289μs | 111ns | 428ns | 0 | 0 | 0 | 2.24 KB |
| #7303 | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 301μs | 305ns | 1.14μs | 0 | 0 | 0 | 2.22 KB |
| #7303 | RunWafRealisticBenchmarkWithAttack |
net472 | 312μs | 35.4ns | 128ns | 0 | 0 | 0 | 2.29 KB |
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | SendRequest |
net6.0 | 60.9μs | 83ns | 311ns | 0 | 0 | 0 | 14.52 KB |
| master | SendRequest |
netcoreapp3.1 | 70.9μs | 108ns | 388ns | 0 | 0 | 0 | 17.42 KB |
| master | SendRequest |
net472 | 0.0116ns | 0.00212ns | 0.0082ns | 0 | 0 | 0 | 0 b |
| #7303 | SendRequest |
net6.0 | 60.5μs | 68.3ns | 246ns | 0 | 0 | 0 | 14.52 KB |
| #7303 | SendRequest |
netcoreapp3.1 | 71.7μs | 75.1ns | 271ns | 0 | 0 | 0 | 17.42 KB |
| #7303 | SendRequest |
net472 | 0.0239ns | 0.00126ns | 0.00472ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CharSliceBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7303
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net472
0 b
73 B
73 B
∞
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1
0 b
1 B
1 B
∞
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472
0 b
47 B
47 B
∞
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0
4 B
7 B
3 B
75.00%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net472 | 0 b | 73 B | 73 B | ∞ |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1 | 0 b | 1 B | 1 B | ∞ |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472 | 0 b | 47 B | 47 B | ∞ |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 | 4 B | 7 B | 3 B | 75.00% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | OriginalCharSlice |
net6.0 | 2.02ms | 3.2μs | 12μs | 0 | 0 | 0 | 640.01 KB |
| master | OriginalCharSlice |
netcoreapp3.1 | 2.1ms | 8.22μs | 30.8μs | 0 | 0 | 0 | 640 KB |
| master | OriginalCharSlice |
net472 | 2.68ms | 638ns | 2.39μs | 100 | 0 | 0 | 641.95 KB |
| master | OptimizedCharSlice |
net6.0 | 1.39ms | 572ns | 2.22μs | 0 | 0 | 0 | 4 B |
| master | OptimizedCharSlice |
netcoreapp3.1 | 1.72ms | 420ns | 1.63μs | 0 | 0 | 0 | 1 B |
| master | OptimizedCharSlice |
net472 | 1.94ms | 362ns | 1.4μs | 0 | 0 | 0 | 0 b |
| master | OptimizedCharSliceWithPool |
net6.0 | 795μs | 40.8ns | 153ns | 0 | 0 | 0 | 2 B |
| master | OptimizedCharSliceWithPool |
netcoreapp3.1 | 861μs | 47.8ns | 185ns | 0 | 0 | 0 | 0 b |
| master | OptimizedCharSliceWithPool |
net472 | 1.16ms | 39.8ns | 149ns | 0 | 0 | 0 | 0 b |
| #7303 | OriginalCharSlice |
net6.0 | 1.86ms | 4.83μs | 18.7μs | 0 | 0 | 0 | 640.01 KB |
| #7303 | OriginalCharSlice |
netcoreapp3.1 | 2.11ms | 4.13μs | 14.3μs | 0 | 0 | 0 | 640 KB |
| #7303 | OriginalCharSlice |
net472 | 2.7ms | 2.95μs | 11.4μs | 100 | 0 | 0 | 641.95 KB |
| #7303 | OptimizedCharSlice |
net6.0 | 1.38ms | 947ns | 3.67μs | 0 | 0 | 0 | 7 B |
| #7303 | OptimizedCharSlice |
netcoreapp3.1 | 1.75ms | 245ns | 951ns | 0 | 0 | 0 | 1 B |
| #7303 | OptimizedCharSlice |
net472 | 1.94ms | 613ns | 2.37μs | 0 | 0 | 0 | 73 B |
| #7303 | OptimizedCharSliceWithPool |
net6.0 | 804μs | 114ns | 440ns | 0 | 0 | 0 | 2 B |
| #7303 | OptimizedCharSliceWithPool |
netcoreapp3.1 | 832μs | 154ns | 595ns | 0 | 0 | 0 | 1 B |
| #7303 | OptimizedCharSliceWithPool |
net472 | 1.14ms | 159ns | 614ns | 0 | 0 | 0 | 47 B |
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Faster 🎉 Fewer allocations 🎉
Faster 🎉 in #7303
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0
1.131
761,945.62
673,543.75
several?
Fewer allocations 🎉 in #7303
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472
56.25 KB
55.65 KB
-603 B
-1.07%
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0
42.44 KB
41.67 KB
-769 B
-1.81%
| Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 | 1.131 | 761,945.62 | 673,543.75 | several? |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 | 56.25 KB | 55.65 KB | -603 B | -1.07% |
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 | 42.44 KB | 41.67 KB | -769 B | -1.81% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 767μs | 4.15μs | 21.9μs | 0 | 0 | 0 | 42.44 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 720μs | 3.88μs | 22.3μs | 0 | 0 | 0 | 41.97 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 946μs | 3.49μs | 13.5μs | 8.33 | 0 | 0 | 56.25 KB |
| #7303 | WriteAndFlushEnrichedTraces |
net6.0 | 682μs | 3.51μs | 17.5μs | 0 | 0 | 0 | 41.67 KB |
| #7303 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 694μs | 3.65μs | 20.3μs | 0 | 0 | 0 | 42.14 KB |
| #7303 | WriteAndFlushEnrichedTraces |
net472 | 919μs | 3.12μs | 11.7μs | 4.46 | 0 | 0 | 55.65 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 | 2.03μs | 10.1ns | 45.3ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
netcoreapp3.1 | 2.51μs | 8.29ns | 32.1ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
net472 | 2.78μs | 4.7ns | 18.2ns | 0.152 | 0.0138 | 0 | 987 B |
| #7303 | ExecuteNonQuery |
net6.0 | 1.92μs | 9.4ns | 37.6ns | 0 | 0 | 0 | 1.02 KB |
| #7303 | ExecuteNonQuery |
netcoreapp3.1 | 2.46μs | 5.83ns | 22.6ns | 0 | 0 | 0 | 1.02 KB |
| #7303 | ExecuteNonQuery |
net472 | 2.81μs | 5.78ns | 22.4ns | 0.154 | 0.014 | 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.77μs | 8.69ns | 36.9ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
netcoreapp3.1 | 2.38μs | 5.97ns | 23.1ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
net472 | 3.48μs | 2.04ns | 7.9ns | 0.156 | 0 | 0 | 1.04 KB |
| master | CallElasticsearchAsync |
net6.0 | 1.84μs | 8.09ns | 31.3ns | 0 | 0 | 0 | 1.01 KB |
| master | CallElasticsearchAsync |
netcoreapp3.1 | 2.42μs | 11.3ns | 42.4ns | 0 | 0 | 0 | 1.08 KB |
| master | CallElasticsearchAsync |
net472 | 3.61μs | 2.4ns | 9.29ns | 0.162 | 0 | 0 | 1.1 KB |
| #7303 | CallElasticsearch |
net6.0 | 1.76μs | 1.86ns | 7.19ns | 0 | 0 | 0 | 1.03 KB |
| #7303 | CallElasticsearch |
netcoreapp3.1 | 2.4μs | 8.62ns | 33.4ns | 0 | 0 | 0 | 1.03 KB |
| #7303 | CallElasticsearch |
net472 | 3.6μs | 6.31ns | 24.4ns | 0.162 | 0 | 0 | 1.04 KB |
| #7303 | CallElasticsearchAsync |
net6.0 | 1.8μs | 8.73ns | 37ns | 0 | 0 | 0 | 1.01 KB |
| #7303 | CallElasticsearchAsync |
netcoreapp3.1 | 2.5μs | 7.37ns | 28.6ns | 0 | 0 | 0 | 1.08 KB |
| #7303 | CallElasticsearchAsync |
net472 | 3.79μs | 3.1ns | 12ns | 0.171 | 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.86μs | 4.66ns | 18ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
netcoreapp3.1 | 2.32μs | 3.76ns | 14.1ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
net472 | 2.55μs | 2.81ns | 10.9ns | 0.14 | 0 | 0 | 915 B |
| #7303 | ExecuteAsync |
net6.0 | 1.87μs | 8.9ns | 34.5ns | 0 | 0 | 0 | 952 B |
| #7303 | ExecuteAsync |
netcoreapp3.1 | 2.38μs | 12.1ns | 55.6ns | 0 | 0 | 0 | 952 B |
| #7303 | ExecuteAsync |
net472 | 2.5μs | 1.24ns | 4.79ns | 0.138 | 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.88μs | 4.65ns | 17.4ns | 0 | 0 | 0 | 2.36 KB |
| master | SendAsync |
netcoreapp3.1 | 8.66μs | 5.62ns | 21ns | 0 | 0 | 0 | 2.9 KB |
| master | SendAsync |
net472 | 12.5μs | 8.83ns | 34.2ns | 0.499 | 0 | 0 | 3.18 KB |
| #7303 | SendAsync |
net6.0 | 6.68μs | 17.7ns | 68.4ns | 0 | 0 | 0 | 2.36 KB |
| #7303 | SendAsync |
netcoreapp3.1 | 8.4μs | 17.2ns | 66.4ns | 0 | 0 | 0 | 2.9 KB |
| #7303 | SendAsync |
net472 | 12μs | 13.5ns | 52.3ns | 0.481 | 0 | 0 | 3.18 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ Fewer allocations 🎉
Fewer allocations 🎉 in #7303
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
258.79 KB
257.41 KB
-1.38 KB
-0.53%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472
278.53 KB
274.79 KB
-3.74 KB
-1.34%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0
44.39 KB
43.78 KB
-616 B
-1.39%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0
256.52 KB
250.82 KB
-5.7 KB
-2.22%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472
73.73 KB
57.34 KB
-16.38 KB
-22.22%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 | 258.79 KB | 257.41 KB | -1.38 KB | -0.53% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 | 278.53 KB | 274.79 KB | -3.74 KB | -1.34% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 | 44.39 KB | 43.78 KB | -616 B | -1.39% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 | 256.52 KB | 250.82 KB | -5.7 KB | -2.22% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 | 73.73 KB | 57.34 KB | -16.38 KB | -22.22% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StringConcatBenchmark |
net6.0 | 52.6μs | 709ns | 7.09μs | 0 | 0 | 0 | 44.39 KB |
| master | StringConcatBenchmark |
netcoreapp3.1 | 54.8μs | 685ns | 6.81μs | 0 | 0 | 0 | 42.82 KB |
| master | StringConcatBenchmark |
net472 | 57.2μs | 147ns | 531ns | 0 | 0 | 0 | 73.73 KB |
| master | StringConcatAspectBenchmark |
net6.0 | 449μs | 2.01μs | 7.52μs | 0 | 0 | 0 | 256.52 KB |
| master | StringConcatAspectBenchmark |
netcoreapp3.1 | 509μs | 2.63μs | 12.9μs | 0 | 0 | 0 | 258.79 KB |
| master | StringConcatAspectBenchmark |
net472 | 406μs | 1.68μs | 6.51μs | 0 | 0 | 0 | 278.53 KB |
| #7303 | StringConcatBenchmark |
net6.0 | 44.6μs | 246ns | 1.54μs | 0 | 0 | 0 | 43.78 KB |
| #7303 | StringConcatBenchmark |
netcoreapp3.1 | 50.5μs | 362ns | 3.45μs | 0 | 0 | 0 | 42.82 KB |
| #7303 | StringConcatBenchmark |
net472 | 57.2μs | 156ns | 564ns | 0 | 0 | 0 | 57.34 KB |
| #7303 | StringConcatAspectBenchmark |
net6.0 | 453μs | 2.13μs | 9.99μs | 0 | 0 | 0 | 250.82 KB |
| #7303 | StringConcatAspectBenchmark |
netcoreapp3.1 | 504μs | 2.22μs | 8.89μs | 0 | 0 | 0 | 257.41 KB |
| #7303 | StringConcatAspectBenchmark |
net472 | 407μs | 2.22μs | 12.8μs | 0 | 0 | 0 | 274.79 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 | 13.8ns | 63.1ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
netcoreapp3.1 | 3.41μs | 16.4ns | 71.3ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
net472 | 3.82μs | 3.01ns | 11.6ns | 0.248 | 0 | 0 | 1.64 KB |
| #7303 | EnrichedLog |
net6.0 | 2.53μs | 13.7ns | 72.3ns | 0 | 0 | 0 | 1.71 KB |
| #7303 | EnrichedLog |
netcoreapp3.1 | 3.45μs | 16.6ns | 64.4ns | 0 | 0 | 0 | 1.7 KB |
| #7303 | EnrichedLog |
net472 | 3.87μs | 4.67ns | 18.1ns | 0.25 | 0 | 0 | 1.64 KB |
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EnrichedLog |
net6.0 | 123μs | 72.1ns | 260ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
netcoreapp3.1 | 128μs | 399ns | 1.49μs | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
net472 | 166μs | 111ns | 430ns | 0 | 0 | 0 | 4.52 KB |
| #7303 | EnrichedLog |
net6.0 | 124μs | 110ns | 427ns | 0 | 0 | 0 | 4.31 KB |
| #7303 | EnrichedLog |
netcoreapp3.1 | 128μs | 129ns | 499ns | 0 | 0 | 0 | 4.31 KB |
| #7303 | EnrichedLog |
net472 | 167μs | 139ns | 538ns | 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.95μs | 22.9ns | 85.6ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
netcoreapp3.1 | 6.62μs | 14.7ns | 57.1ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
net472 | 7.66μs | 7.83ns | 30.3ns | 0.305 | 0 | 0 | 2.08 KB |
| #7303 | EnrichedLog |
net6.0 | 5.01μs | 13.2ns | 51.2ns | 0 | 0 | 0 | 2.26 KB |
| #7303 | EnrichedLog |
netcoreapp3.1 | 6.7μs | 18.3ns | 68.6ns | 0 | 0 | 0 | 2.26 KB |
| #7303 | EnrichedLog |
net472 | 7.6μs | 8.66ns | 33.6ns | 0.303 | 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.03μs | 8.1ns | 31.4ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
netcoreapp3.1 | 2.65μs | 12.2ns | 47.3ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
net472 | 3.1μs | 6.06ns | 23.5ns | 0.185 | 0 | 0 | 1.2 KB |
| #7303 | SendReceive |
net6.0 | 2.05μs | 9.37ns | 36.3ns | 0 | 0 | 0 | 1.2 KB |
| #7303 | SendReceive |
netcoreapp3.1 | 2.66μs | 9.85ns | 38.1ns | 0 | 0 | 0 | 1.2 KB |
| #7303 | SendReceive |
net472 | 3.2μs | 1.72ns | 6.67ns | 0.176 | 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.19μs | 7.9ns | 30.6ns | 0 | 0 | 0 | 1.58 KB |
| master | EnrichedLog |
netcoreapp3.1 | 5.39μs | 10.7ns | 41.6ns | 0 | 0 | 0 | 1.63 KB |
| master | EnrichedLog |
net472 | 6.49μs | 8.61ns | 33.4ns | 0.321 | 0 | 0 | 2.03 KB |
| #7303 | EnrichedLog |
net6.0 | 4.29μs | 3.59ns | 13.4ns | 0 | 0 | 0 | 1.58 KB |
| #7303 | EnrichedLog |
netcoreapp3.1 | 5.54μs | 11.5ns | 44.7ns | 0 | 0 | 0 | 1.63 KB |
| #7303 | EnrichedLog |
net472 | 6.58μs | 7.28ns | 28.2ns | 0.294 | 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 | 754ns | 0.199ns | 0.744ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
netcoreapp3.1 | 957ns | 4.93ns | 22.1ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
net472 | 905ns | 0.344ns | 1.29ns | 0.0905 | 0 | 0 | 578 B |
| master | StartFinishScope |
net6.0 | 899ns | 3.83ns | 14.8ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
netcoreapp3.1 | 1.13μs | 5.28ns | 20.4ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
net472 | 1.06μs | 0.342ns | 1.33ns | 0.101 | 0 | 0 | 658 B |
| #7303 | StartFinishSpan |
net6.0 | 758ns | 3.59ns | 14.4ns | 0 | 0 | 0 | 576 B |
| #7303 | StartFinishSpan |
netcoreapp3.1 | 945ns | 4.76ns | 22.3ns | 0 | 0 | 0 | 576 B |
| #7303 | StartFinishSpan |
net472 | 940ns | 0.0712ns | 0.257ns | 0.0895 | 0 | 0 | 578 B |
| #7303 | StartFinishScope |
net6.0 | 908ns | 3.98ns | 15.4ns | 0 | 0 | 0 | 696 B |
| #7303 | StartFinishScope |
netcoreapp3.1 | 1.14μs | 5.15ns | 20.6ns | 0 | 0 | 0 | 696 B |
| #7303 | StartFinishScope |
net472 | 1.07μs | 0.054ns | 0.202ns | 0.102 | 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μs | 4.86ns | 19.4ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
netcoreapp3.1 | 1.36μs | 6.85ns | 32.1ns | 0 | 0 | 0 | 697 B |
| master | RunOnMethodBegin |
net472 | 1.41μs | 1.15ns | 4.45ns | 0.0981 | 0 | 0 | 658 B |
| #7303 | RunOnMethodBegin |
net6.0 | 1.04μs | 0.445ns | 1.67ns | 0 | 0 | 0 | 696 B |
| #7303 | RunOnMethodBegin |
netcoreapp3.1 | 1.42μs | 4.98ns | 19.3ns | 0 | 0 | 0 | 696 B |
| #7303 | RunOnMethodBegin |
net472 | 1.39μs | 0.393ns | 1.42ns | 0.104 | 0 | 0 | 658 B |
chrisnas
left a comment
There was a problem hiding this comment.
LGTM except the env var name that should be changed to DD_PROFILER_MANAGED_ACTIVATION_ENABLED instead of DD_PROFILING_MANAGED_ACTIVATION_ENABLED
7f1458f to
25cd32d
Compare
06c6e7f to
6ad60b0
Compare
Co-authored-by: chrisnas <[email protected]>
6ad60b0 to
e1c85f1
Compare
## Summary of changes Updates the rules around `ProfilerSettings` enablement ## Reason for change After #7287, we decide whether the profiler is enabled in managed code, instead of on the native side. However, we got some of the rules wrong. Specifically, we believed that the profiler should behave different when `DD_INJECTION_ENABLED` was set, but that's not the case. The profiler should behave the same in all cases. ## Implementation details Fixed the implementation to ignore the SSI variable, and updated the corresponding unit tests ## Test coverage Updated the tests that were affected ## Other details The incorrect behaviour was actually introduced in #7303, but it didn't have a visible impact until #7287
Summary of changes
Refactors how we determine the profiler's current configuration state
Reason for change
Today, the profiler determines if it's enabled or disabled independently of the tracer, in the native code. We then try to mirror that state in the managed code, for several reasons
As part of the hands-off config work, we will calculate whether to enable the profiler based on the full managed config, instead of just using environment variables. However, when managed activation is disabled (for back-compat investigation purposes), we do need to just use env vars, to "mirror" the state that will be calculated by the native continuous profiler, essentially working in the existing "legacy" state.
The refactoring in this PR is intended to lay the groundwork for the future hands-off config work in the profiler, as well as to solve some existing issues with inconsistent/missing telemetry
Implementation details
ProfilerStateenumto track the profiler as a 3-state enablement which represents its real state, instead of trying to force it as a booleanEnvironmentConfigurationSourceto record variables read from env in telemetry correctly.DD_PROFILER_MANAGED_ACTIVATION_ENABLEDwhich will be used shortlyTest coverage
Added unit tests for the new
ProfilerSettingswhich encapsulates most of the logicOther details
This PR technically requires support for
DD_PROFILER_MANAGED_ACTIVATION_ENABLEDhas been merged in order to report the correct values. This isn't a big deal, as it will likely be merged soon, but if it isn't, we should tweak the logic inProfilerSettingsso that it's correct. Alternatively, I can split this into two PRs - one that is correct today, and one that is correct only with the profiler PR