-
Notifications
You must be signed in to change notification settings - Fork 151
[ConfigRegistry] 3/5 Generate ConfigurationKeys with source generator #7698
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ConfigRegistry] 3/5 Generate ConfigurationKeys with source generator #7698
Conversation
bd34118 to
cbb3933
Compare
9501463 to
25e86cb
Compare
cbb3933 to
1cb1163
Compare
BenchmarksBenchmarks Report for benchmark platform 🐌Benchmarks for #7698 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 ✔️ Fewer allocations 🎉
|
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 | 3.35 KB | 3.31 KB | -46 B | -1.37% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 935μs | 44.1ns | 159ns | 0 | 0 | 0 | 2.7 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.03ms | 480ns | 1.86μs | 0 | 0 | 0 | 2.7 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 1.23ms | 428ns | 1.66μs | 0 | 0 | 0 | 3.35 KB |
| #7698 | WriteAndFlushEnrichedTraces |
net6.0 | 934μs | 56.6ns | 212ns | 0 | 0 | 0 | 2.7 KB |
| #7698 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.02ms | 171ns | 661ns | 0 | 0 | 0 | 2.7 KB |
| #7698 | WriteAndFlushEnrichedTraces |
net472 | 1.21ms | 428ns | 1.6μs | 0 | 0 | 0 | 3.31 KB |
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | AllCycleSimpleBody |
net6.0 | 1.08μs | 5.4ns | 22.9ns | 0 | 0 | 0 | 1.22 KB |
| master | AllCycleSimpleBody |
netcoreapp3.1 | 1.37μs | 7.87ns | 63.9ns | 0 | 0 | 0 | 1.2 KB |
| master | AllCycleSimpleBody |
net472 | 1.01μs | 0.432ns | 1.62ns | 0.191 | 0 | 0 | 1.23 KB |
| master | AllCycleMoreComplexBody |
net6.0 | 7.28μs | 34.1ns | 132ns | 0 | 0 | 0 | 4.72 KB |
| master | AllCycleMoreComplexBody |
netcoreapp3.1 | 9.17μs | 45.4ns | 203ns | 0 | 0 | 0 | 4.62 KB |
| master | AllCycleMoreComplexBody |
net472 | 7.68μs | 5.18ns | 20.1ns | 0.735 | 0 | 0 | 4.74 KB |
| master | ObjectExtractorSimpleBody |
net6.0 | 333ns | 1.73ns | 8.46ns | 0 | 0 | 0 | 280 B |
| master | ObjectExtractorSimpleBody |
netcoreapp3.1 | 399ns | 2ns | 8.24ns | 0 | 0 | 0 | 272 B |
| master | ObjectExtractorSimpleBody |
net472 | 299ns | 0.164ns | 0.637ns | 0.0437 | 0 | 0 | 281 B |
| master | ObjectExtractorMoreComplexBody |
net6.0 | 6.49μs | 23.2ns | 89.8ns | 0 | 0 | 0 | 3.78 KB |
| master | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 8.05μs | 41.2ns | 189ns | 0 | 0 | 0 | 3.69 KB |
| master | ObjectExtractorMoreComplexBody |
net472 | 6.76μs | 3.52ns | 13.2ns | 0.571 | 0 | 0 | 3.8 KB |
| #7698 | AllCycleSimpleBody |
net6.0 | 1.09μs | 0.736ns | 2.75ns | 0 | 0 | 0 | 1.22 KB |
| #7698 | AllCycleSimpleBody |
netcoreapp3.1 | 1.43μs | 8.21ns | 59.8ns | 0 | 0 | 0 | 1.2 KB |
| #7698 | AllCycleSimpleBody |
net472 | 1.01μs | 0.934ns | 3.5ns | 0.191 | 0 | 0 | 1.23 KB |
| #7698 | AllCycleMoreComplexBody |
net6.0 | 7.14μs | 37.6ns | 180ns | 0 | 0 | 0 | 4.72 KB |
| #7698 | AllCycleMoreComplexBody |
netcoreapp3.1 | 8.88μs | 47.4ns | 242ns | 0 | 0 | 0 | 4.62 KB |
| #7698 | AllCycleMoreComplexBody |
net472 | 7.62μs | 3.64ns | 14.1ns | 0.73 | 0 | 0 | 4.74 KB |
| #7698 | ObjectExtractorSimpleBody |
net6.0 | 341ns | 1.84ns | 10.2ns | 0 | 0 | 0 | 280 B |
| #7698 | ObjectExtractorSimpleBody |
netcoreapp3.1 | 407ns | 2.25ns | 13.7ns | 0 | 0 | 0 | 272 B |
| #7698 | ObjectExtractorSimpleBody |
net472 | 302ns | 0.116ns | 0.449ns | 0.0441 | 0 | 0 | 281 B |
| #7698 | ObjectExtractorMoreComplexBody |
net6.0 | 6.41μs | 31.7ns | 145ns | 0 | 0 | 0 | 3.78 KB |
| #7698 | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.9μs | 39.8ns | 182ns | 0 | 0 | 0 | 3.69 KB |
| #7698 | ObjectExtractorMoreComplexBody |
net472 | 6.66μs | 2.5ns | 9ns | 0.599 | 0 | 0 | 3.8 KB |
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EncodeArgs |
net6.0 | 76.8μs | 240ns | 930ns | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
netcoreapp3.1 | 96.7μs | 205ns | 796ns | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
net472 | 110μs | 15.5ns | 60.1ns | 4.98 | 0 | 0 | 32.51 KB |
| master | EncodeLegacyArgs |
net6.0 | 149μs | 42ns | 151ns | 0 | 0 | 0 | 2.15 KB |
| master | EncodeLegacyArgs |
netcoreapp3.1 | 197μs | 128ns | 480ns | 0 | 0 | 0 | 2.14 KB |
| master | EncodeLegacyArgs |
net472 | 264μs | 142ns | 531ns | 0 | 0 | 0 | 2.16 KB |
| #7698 | EncodeArgs |
net6.0 | 78.4μs | 266ns | 1.03μs | 0 | 0 | 0 | 32.4 KB |
| #7698 | EncodeArgs |
netcoreapp3.1 | 95.8μs | 327ns | 1.27μs | 0 | 0 | 0 | 32.4 KB |
| #7698 | EncodeArgs |
net472 | 109μs | 9.45ns | 36.6ns | 4.9 | 0 | 0 | 32.51 KB |
| #7698 | EncodeLegacyArgs |
net6.0 | 145μs | 11.1ns | 40ns | 0 | 0 | 0 | 2.14 KB |
| #7698 | EncodeLegacyArgs |
netcoreapp3.1 | 202μs | 107ns | 413ns | 0 | 0 | 0 | 2.14 KB |
| #7698 | EncodeLegacyArgs |
net472 | 265μs | 57.5ns | 215ns | 0 | 0 | 0 | 2.16 KB |
Benchmarks.Trace.Asm.AppSecWafBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7698
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑net472
0 b
8.19 KB
8.19 KB
∞
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑net472
0 b
8.19 KB
8.19 KB
∞
Fewer allocations 🎉 in #7698
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑net6.0
5.14 KB
4.86 KB
-288 B
-5.60%
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑net6.0
3.17 KB
2.54 KB
-624 B
-19.70%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑net472 | 0 b | 8.19 KB | 8.19 KB | ∞ |
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑net472 | 0 b | 8.19 KB | 8.19 KB | ∞ |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑net6.0 | 5.14 KB | 4.86 KB | -288 B | -5.60% |
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑net6.0 | 3.17 KB | 2.54 KB | -624 B | -19.70% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | RunWafRealisticBenchmark |
net6.0 | 424μs | 856ns | 3.09μs | 0 | 0 | 0 | 5.14 KB |
| master | RunWafRealisticBenchmark |
netcoreapp3.1 | 447μs | 1.52μs | 5.26μs | 0 | 0 | 0 | 4.58 KB |
| master | RunWafRealisticBenchmark |
net472 | 495μs | 433ns | 1.56μs | 0 | 0 | 0 | 0 b |
| master | RunWafRealisticBenchmarkWithAttack |
net6.0 | 308μs | 534ns | 1.93μs | 0 | 0 | 0 | 3.17 KB |
| master | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 367μs | 3.92μs | 38μs | 0 | 0 | 0 | 2.32 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net472 | 368μs | 307ns | 1.11μs | 0 | 0 | 0 | 0 b |
| #7698 | RunWafRealisticBenchmark |
net6.0 | 422μs | 744ns | 2.68μs | 0 | 0 | 0 | 4.86 KB |
| #7698 | RunWafRealisticBenchmark |
netcoreapp3.1 | 452μs | 1.59μs | 5.74μs | 0 | 0 | 0 | 4.58 KB |
| #7698 | RunWafRealisticBenchmark |
net472 | 501μs | 416ns | 1.56μs | 0 | 0 | 0 | 8.19 KB |
| #7698 | RunWafRealisticBenchmarkWithAttack |
net6.0 | 315μs | 887ns | 3.2μs | 0 | 0 | 0 | 2.54 KB |
| #7698 | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 359μs | 3.28μs | 31.8μs | 0 | 0 | 0 | 2.32 KB |
| #7698 | RunWafRealisticBenchmarkWithAttack |
net472 | 375μs | 1.39μs | 5.37μs | 0 | 0 | 0 | 8.19 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 | 61μs | 42.6ns | 159ns | 0 | 0 | 0 | 14.52 KB |
| master | SendRequest |
netcoreapp3.1 | 71.4μs | 104ns | 362ns | 0 | 0 | 0 | 17.42 KB |
| master | SendRequest |
net472 | 0.16ns | 0.00366ns | 0.0142ns | 0 | 0 | 0 | 0 b |
| #7698 | SendRequest |
net6.0 | 60.2μs | 86.3ns | 323ns | 0 | 0 | 0 | 14.52 KB |
| #7698 | SendRequest |
netcoreapp3.1 | 72.1μs | 271ns | 1.27μs | 0 | 0 | 0 | 17.42 KB |
| #7698 | SendRequest |
net472 | 0.157ns | 0.00367ns | 0.0142ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CharSliceBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7698
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net472
0 b
8.19 KB
8.19 KB
∞
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472
0 b
8.19 KB
8.19 KB
∞
Fewer allocations 🎉 in #7698
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0
688 B
304 B
-384 B
-55.81%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net472 | 0 b | 8.19 KB | 8.19 KB | ∞ |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472 | 0 b | 8.19 KB | 8.19 KB | ∞ |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0 | 688 B | 304 B | -384 B | -55.81% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | OriginalCharSlice |
net6.0 | 2.01ms | 445ns | 1.6μs | 0 | 0 | 0 | 640.3 KB |
| master | OriginalCharSlice |
netcoreapp3.1 | 3.97ms | 1.07μs | 3.99μs | 0 | 0 | 0 | 640.1 KB |
| master | OriginalCharSlice |
net472 | 2.61ms | 816ns | 3.16μs | 0 | 0 | 0 | 647.17 KB |
| master | OptimizedCharSlice |
net6.0 | 1.41ms | 688ns | 2.67μs | 0 | 0 | 0 | 976 B |
| master | OptimizedCharSlice |
netcoreapp3.1 | 2.78ms | 1.29μs | 4.82μs | 0 | 0 | 0 | 104 B |
| master | OptimizedCharSlice |
net472 | 1.94ms | 436ns | 1.63μs | 0 | 0 | 0 | 0 b |
| master | OptimizedCharSliceWithPool |
net6.0 | 1.01ms | 814ns | 3.15μs | 0 | 0 | 0 | 688 B |
| master | OptimizedCharSliceWithPool |
netcoreapp3.1 | 1.86ms | 1.8μs | 6.72μs | 0 | 0 | 0 | 104 B |
| master | OptimizedCharSliceWithPool |
net472 | 1.27ms | 2.43μs | 9.4μs | 0 | 0 | 0 | 0 b |
| #7698 | OriginalCharSlice |
net6.0 | 1.97ms | 781ns | 2.92μs | 0 | 0 | 0 | 640.64 KB |
| #7698 | OriginalCharSlice |
netcoreapp3.1 | 4.03ms | 1.27μs | 4.93μs | 0 | 0 | 0 | 640.1 KB |
| #7698 | OriginalCharSlice |
net472 | 2.62ms | 702ns | 2.72μs | 0 | 0 | 0 | 647.17 KB |
| #7698 | OptimizedCharSlice |
net6.0 | 1.44ms | 614ns | 2.3μs | 0 | 0 | 0 | 976 B |
| #7698 | OptimizedCharSlice |
netcoreapp3.1 | 2.83ms | 1.45μs | 5.63μs | 0 | 0 | 0 | 104 B |
| #7698 | OptimizedCharSlice |
net472 | 2.03ms | 1.33μs | 5.14μs | 0 | 0 | 0 | 8.19 KB |
| #7698 | OptimizedCharSliceWithPool |
net6.0 | 1.01ms | 605ns | 2.18μs | 0 | 0 | 0 | 304 B |
| #7698 | OptimizedCharSliceWithPool |
netcoreapp3.1 | 1.89ms | 1.89μs | 7.3μs | 0 | 0 | 0 | 104 B |
| #7698 | OptimizedCharSliceWithPool |
net472 | 1.15ms | 1μs | 3.89μs | 0 | 0 | 0 | 8.19 KB |
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Faster 🎉 Fewer allocations 🎉
Faster 🎉 in #7698
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1
1.188
768,220.09
646,591.96
Fewer allocations 🎉 in #7698
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1
42.36 KB
42.13 KB
-228 B
-0.54%
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472
56.03 KB
55.62 KB
-412 B
-0.74%
| Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 | 1.188 | 768,220.09 | 646,591.96 |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 | 42.36 KB | 42.13 KB | -228 B | -0.54% |
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 | 56.03 KB | 55.62 KB | -412 B | -0.74% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 709μs | 3.94μs | 24.9μs | 0 | 0 | 0 | 41.63 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 770μs | 2.93μs | 13.4μs | 0 | 0 | 0 | 42.36 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 861μs | 2.69μs | 10μs | 7.81 | 0 | 0 | 56.03 KB |
| #7698 | WriteAndFlushEnrichedTraces |
net6.0 | 666μs | 1.31μs | 4.89μs | 0 | 0 | 0 | 41.62 KB |
| #7698 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 646μs | 672ns | 2.52μs | 0 | 0 | 0 | 42.13 KB |
| #7698 | WriteAndFlushEnrichedTraces |
net472 | 871μs | 3.94μs | 15.8μs | 4.46 | 0 | 0 | 55.62 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μs | 10.5ns | 52.3ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
netcoreapp3.1 | 2.59μs | 10.7ns | 41.3ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
net472 | 2.73μs | 1.01ns | 3.77ns | 0.151 | 0 | 0 | 987 B |
| #7698 | ExecuteNonQuery |
net6.0 | 1.9μs | 8.61ns | 33.3ns | 0 | 0 | 0 | 1.02 KB |
| #7698 | ExecuteNonQuery |
netcoreapp3.1 | 2.72μs | 3.43ns | 13.3ns | 0 | 0 | 0 | 1.02 KB |
| #7698 | ExecuteNonQuery |
net472 | 2.8μs | 4.18ns | 16.2ns | 0.152 | 0 | 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.68μs | 9.06ns | 48.8ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
netcoreapp3.1 | 2.33μs | 9.54ns | 36.9ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
net472 | 3.55μs | 5.4ns | 20.9ns | 0.16 | 0 | 0 | 1.04 KB |
| master | CallElasticsearchAsync |
net6.0 | 1.78μs | 8.8ns | 37.3ns | 0 | 0 | 0 | 1.01 KB |
| master | CallElasticsearchAsync |
netcoreapp3.1 | 2.46μs | 11.4ns | 45.5ns | 0 | 0 | 0 | 1.08 KB |
| master | CallElasticsearchAsync |
net472 | 3.83μs | 1.42ns | 4.91ns | 0.174 | 0 | 0 | 1.1 KB |
| #7698 | CallElasticsearch |
net6.0 | 1.71μs | 7.76ns | 30.1ns | 0 | 0 | 0 | 1.03 KB |
| #7698 | CallElasticsearch |
netcoreapp3.1 | 2.32μs | 10.7ns | 38.7ns | 0 | 0 | 0 | 1.03 KB |
| #7698 | CallElasticsearch |
net472 | 3.63μs | 4.32ns | 16.7ns | 0.161 | 0 | 0 | 1.04 KB |
| #7698 | CallElasticsearchAsync |
net6.0 | 1.79μs | 4.53ns | 17.5ns | 0 | 0 | 0 | 1.01 KB |
| #7698 | CallElasticsearchAsync |
netcoreapp3.1 | 2.47μs | 8.94ns | 34.6ns | 0 | 0 | 0 | 1.08 KB |
| #7698 | CallElasticsearchAsync |
net472 | 3.81μs | 2.05ns | 7.93ns | 0.173 | 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.89μs | 6.44ns | 24.9ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
netcoreapp3.1 | 2.45μs | 9.74ns | 37.7ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
net472 | 2.61μs | 3.17ns | 12.3ns | 0.142 | 0 | 0 | 915 B |
| #7698 | ExecuteAsync |
net6.0 | 1.87μs | 9.26ns | 39.3ns | 0 | 0 | 0 | 952 B |
| #7698 | ExecuteAsync |
netcoreapp3.1 | 2.37μs | 11.7ns | 49.8ns | 0 | 0 | 0 | 952 B |
| #7698 | ExecuteAsync |
net472 | 2.69μs | 4.07ns | 15.8ns | 0.134 | 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 | 17.6ns | 65.9ns | 0 | 0 | 0 | 2.36 KB |
| master | SendAsync |
netcoreapp3.1 | 8.36μs | 23.5ns | 90.9ns | 0 | 0 | 0 | 2.9 KB |
| master | SendAsync |
net472 | 12.4μs | 8.43ns | 31.5ns | 0.5 | 0 | 0 | 3.18 KB |
| #7698 | SendAsync |
net6.0 | 7.08μs | 23ns | 89.1ns | 0 | 0 | 0 | 2.36 KB |
| #7698 | SendAsync |
netcoreapp3.1 | 8.36μs | 16.9ns | 65.4ns | 0 | 0 | 0 | 2.9 KB |
| #7698 | SendAsync |
net472 | 12.2μs | 7.59ns | 28.4ns | 0.49 | 0 | 0 | 3.18 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7698
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
256.53 KB
272.97 KB
16.44 KB
6.41%
Fewer allocations 🎉 in #7698
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1
43.42 KB
42.74 KB
-680 B
-1.57%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0
275.57 KB
260.04 KB
-15.53 KB
-5.63%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472
73.73 KB
65.54 KB
-8.19 KB
-11.11%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472
417.82 KB
286.72 KB
-131.1 KB
-31.38%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 | 256.53 KB | 272.97 KB | 16.44 KB | 6.41% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1 | 43.42 KB | 42.74 KB | -680 B | -1.57% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 | 275.57 KB | 260.04 KB | -15.53 KB | -5.63% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 | 73.73 KB | 65.54 KB | -8.19 KB | -11.11% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 | 417.82 KB | 286.72 KB | -131.1 KB | -31.38% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StringConcatBenchmark |
net6.0 | 44.6μs | 144ns | 841ns | 0 | 0 | 0 | 43.64 KB |
| master | StringConcatBenchmark |
netcoreapp3.1 | 50.5μs | 295ns | 2.49μs | 0 | 0 | 0 | 43.42 KB |
| master | StringConcatBenchmark |
net472 | 57.6μs | 130ns | 504ns | 0 | 0 | 0 | 73.73 KB |
| master | StringConcatAspectBenchmark |
net6.0 | 494μs | 1.78μs | 6.4μs | 0 | 0 | 0 | 275.57 KB |
| master | StringConcatAspectBenchmark |
netcoreapp3.1 | 512μs | 2.35μs | 8.46μs | 0 | 0 | 0 | 256.53 KB |
| master | StringConcatAspectBenchmark |
net472 | 407μs | 2.17μs | 15.8μs | 0 | 0 | 0 | 417.82 KB |
| #7698 | StringConcatBenchmark |
net6.0 | 46.7μs | 359ns | 3.44μs | 0 | 0 | 0 | 43.78 KB |
| #7698 | StringConcatBenchmark |
netcoreapp3.1 | 48.8μs | 275ns | 1.67μs | 0 | 0 | 0 | 42.74 KB |
| #7698 | StringConcatBenchmark |
net472 | 56.6μs | 241ns | 932ns | 0 | 0 | 0 | 65.54 KB |
| #7698 | StringConcatAspectBenchmark |
net6.0 | 466μs | 1.4μs | 6.11μs | 0 | 0 | 0 | 260.04 KB |
| #7698 | StringConcatAspectBenchmark |
netcoreapp3.1 | 522μs | 1.56μs | 5.63μs | 0 | 0 | 0 | 272.97 KB |
| #7698 | StringConcatAspectBenchmark |
net472 | 397μs | 1.42μs | 5.29μ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.73μs | 1.19ns | 4.61ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
netcoreapp3.1 | 3.63μs | 15.6ns | 60.3ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
net472 | 3.72μs | 2.28ns | 8.82ns | 0.26 | 0 | 0 | 1.64 KB |
| #7698 | EnrichedLog |
net6.0 | 2.67μs | 1.69ns | 6.55ns | 0 | 0 | 0 | 1.7 KB |
| #7698 | EnrichedLog |
netcoreapp3.1 | 3.59μs | 13.4ns | 52ns | 0 | 0 | 0 | 1.7 KB |
| #7698 | EnrichedLog |
net472 | 3.84μs | 1.92ns | 7.45ns | 0.251 | 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 | 124μs | 80.4ns | 290ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
netcoreapp3.1 | 129μs | 174ns | 628ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
net472 | 168μs | 127ns | 494ns | 0 | 0 | 0 | 4.52 KB |
| #7698 | EnrichedLog |
net6.0 | 125μs | 164ns | 612ns | 0 | 0 | 0 | 4.31 KB |
| #7698 | EnrichedLog |
netcoreapp3.1 | 129μs | 463ns | 1.73μs | 0 | 0 | 0 | 4.31 KB |
| #7698 | EnrichedLog |
net472 | 167μs | 108ns | 419ns | 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.8μs | 23.5ns | 91.1ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
netcoreapp3.1 | 6.79μs | 17.7ns | 68.6ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
net472 | 7.53μs | 8.52ns | 33ns | 0.302 | 0 | 0 | 2.08 KB |
| #7698 | EnrichedLog |
net6.0 | 5.07μs | 5.41ns | 20.9ns | 0 | 0 | 0 | 2.26 KB |
| #7698 | EnrichedLog |
netcoreapp3.1 | 6.73μs | 21.1ns | 81.9ns | 0 | 0 | 0 | 2.26 KB |
| #7698 | EnrichedLog |
net472 | 7.63μs | 6.85ns | 26.5ns | 0.301 | 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 | 1.97μs | 1.52ns | 5.89ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
netcoreapp3.1 | 2.49μs | 12.1ns | 48.5ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
net472 | 3.24μs | 5.93ns | 23ns | 0.179 | 0 | 0 | 1.2 KB |
| #7698 | SendReceive |
net6.0 | 1.99μs | 9.62ns | 40.8ns | 0 | 0 | 0 | 1.2 KB |
| #7698 | SendReceive |
netcoreapp3.1 | 2.56μs | 13.4ns | 64.5ns | 0 | 0 | 0 | 1.2 KB |
| #7698 | SendReceive |
net472 | 3.07μs | 7.35ns | 28.5ns | 0.185 | 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.35μs | 1.22ns | 4.56ns | 0 | 0 | 0 | 1.58 KB |
| master | EnrichedLog |
netcoreapp3.1 | 5.98μs | 20.3ns | 78.7ns | 0 | 0 | 0 | 1.63 KB |
| master | EnrichedLog |
net472 | 6.46μs | 5.54ns | 20.7ns | 0.321 | 0 | 0 | 2.03 KB |
| #7698 | EnrichedLog |
net6.0 | 4.51μs | 21.4ns | 82.8ns | 0 | 0 | 0 | 1.58 KB |
| #7698 | EnrichedLog |
netcoreapp3.1 | 5.91μs | 9.66ns | 36.1ns | 0 | 0 | 0 | 1.63 KB |
| #7698 | EnrichedLog |
net472 | 6.62μs | 9.26ns | 35.9ns | 0.297 | 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 | 780ns | 0.208ns | 0.804ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
netcoreapp3.1 | 971ns | 5.33ns | 30.6ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
net472 | 909ns | 0.0952ns | 0.356ns | 0.091 | 0 | 0 | 578 B |
| master | StartFinishScope |
net6.0 | 924ns | 4.81ns | 24.5ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
netcoreapp3.1 | 1.15μs | 5.92ns | 26.5ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
net472 | 1.1μs | 0.311ns | 1.21ns | 0.0995 | 0 | 0 | 658 B |
| #7698 | StartFinishSpan |
net6.0 | 801ns | 3.78ns | 15.1ns | 0 | 0 | 0 | 576 B |
| #7698 | StartFinishSpan |
netcoreapp3.1 | 968ns | 5.05ns | 23.7ns | 0 | 0 | 0 | 576 B |
| #7698 | StartFinishSpan |
net472 | 938ns | 0.0849ns | 0.318ns | 0.09 | 0 | 0 | 578 B |
| #7698 | StartFinishScope |
net6.0 | 928ns | 0.157ns | 0.608ns | 0 | 0 | 0 | 696 B |
| #7698 | StartFinishScope |
netcoreapp3.1 | 1.14μs | 6.2ns | 30.4ns | 0 | 0 | 0 | 696 B |
| #7698 | StartFinishScope |
net472 | 1.13μs | 0.348ns | 1.25ns | 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.08μs | 5.26ns | 21.7ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
netcoreapp3.1 | 1.4μs | 6.19ns | 22.3ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
net472 | 1.45μs | 1.54ns | 5.95ns | 0.102 | 0 | 0 | 658 B |
| #7698 | RunOnMethodBegin |
net6.0 | 1.11μs | 0.654ns | 2.53ns | 0 | 0 | 0 | 696 B |
| #7698 | RunOnMethodBegin |
netcoreapp3.1 | 1.43μs | 4.1ns | 15.9ns | 0 | 0 | 0 | 696 B |
| #7698 | RunOnMethodBegin |
net472 | 1.54μs | 2.35ns | 9.09ns | 0.0991 | 0 | 0 | 658 B |
1cb1163 to
877ecf7
Compare
25e86cb to
f3c200d
Compare
877ecf7 to
49e2acf
Compare
f3c200d to
75c1854
Compare
49e2acf to
51a880e
Compare
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (7698) 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 (7698) - mean (78ms) : 71, 85
master - mean (77ms) : 71, 84
section Bailout
This PR (7698) - mean (81ms) : 74, 87
master - mean (80ms) : 75, 85
section CallTarget+Inlining+NGEN
This PR (7698) - mean (1,085ms) : 1026, 1144
master - mean (1,080ms) : 989, 1172
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 (7698) - mean (123ms) : 110, 135
master - mean (119ms) : 109, 129
section Bailout
This PR (7698) - mean (124ms) : 114, 133
master - mean (122ms) : 113, 131
section CallTarget+Inlining+NGEN
This PR (7698) - mean (785ms) : 740, 831
master - mean (773ms) : 727, 820
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7698) - mean (111ms) : 101, 121
master - mean (109ms) : 98, 119
section Bailout
This PR (7698) - mean (110ms) : 102, 117
master - mean (109ms) : 100, 118
section CallTarget+Inlining+NGEN
This PR (7698) - mean (743ms) : 696, 789
master - mean (727ms) : 686, 769
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7698) - mean (107ms) : 97, 117
master - mean (106ms) : 99, 114
section Bailout
This PR (7698) - mean (108ms) : 99, 116
master - mean (108ms) : 98, 118
section CallTarget+Inlining+NGEN
This PR (7698) - mean (712ms) : 679, 745
master - mean (702ms) : 666, 739
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 (7698) - mean (196ms) : 190, 201
master - mean (195ms) : 191, 199
section Bailout
This PR (7698) - mean (198ms) : 196, 201
master - mean (200ms) : 196, 204
section CallTarget+Inlining+NGEN
This PR (7698) - mean (1,126ms) : 1055, 1198
master - mean (1,127ms) : 1056, 1197
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 (7698) - mean (280ms) : 274, 287
master - mean (279ms) : 273, 286
section Bailout
This PR (7698) - mean (283ms) : 276, 289
master - mean (282ms) : 272, 292
section CallTarget+Inlining+NGEN
This PR (7698) - mean (920ms) : 862, 978
master - mean (922ms) : 875, 968
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7698) - mean (274ms) : 265, 283
master - mean (272ms) : 266, 278
section Bailout
This PR (7698) - mean (274ms) : 268, 280
master - mean (272ms) : 269, 274
section CallTarget+Inlining+NGEN
This PR (7698) - mean (894ms) : 845, 942
master - mean (902ms) : 854, 950
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7698) - mean (274ms) : 265, 282
master - mean (272ms) : 265, 278
section Bailout
This PR (7698) - mean (276ms) : 262, 290
master - mean (273ms) : 267, 279
section CallTarget+Inlining+NGEN
This PR (7698) - mean (840ms) : 816, 864
master - mean (831ms) : 806, 856
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
51a880e to
bc30cd6
Compare
This comment has been minimized.
This comment has been minimized.
bc30cd6 to
c57648c
Compare
2133185 to
13488c5
Compare
75c1854 to
631521a
Compare
13488c5 to
a31063c
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
6ccb01e to
ed3a6bc
Compare
like keeping a file somewhere containing a hash of the 3 files? and comparing the hash on load? |
Yeah, something like that 🙂 Honestly it was only a random idea, and in general you shouldn't write files from source generators (they have analyzers to make sure you don't) so it would mean adding something somewhere we could read it. Not something I've ever tried or anything, no idea if it would be worth it, and absolutely not suggesting you should do it, just something I might R&D one day 😄 |
| diagnostics.AddRange(yamlResult.Errors); | ||
| diagnostics.AddRange(mappingResult.Errors); | ||
|
|
||
| if (jsonResult.Value is null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jsonResult.Value can never be null?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it could be if the json array is empty.. but this would certainly be a bug..
| } | ||
|
|
||
| // Generate source code even if there are errors (use empty configuration as fallback) | ||
| var configData = result.Value ?? new ConfigurationData(new Dictionary<string, ConfigEntry>(), null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
result.Value can never be null?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it could be given that MergeResults return a null wrapped if the json doc is not present.. but this shouldn't happen...
| var trimmedLine = line.TrimStart(); | ||
|
|
||
| // Check if line contains seealso tag (self-closing /> or closing </seealso>) as we need to extract it | ||
| if (trimmedLine.StartsWith("<seealso") && (trimmedLine.Contains("/>") || trimmedLine.Contains("</seealso>"))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if (trimmedLine.StartsWith("<seealso") && (trimmedLine.Contains("/>") || trimmedLine.Contains("</seealso>"))) | |
| if (trimmedLine.StartsWith("<seealso", StringComparison.Ordinal) && (trimmedLine.Contains("/>") || trimmedLine.Contains("</seealso>"))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes changed in 28e3698
| { | ||
| foreach (var productName in productNames) | ||
| { | ||
| if (pascalName!.Length > productName.Length && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pascalName can't be null?
| if (pascalName!.Length > productName.Length && | |
| if (pascalName.Length > productName.Length && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, changed in 85deee3
lucaspimentel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only some nit-picky comments about nullability and string comparisons
| /// <summary> | ||
| /// Configuration key to enable or disable the ActivityListener. | ||
| /// </summary> | ||
| public const string ActivityListenerEnabled = "DD_TRACE_ACTIVITY_LISTENER_ENABLED"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note for follow-up: This key logically belongs with the OpenTelemetry set of environment variables
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, changed in 8776673
| } | ||
|
|
||
| [Fact] | ||
| public void SortsEntriesAlphabetically() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nit to be even more precise
| public void SortsEntriesAlphabetically() | |
| public void SortsEntriesAlphabeticallyByEnvironmentVariable() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes! changed in 85deee3
zacharycmontoya
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I actually reviewed this only looking at the generated files and tests, and by that measure these changes look great 👍🏼
f3473db to
5a68b3b
Compare
…gurationsKeys.cs later
…that we dont need to refactor everything
…renamed to ConfigurationKeys.cs)
5a68b3b to
affec1a
Compare
## Summary of changes - Fix broken `master` due to concurrent merges of conflicting ## Reason for change #7698 moved to defining references in yaml, and in #7723, some of those references moved, which broke the build ## Implementation details Update the YAML file and rebuild ## Test coverage If it builds, we're good!
Context
Part of Configuration Inversion (Step 3) - Stack progress:
Summary
Adds source generator to auto-generate
ConfigurationKeysfromsupported-configurations.jsonwith name mapping to preserve existing constant names.Changes
Source Generator:
supported-configurations.jsonand supported-configurations-docs.yamlConfigurationKeyswith nested product classes (AppSec, CIVisibility, OpenTelemetry, etc.)[Obsolete]attributes from JSONConfiguration Mapping:
configuration_keys_mapping.jsonmaps env vars to original constant names (e.g.,DD_TRACE_ENABLED→TraceEnabled)Updates:
DD_TRACE_ACTIVITY_LISTENER_ENABLEDkeyMotivation
Makes
supported-configurations.jsonthe single source of truth while preserving existing constant names to avoid massive refactoring.Test Coverage
ConfigurationKeysGeneratorTests.cswith comprehensive unit testsRelated Work
Builds on #7548 (configuration registry) and #7688 (PlatformKeys separation + analyzers).