-
Notifications
You must be signed in to change notification settings - Fork 150
Remove properties from TracerSettings which can change at runtime
#7723
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
base: andrew/settings/4-mutable-settings-service
Are you sure you want to change the base?
Remove properties from TracerSettings which can change at runtime
#7723
Conversation
e347879 to
8c472a5
Compare
BenchmarksBenchmarks Report for benchmark platform 🐌Benchmarks for #7723 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored. Benchmark detailsBenchmarks.Trace.ActivityBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ More allocations
|
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 | 3.31 KB | 3.35 KB | 46 B | 1.39% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 940μs | 73.7ns | 255ns | 0 | 0 | 0 | 2.71 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.01ms | 648ns | 2.51μs | 0 | 0 | 0 | 2.7 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 1.19ms | 70.7ns | 255ns | 0 | 0 | 0 | 3.31 KB |
| #7723 | WriteAndFlushEnrichedTraces |
net6.0 | 939μs | 65.3ns | 235ns | 0 | 0 | 0 | 2.71 KB |
| #7723 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.02ms | 814ns | 3.15μs | 0 | 0 | 0 | 2.7 KB |
| #7723 | WriteAndFlushEnrichedTraces |
net472 | 1.21ms | 767ns | 2.97μs | 0 | 0 | 0 | 3.35 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.07μs | 5.75ns | 29.9ns | 0 | 0 | 0 | 1.22 KB |
| master | AllCycleSimpleBody |
netcoreapp3.1 | 1.41μs | 7.61ns | 43.1ns | 0 | 0 | 0 | 1.2 KB |
| master | AllCycleSimpleBody |
net472 | 1.03μs | 0.326ns | 1.22ns | 0.194 | 0 | 0 | 1.23 KB |
| master | AllCycleMoreComplexBody |
net6.0 | 6.97μs | 36.9ns | 202ns | 0 | 0 | 0 | 4.72 KB |
| master | AllCycleMoreComplexBody |
netcoreapp3.1 | 9.08μs | 41.6ns | 167ns | 0 | 0 | 0 | 4.62 KB |
| master | AllCycleMoreComplexBody |
net472 | 7.58μs | 3.67ns | 14.2ns | 0.719 | 0 | 0 | 4.74 KB |
| master | ObjectExtractorSimpleBody |
net6.0 | 317ns | 1.7ns | 9ns | 0 | 0 | 0 | 280 B |
| master | ObjectExtractorSimpleBody |
netcoreapp3.1 | 396ns | 2.25ns | 15.3ns | 0 | 0 | 0 | 272 B |
| master | ObjectExtractorSimpleBody |
net472 | 300ns | 0.064ns | 0.24ns | 0.0438 | 0 | 0 | 281 B |
| master | ObjectExtractorMoreComplexBody |
net6.0 | 6.32μs | 29.7ns | 126ns | 0 | 0 | 0 | 3.78 KB |
| master | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.77μs | 29.3ns | 114ns | 0 | 0 | 0 | 3.69 KB |
| master | ObjectExtractorMoreComplexBody |
net472 | 6.68μs | 1.8ns | 6.98ns | 0.602 | 0 | 0 | 3.8 KB |
| #7723 | AllCycleSimpleBody |
net6.0 | 1.08μs | 0.759ns | 2.84ns | 0 | 0 | 0 | 1.22 KB |
| #7723 | AllCycleSimpleBody |
netcoreapp3.1 | 1.45μs | 7.17ns | 32.1ns | 0 | 0 | 0 | 1.2 KB |
| #7723 | AllCycleSimpleBody |
net472 | 1.05μs | 1.16ns | 4.51ns | 0.193 | 0 | 0 | 1.23 KB |
| #7723 | AllCycleMoreComplexBody |
net6.0 | 7.17μs | 34.6ns | 138ns | 0 | 0 | 0 | 4.72 KB |
| #7723 | AllCycleMoreComplexBody |
netcoreapp3.1 | 8.97μs | 43.2ns | 188ns | 0 | 0 | 0 | 4.62 KB |
| #7723 | AllCycleMoreComplexBody |
net472 | 7.7μs | 4.07ns | 15.8ns | 0.728 | 0 | 0 | 4.74 KB |
| #7723 | ObjectExtractorSimpleBody |
net6.0 | 319ns | 0.126ns | 0.487ns | 0 | 0 | 0 | 280 B |
| #7723 | ObjectExtractorSimpleBody |
netcoreapp3.1 | 404ns | 1.97ns | 8.59ns | 0 | 0 | 0 | 272 B |
| #7723 | ObjectExtractorSimpleBody |
net472 | 302ns | 0.044ns | 0.17ns | 0.0441 | 0 | 0 | 281 B |
| #7723 | ObjectExtractorMoreComplexBody |
net6.0 | 6.35μs | 27.5ns | 110ns | 0 | 0 | 0 | 3.78 KB |
| #7723 | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.78μs | 35.9ns | 144ns | 0 | 0 | 0 | 3.69 KB |
| #7723 | ObjectExtractorMoreComplexBody |
net472 | 6.66μs | 1.97ns | 7.63ns | 0.6 | 0 | 0 | 3.8 KB |
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7723
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs‑net472
2.16 KB
2.17 KB
11 B
0.51%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs‑net472 | 2.16 KB | 2.17 KB | 11 B | 0.51% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EncodeArgs |
net6.0 | 76.9μs | 168ns | 652ns | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
netcoreapp3.1 | 96.7μs | 280ns | 1.05μs | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
net472 | 112μs | 15.4ns | 59.7ns | 5.02 | 0 | 0 | 32.5 KB |
| master | EncodeLegacyArgs |
net6.0 | 144μs | 47.8ns | 179ns | 0 | 0 | 0 | 2.15 KB |
| master | EncodeLegacyArgs |
netcoreapp3.1 | 199μs | 189ns | 732ns | 0 | 0 | 0 | 2.14 KB |
| master | EncodeLegacyArgs |
net472 | 262μs | 150ns | 583ns | 0 | 0 | 0 | 2.16 KB |
| #7723 | EncodeArgs |
net6.0 | 76μs | 307ns | 1.15μs | 0 | 0 | 0 | 32.4 KB |
| #7723 | EncodeArgs |
netcoreapp3.1 | 97.6μs | 312ns | 1.21μs | 0 | 0 | 0 | 32.4 KB |
| #7723 | EncodeArgs |
net472 | 109μs | 42.9ns | 166ns | 4.88 | 0 | 0 | 32.51 KB |
| #7723 | EncodeLegacyArgs |
net6.0 | 143μs | 41.9ns | 157ns | 0 | 0 | 0 | 2.15 KB |
| #7723 | EncodeLegacyArgs |
netcoreapp3.1 | 201μs | 247ns | 955ns | 0 | 0 | 0 | 2.14 KB |
| #7723 | EncodeLegacyArgs |
net472 | 269μs | 22.8ns | 88.2ns | 0 | 0 | 0 | 2.17 KB |
Benchmarks.Trace.Asm.AppSecWafBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | RunWafRealisticBenchmark |
net6.0 | 396μs | 89.2ns | 345ns | 0 | 0 | 0 | 4.55 KB |
| master | RunWafRealisticBenchmark |
netcoreapp3.1 | 411μs | 163ns | 586ns | 0 | 0 | 0 | 4.48 KB |
| master | RunWafRealisticBenchmark |
net472 | 429μs | 90.6ns | 351ns | 0 | 0 | 0 | 4.66 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net6.0 | 295μs | 84ns | 314ns | 0 | 0 | 0 | 2.24 KB |
| master | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 297μs | 106ns | 409ns | 0 | 0 | 0 | 2.22 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net472 | 314μs | 25.1ns | 93.8ns | 0 | 0 | 0 | 2.29 KB |
| #7723 | RunWafRealisticBenchmark |
net6.0 | 396μs | 98.1ns | 380ns | 0 | 0 | 0 | 4.55 KB |
| #7723 | RunWafRealisticBenchmark |
netcoreapp3.1 | 416μs | 1.07μs | 4.14μs | 0 | 0 | 0 | 4.48 KB |
| #7723 | RunWafRealisticBenchmark |
net472 | 438μs | 61.2ns | 229ns | 0 | 0 | 0 | 4.66 KB |
| #7723 | RunWafRealisticBenchmarkWithAttack |
net6.0 | 286μs | 30.5ns | 110ns | 0 | 0 | 0 | 2.24 KB |
| #7723 | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 300μs | 131ns | 474ns | 0 | 0 | 0 | 2.22 KB |
| #7723 | RunWafRealisticBenchmarkWithAttack |
net472 | 312μs | 32.3ns | 117ns | 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 | 61.5μs | 62.5ns | 225ns | 0 | 0 | 0 | 14.52 KB |
| master | SendRequest |
netcoreapp3.1 | 73.6μs | 399ns | 2.15μs | 0 | 0 | 0 | 17.42 KB |
| master | SendRequest |
net472 | 0.00285ns | 0.00147ns | 0.00569ns | 0 | 0 | 0 | 0 b |
| #7723 | SendRequest |
net6.0 | 60.5μs | 41.4ns | 155ns | 0 | 0 | 0 | 14.52 KB |
| #7723 | SendRequest |
netcoreapp3.1 | 70.9μs | 159ns | 636ns | 0 | 0 | 0 | 17.42 KB |
| #7723 | SendRequest |
net472 | 0.00169ns | 0.00121ns | 0.0047ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CharSliceBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7723
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0
2 B
7 B
5 B
250.00%
Fewer allocations 🎉 in #7723
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472
48 B
47 B
-1 B
-2.08%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net472
85 B
73 B
-12 B
-14.12%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0
4 B
3 B
-1 B
-25.00%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1
1 B
0 b
-1 B
-100.00%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 | 2 B | 7 B | 5 B | 250.00% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472 | 48 B | 47 B | -1 B | -2.08% |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net472 | 85 B | 73 B | -12 B | -14.12% |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0 | 4 B | 3 B | -1 B | -25.00% |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1 | 1 B | 0 b | -1 B | -100.00% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | OriginalCharSlice |
net6.0 | 1.95ms | 169ns | 654ns | 0 | 0 | 0 | 640.01 KB |
| master | OriginalCharSlice |
netcoreapp3.1 | 2.11ms | 2.98μs | 10.8μs | 0 | 0 | 0 | 640 KB |
| master | OriginalCharSlice |
net472 | 2.69ms | 176ns | 681ns | 100 | 0 | 0 | 641.95 KB |
| master | OptimizedCharSlice |
net6.0 | 1.41ms | 551ns | 2.13μs | 0 | 0 | 0 | 2 B |
| master | OptimizedCharSlice |
netcoreapp3.1 | 1.79ms | 4.21μs | 16.3μs | 0 | 0 | 0 | 1 B |
| master | OptimizedCharSlice |
net472 | 2.07ms | 367ns | 1.32μs | 0 | 0 | 0 | 85 B |
| master | OptimizedCharSliceWithPool |
net6.0 | 856μs | 29ns | 109ns | 0 | 0 | 0 | 4 B |
| master | OptimizedCharSliceWithPool |
netcoreapp3.1 | 801μs | 71ns | 275ns | 0 | 0 | 0 | 1 B |
| master | OptimizedCharSliceWithPool |
net472 | 1.18ms | 110ns | 427ns | 0 | 0 | 0 | 48 B |
| #7723 | OriginalCharSlice |
net6.0 | 1.91ms | 5.65μs | 21.1μs | 0 | 0 | 0 | 640.01 KB |
| #7723 | OriginalCharSlice |
netcoreapp3.1 | 2.11ms | 3.03μs | 11.3μs | 0 | 0 | 0 | 640 KB |
| #7723 | OriginalCharSlice |
net472 | 2.65ms | 73.8ns | 276ns | 100 | 0 | 0 | 641.95 KB |
| #7723 | OptimizedCharSlice |
net6.0 | 1.4ms | 432ns | 1.67μs | 0 | 0 | 0 | 7 B |
| #7723 | OptimizedCharSlice |
netcoreapp3.1 | 1.69ms | 434ns | 1.68μs | 0 | 0 | 0 | 1 B |
| #7723 | OptimizedCharSlice |
net472 | 1.98ms | 768ns | 2.98μs | 0 | 0 | 0 | 73 B |
| #7723 | OptimizedCharSliceWithPool |
net6.0 | 842μs | 63.6ns | 246ns | 0 | 0 | 0 | 3 B |
| #7723 | OptimizedCharSliceWithPool |
netcoreapp3.1 | 817μs | 150ns | 580ns | 0 | 0 | 0 | 0 b |
| #7723 | OptimizedCharSliceWithPool |
net472 | 1.15ms | 133ns | 516ns | 0 | 0 | 0 | 47 B |
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 698μs | 3.39μs | 13.6μs | 0 | 0 | 0 | 41.63 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 730μs | 4.23μs | 37.6μs | 0 | 0 | 0 | 41.93 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 884μs | 4.04μs | 15.6μs | 8.33 | 0 | 0 | 56.12 KB |
| #7723 | WriteAndFlushEnrichedTraces |
net6.0 | 690μs | 670ns | 2.6μs | 0 | 0 | 0 | 41.66 KB |
| #7723 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 746μs | 3.96μs | 19.8μs | 0 | 0 | 0 | 41.8 KB |
| #7723 | WriteAndFlushEnrichedTraces |
net472 | 932μs | 4.85μs | 23.8μs | 4.46 | 0 | 0 | 55.86 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 | 3.92ns | 15.2ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
netcoreapp3.1 | 2.52μs | 11.9ns | 46.3ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
net472 | 2.9μs | 2ns | 7.48ns | 0.145 | 0.0145 | 0 | 987 B |
| #7723 | ExecuteNonQuery |
net6.0 | 1.91μs | 9.03ns | 35ns | 0 | 0 | 0 | 1.02 KB |
| #7723 | ExecuteNonQuery |
netcoreapp3.1 | 2.56μs | 8.84ns | 34.2ns | 0 | 0 | 0 | 1.02 KB |
| #7723 | ExecuteNonQuery |
net472 | 2.72μs | 5.78ns | 22.4ns | 0.149 | 0.0135 | 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.7μs | 2.3ns | 8.93ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
netcoreapp3.1 | 2.25μs | 7.91ns | 30.6ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
net472 | 3.58μs | 5.55ns | 21.5ns | 0.159 | 0 | 0 | 1.04 KB |
| master | CallElasticsearchAsync |
net6.0 | 1.87μs | 7.49ns | 29ns | 0 | 0 | 0 | 1.01 KB |
| master | CallElasticsearchAsync |
netcoreapp3.1 | 2.33μs | 11ns | 42.6ns | 0 | 0 | 0 | 1.08 KB |
| master | CallElasticsearchAsync |
net472 | 3.68μs | 4.81ns | 18.6ns | 0.165 | 0 | 0 | 1.1 KB |
| #7723 | CallElasticsearch |
net6.0 | 1.72μs | 7.63ns | 29.5ns | 0 | 0 | 0 | 1.03 KB |
| #7723 | CallElasticsearch |
netcoreapp3.1 | 2.19μs | 10.1ns | 39.1ns | 0 | 0 | 0 | 1.03 KB |
| #7723 | CallElasticsearch |
net472 | 3.71μs | 3.7ns | 13.8ns | 0.148 | 0 | 0 | 1.04 KB |
| #7723 | CallElasticsearchAsync |
net6.0 | 1.8μs | 8.78ns | 35.1ns | 0 | 0 | 0 | 1.01 KB |
| #7723 | CallElasticsearchAsync |
netcoreapp3.1 | 2.41μs | 8.56ns | 33.2ns | 0 | 0 | 0 | 1.08 KB |
| #7723 | CallElasticsearchAsync |
net472 | 3.9μs | 3.38ns | 13.1ns | 0.156 | 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.85μs | 3.74ns | 14.5ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
netcoreapp3.1 | 2.36μs | 8.18ns | 30.6ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
net472 | 2.54μs | 1.53ns | 5.92ns | 0.141 | 0 | 0 | 915 B |
| #7723 | ExecuteAsync |
net6.0 | 1.92μs | 2.96ns | 11.5ns | 0 | 0 | 0 | 952 B |
| #7723 | ExecuteAsync |
netcoreapp3.1 | 2.58μs | 2.49ns | 9.63ns | 0 | 0 | 0 | 952 B |
| #7723 | ExecuteAsync |
net472 | 2.56μs | 0.837ns | 3.13ns | 0.141 | 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.86μs | 7.22ns | 27.9ns | 0 | 0 | 0 | 2.36 KB |
| master | SendAsync |
netcoreapp3.1 | 8.6μs | 18.5ns | 71.7ns | 0 | 0 | 0 | 2.9 KB |
| master | SendAsync |
net472 | 12.1μs | 8.1ns | 31.4ns | 0.484 | 0 | 0 | 3.18 KB |
| #7723 | SendAsync |
net6.0 | 6.74μs | 6.26ns | 24.3ns | 0 | 0 | 0 | 2.36 KB |
| #7723 | SendAsync |
netcoreapp3.1 | 8.59μs | 13.1ns | 50.6ns | 0 | 0 | 0 | 2.9 KB |
| #7723 | SendAsync |
net472 | 12μs | 8.64ns | 33.5ns | 0.481 | 0 | 0 | 3.18 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7723
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472
57.34 KB
65.54 KB
8.19 KB
14.29%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0
257.82 KB
275.9 KB
18.07 KB
7.01%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0
43.1 KB
43.47 KB
368 B
0.85%
Fewer allocations 🎉 in #7723
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
272.36 KB
258.12 KB
-14.24 KB
-5.23%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1
46.1 KB
43.23 KB
-2.87 KB
-6.23%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 | 57.34 KB | 65.54 KB | 8.19 KB | 14.29% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 | 257.82 KB | 275.9 KB | 18.07 KB | 7.01% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 | 43.1 KB | 43.47 KB | 368 B | 0.85% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 | 272.36 KB | 258.12 KB | -14.24 KB | -5.23% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1 | 46.1 KB | 43.23 KB | -2.87 KB | -6.23% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StringConcatBenchmark |
net6.0 | 46.5μs | 519ns | 4.96μs | 0 | 0 | 0 | 43.1 KB |
| master | StringConcatBenchmark |
netcoreapp3.1 | 49.6μs | 277ns | 2.36μs | 0 | 0 | 0 | 46.1 KB |
| master | StringConcatBenchmark |
net472 | 58μs | 146ns | 545ns | 0 | 0 | 0 | 57.34 KB |
| master | StringConcatAspectBenchmark |
net6.0 | 514μs | 1.64μs | 5.68μs | 0 | 0 | 0 | 257.82 KB |
| master | StringConcatAspectBenchmark |
netcoreapp3.1 | 519μs | 1.2μs | 4.34μs | 0 | 0 | 0 | 272.36 KB |
| master | StringConcatAspectBenchmark |
net472 | 404μs | 2μs | 16.5μs | 0 | 0 | 0 | 278.53 KB |
| #7723 | StringConcatBenchmark |
net6.0 | 44.9μs | 241ns | 1.55μs | 0 | 0 | 0 | 43.47 KB |
| #7723 | StringConcatBenchmark |
netcoreapp3.1 | 50.6μs | 270ns | 2.04μs | 0 | 0 | 0 | 43.23 KB |
| #7723 | StringConcatBenchmark |
net472 | 57.9μs | 182ns | 655ns | 0 | 0 | 0 | 65.54 KB |
| #7723 | StringConcatAspectBenchmark |
net6.0 | 502μs | 2.45μs | 9.81μs | 0 | 0 | 0 | 275.9 KB |
| #7723 | StringConcatAspectBenchmark |
netcoreapp3.1 | 505μs | 1.44μs | 5.4μs | 0 | 0 | 0 | 258.12 KB |
| #7723 | StringConcatAspectBenchmark |
net472 | 401μs | 1.9μs | 13.2μs | 0 | 0 | 0 | 278.53 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.63μs | 12.4ns | 49.7ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
netcoreapp3.1 | 3.62μs | 16.7ns | 64.5ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
net472 | 4.12μs | 4.34ns | 16.8ns | 0.244 | 0 | 0 | 1.64 KB |
| #7723 | EnrichedLog |
net6.0 | 2.62μs | 14ns | 70ns | 0 | 0 | 0 | 1.7 KB |
| #7723 | EnrichedLog |
netcoreapp3.1 | 3.66μs | 16.9ns | 65.3ns | 0 | 0 | 0 | 1.7 KB |
| #7723 | EnrichedLog |
net472 | 3.99μs | 4.43ns | 16.6ns | 0.242 | 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 | 127μs | 257ns | 890ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
netcoreapp3.1 | 133μs | 165ns | 596ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
net472 | 173μs | 284ns | 1.1μs | 0 | 0 | 0 | 4.52 KB |
| #7723 | EnrichedLog |
net6.0 | 126μs | 174ns | 650ns | 0 | 0 | 0 | 4.31 KB |
| #7723 | EnrichedLog |
netcoreapp3.1 | 132μs | 181ns | 654ns | 0 | 0 | 0 | 4.31 KB |
| #7723 | EnrichedLog |
net472 | 167μs | 40.7ns | 158ns | 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 | 5.13μs | 17.6ns | 68.1ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
netcoreapp3.1 | 6.75μs | 15.4ns | 59.5ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
net472 | 7.51μs | 8.31ns | 32.2ns | 0.3 | 0 | 0 | 2.08 KB |
| #7723 | EnrichedLog |
net6.0 | 5.06μs | 5.41ns | 21ns | 0 | 0 | 0 | 2.26 KB |
| #7723 | EnrichedLog |
netcoreapp3.1 | 6.95μs | 12.6ns | 48.8ns | 0 | 0 | 0 | 2.26 KB |
| #7723 | EnrichedLog |
net472 | 7.45μs | 5.56ns | 21.6ns | 0.299 | 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.98μs | 0.673ns | 2.61ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
netcoreapp3.1 | 2.65μs | 11.8ns | 45.6ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
net472 | 3.15μs | 6.36ns | 24.6ns | 0.187 | 0 | 0 | 1.2 KB |
| #7723 | SendReceive |
net6.0 | 1.93μs | 7.51ns | 29.1ns | 0 | 0 | 0 | 1.2 KB |
| #7723 | SendReceive |
netcoreapp3.1 | 2.57μs | 12.9ns | 54.9ns | 0 | 0 | 0 | 1.2 KB |
| #7723 | SendReceive |
net472 | 3.09μs | 4.91ns | 18.4ns | 0.182 | 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.21μs | 2.86ns | 11.1ns | 0 | 0 | 0 | 1.58 KB |
| master | EnrichedLog |
netcoreapp3.1 | 5.49μs | 16.8ns | 65ns | 0 | 0 | 0 | 1.63 KB |
| master | EnrichedLog |
net472 | 6.45μs | 7.3ns | 28.3ns | 0.292 | 0 | 0 | 2.03 KB |
| #7723 | EnrichedLog |
net6.0 | 4.34μs | 14.7ns | 55.2ns | 0 | 0 | 0 | 1.58 KB |
| #7723 | EnrichedLog |
netcoreapp3.1 | 5.55μs | 6.5ns | 25.2ns | 0 | 0 | 0 | 1.63 KB |
| #7723 | EnrichedLog |
net472 | 6.48μs | 10.1ns | 39.1ns | 0.29 | 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 | 790ns | 4.27ns | 22.2ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
netcoreapp3.1 | 965ns | 5.37ns | 32.7ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
net472 | 921ns | 0.498ns | 1.93ns | 0.088 | 0 | 0 | 578 B |
| master | StartFinishScope |
net6.0 | 924ns | 4.61ns | 20.1ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
netcoreapp3.1 | 1.18μs | 6.09ns | 30.5ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
net472 | 1.12μs | 0.542ns | 2.1ns | 0.1 | 0 | 0 | 658 B |
| #7723 | StartFinishSpan |
net6.0 | 786ns | 4.22ns | 22.3ns | 0 | 0 | 0 | 576 B |
| #7723 | StartFinishSpan |
netcoreapp3.1 | 969ns | 4.95ns | 24.3ns | 0 | 0 | 0 | 576 B |
| #7723 | StartFinishSpan |
net472 | 940ns | 0.158ns | 0.571ns | 0.0894 | 0 | 0 | 578 B |
| #7723 | StartFinishScope |
net6.0 | 907ns | 4.86ns | 26.2ns | 0 | 0 | 0 | 696 B |
| #7723 | StartFinishScope |
netcoreapp3.1 | 1.18μs | 6.54ns | 38.1ns | 0 | 0 | 0 | 696 B |
| #7723 | StartFinishScope |
net472 | 1.12μs | 0.083ns | 0.31ns | 0.101 | 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.11μs | 1.63ns | 6.32ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
netcoreapp3.1 | 1.45μs | 5ns | 18.7ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
net472 | 1.47μs | 1.06ns | 4.1ns | 0.102 | 0 | 0 | 658 B |
| #7723 | RunOnMethodBegin |
net6.0 | 1.03μs | 4.68ns | 18.1ns | 0 | 0 | 0 | 696 B |
| #7723 | RunOnMethodBegin |
netcoreapp3.1 | 1.45μs | 0.902ns | 3.49ns | 0 | 0 | 0 | 696 B |
| #7723 | RunOnMethodBegin |
net472 | 1.47μs | 1.03ns | 4ns | 0.103 | 0 | 0 | 658 B |
8c472a5 to
8e19e3a
Compare
60c7874 to
c691a0e
Compare
8e19e3a to
7940c31
Compare
c691a0e to
a52caed
Compare
This comment has been minimized.
This comment has been minimized.
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.
Automated code review by Claude Code
This PR successfully refactors TracerSettings to remove mutable properties and require explicit access through MutableSettings. The changes are generally consistent and well-executed. I've identified a few specific issues below for consideration.
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.
Automated code review by Claude Code
This PR successfully refactors TracerSettings to remove mutable properties and require explicit access through MutableSettings. The changes are generally consistent and well-executed.
…ndows (#7721) ## Summary of changes Enforces that you can't _change_ the `AgentUri` to be a UDS Uri if you're on Windows ## Reason for change The trace exporter doesn't work with UDS on Windows, so we have a check in `TracerSettings` that disables the pipeline if we find this scenario. However, user's can still _change_ the agent URI at runtime in code (😭). We currently assume that the data pipeline won't be toggled at runtime (we _do_ allow for reconfiguring it in general, but not for completely removing or reintroducing). Changing this to allow the scenario would be a pain, so instead this PR blocks you from setting a UDS URI in code if you're on Windows. The good news is that as far as I can tell, noone does this today, so while _technically_ it could be considered a breaking change, I think it's ok. ## Implementation details - Throw an `ArgumentException` in the Datadog.Trace.Manual library, if you're on Windows (or .NET FX) and you try to set a UDS agent URI (using the same "detection" we do in `ExporterSettings`. - Add a check in the Instrumentation of `Tracer.Configure()` to make sure it hasn't slipped through. This could happen if a customer was using an old version of the Datadog.Trace NuGet package with a newer version of auto instrumentation. Note that this adds two additional framework references for .NET Core 3.1+, to check if we're on Windows. ## Test coverage Added an extra step to the manual instrumentation integration test to confirm we throw ## Other details https://datadoghq.atlassian.net/browse/LANGPLAT-819 Part of a config stack - #7522 - #7525 - #7530 - #7532 - #7543 - #7544 - #7721 👈 - #7722 - #7695 - #7723 - #7724
7940c31 to
2dfae3d
Compare
a52caed to
36d5027
Compare
## Summary of changes Add a helper for comparing `ReadOnlyDictionary<>` instances ## Reason for change As part of the config work, we need to detect if tags have changed when customers do a manual/remote config update. This helper makes it easy ## Implementation details Added a `SequenceEqual` extension method. Note that I used `SequenceEqual` because it _already_ exists in _System.Linq_, but I could see an argument that it's too easy to use the wrong one, and instead we could use a different name? `IsSameAs(other)`? Also, I only wrote this for `ReadOnlyDictionary<>` because that's all we need, it's what we use for all our setting dictionaries, and it will be (a tiny bit) faster than making it `IDictionary<>`, but happy to change if people feel strongly. ## Test coverage Added unit tests ## Other details https://datadoghq.atlassian.net/browse/LANGPLAT-819 Part of a config stack - #7522 - #7525 - #7530 - #7532 - #7543 - #7544 - #7721 - #7722 👈 - #7695 - #7723 - #7724 --------- Co-authored-by: Steven Bouwkamp <steven.bouwkamp@datadoghq.com>
2dfae3d to
ea5edf6
Compare
36d5027 to
717fff8
Compare
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (7723) 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 (7723) - mean (72ms) : 69, 75
master - mean (76ms) : 71, 80
section Bailout
This PR (7723) - mean (76ms) : 74, 78
master - mean (78ms) : 76, 81
section CallTarget+Inlining+NGEN
This PR (7723) - mean (1,082ms) : 1018, 1145
master - mean (1,121ms) : 1056, 1186
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 (7723) - mean (116ms) : 112, 121
master - mean (117ms) : 113, 122
section Bailout
This PR (7723) - mean (117ms) : 113, 121
master - mean (122ms) : 117, 127
section CallTarget+Inlining+NGEN
This PR (7723) - mean (805ms) : 777, 832
master - mean (801ms) : 756, 846
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7723) - mean (106ms) : 100, 112
master - mean (103ms) : 99, 106
section Bailout
This PR (7723) - mean (106ms) : 101, 111
master - mean (103ms) : 101, 106
section CallTarget+Inlining+NGEN
This PR (7723) - mean (761ms) : 724, 798
master - mean (740ms) : 704, 775
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7723) - mean (105ms) : 100, 109
master - mean (100ms) : 97, 102
section Bailout
This PR (7723) - mean (106ms) : crit, 103, 110
master - mean (97ms) : 94, 100
section CallTarget+Inlining+NGEN
This PR (7723) - mean (721ms) : 690, 751
master - mean (687ms) : 666, 708
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 (7723) - mean (194ms) : 189, 198
master - mean (199ms) : 194, 203
section Bailout
This PR (7723) - mean (197ms) : 194, 200
master - mean (197ms) : 190, 204
section CallTarget+Inlining+NGEN
This PR (7723) - mean (1,179ms) : 1124, 1233
master - mean (1,197ms) : 1124, 1270
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 (7723) - mean (282ms) : 271, 293
master - mean (296ms) : 290, 303
section Bailout
This PR (7723) - mean (279ms) : 271, 287
master - mean (300ms) : 294, 305
section CallTarget+Inlining+NGEN
This PR (7723) - mean (964ms) : 918, 1011
master - mean (990ms) : 949, 1030
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7723) - mean (270ms) : 265, 275
master - mean (282ms) : 271, 293
section Bailout
This PR (7723) - mean (271ms) : 266, 277
master - mean (277ms) : 271, 283
section CallTarget+Inlining+NGEN
This PR (7723) - mean (938ms) : 879, 996
master - mean (949ms) : 884, 1014
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7723) - mean (271ms) : 266, 277
master - mean (274ms) : 266, 282
section Bailout
This PR (7723) - mean (272ms) : 264, 279
master - mean (269ms) : 263, 274
section CallTarget+Inlining+NGEN
This PR (7723) - mean (864ms) : 832, 895
master - mean (866ms) : 844, 887
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
…"mutable" version This is a stop gap primarily to highlight everywhere that is _currently_ relying on these types, which will need to subscribe to updates
dd7b7eb to
10c89c9
Compare
717fff8 to
21e9e1c
Compare
Summary of changes
Instead of exposing settings like
ServiceVerionandEnvironmentonTracerSettings, only expose them onMutableSettingsReason for change
This is all part of the refactoring towards having
TracerSettingsbeing an immutable settings object, that's created once on app startup, and fixed for the lifetime.ServiceVerionandEnvironmentcurrently delegate to theMutableSettingsobject stored onTracerSettings, but are going to move that elsewhere shortly so that consumers can subscribe to changesImplementation details
For this PR, it's just a case of changing
TracerSettings.XXX=>TracerSettings.Mutable.XXX. A future PR will then subsequently "fix" these usages properly. This is just a small step to be able to remove the mutable properties fromTracerSettingsTest coverage
Just a refactoring, covered by existing tests.
Other details
https://datadoghq.atlassian.net/browse/LANGPLAT-819
Part of a config stack
MutableSettingsfromTracerSettings#7522MutableSettingson dynamic config changes #7525DefaultServiceNametoMutableSettings#7530PerTraceSettings.GetServiceName()#7532TracerSettingsto useMutableSettingswhere appropriate #7543IsIntegrationEnabled(),IsErrorStatusCode(), andGetIntegrationAnalyticsSampleRate()#7544DictionaryExtensions.SequenceEqual#7722SettingsManagerfor managing mutable settings and ExporterSettings #7695TracerSettingswhich can change at runtime #7723 👈MutableSettingsandExporterSettingswithout rebuilding #7724