-
Notifications
You must be signed in to change notification settings - Fork 151
Add helper DictionaryExtensions.SequenceEqual
#7722
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
Conversation
BenchmarksBenchmarks Report for benchmark platform 🐌Benchmarks for #7722 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 ✔️ More allocations
|
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net472 | 6.1 KB | 6.14 KB | 46 B | 0.75% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StartStopWithChild |
net6.0 | 10.4μs | 58.6ns | 397ns | 0 | 0 | 0 | 5.53 KB |
| master | StartStopWithChild |
netcoreapp3.1 | 14.4μs | 65.8ns | 255ns | 0 | 0 | 0 | 5.7 KB |
| master | StartStopWithChild |
net472 | 22μs | 55.5ns | 200ns | 0.888 | 0.222 | 0 | 6.1 KB |
| #7722 | StartStopWithChild |
net6.0 | 10.4μs | 58.9ns | 391ns | 0 | 0 | 0 | 5.51 KB |
| #7722 | StartStopWithChild |
netcoreapp3.1 | 13.4μs | 70.4ns | 366ns | 0 | 0 | 0 | 5.72 KB |
| #7722 | StartStopWithChild |
net472 | 22.3μs | 124ns | 731ns | 0.966 | 0.29 | 0 | 6.14 KB |
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Fewer allocations 🎉
Fewer allocations 🎉 in #7722
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces‑net472
3.35 KB
3.31 KB
-46 B
-1.37%
| 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 | 947μs | 302ns | 1.17μs | 0 | 0 | 0 | 2.71 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.02ms | 61.3ns | 212ns | 0 | 0 | 0 | 2.7 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 1.2ms | 238ns | 890ns | 0 | 0 | 0 | 3.35 KB |
| #7722 | WriteAndFlushEnrichedTraces |
net6.0 | 939μs | 118ns | 426ns | 0 | 0 | 0 | 2.71 KB |
| #7722 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.05ms | 314ns | 1.22μs | 0 | 0 | 0 | 2.7 KB |
| #7722 | WriteAndFlushEnrichedTraces |
net472 | 1.21ms | 453ns | 1.76μs | 0 | 0 | 0 | 3.31 KB |
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Unknown 🤷 Fewer allocations 🎉
Fewer allocations 🎉 in #7722
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody‑net6.0
1.22 KB
0 b
-1.22 KB
-100.00%
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody‑netcoreapp3.1
1.2 KB
0 b
-1.2 KB
-100.00%
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody‑net472
1.23 KB
0 b
-1.23 KB
-100.00%
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody‑net6.0
4.72 KB
0 b
-4.72 KB
-100.00%
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody‑netcoreapp3.1
4.62 KB
0 b
-4.62 KB
-100.00%
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody‑net472
4.74 KB
0 b
-4.74 KB
-100.00%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody‑net6.0 | 1.22 KB | 0 b | -1.22 KB | -100.00% |
| Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody‑netcoreapp3.1 | 1.2 KB | 0 b | -1.2 KB | -100.00% |
| Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody‑net472 | 1.23 KB | 0 b | -1.23 KB | -100.00% |
| Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody‑net6.0 | 4.72 KB | 0 b | -4.72 KB | -100.00% |
| Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody‑netcoreapp3.1 | 4.62 KB | 0 b | -4.62 KB | -100.00% |
| Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody‑net472 | 4.74 KB | 0 b | -4.74 KB | -100.00% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | AllCycleSimpleBody |
net6.0 | 1.08μs | 5.97ns | 38.2ns | 0 | 0 | 0 | 1.22 KB |
| master | AllCycleSimpleBody |
netcoreapp3.1 | 1.43μs | 6.95ns | 28.6ns | 0 | 0 | 0 | 1.2 KB |
| master | AllCycleSimpleBody |
net472 | 1.07μs | 0.276ns | 1.03ns | 0.192 | 0 | 0 | 1.23 KB |
| master | AllCycleMoreComplexBody |
net6.0 | 7.15μs | 35.3ns | 162ns | 0 | 0 | 0 | 4.72 KB |
| master | AllCycleMoreComplexBody |
netcoreapp3.1 | 8.97μs | 2.02ns | 7.3ns | 0 | 0 | 0 | 4.62 KB |
| master | AllCycleMoreComplexBody |
net472 | 7.69μs | 3.92ns | 15.2ns | 0.73 | 0 | 0 | 4.74 KB |
| master | ObjectExtractorSimpleBody |
net6.0 | 316ns | 1.76ns | 11.4ns | 0 | 0 | 0 | 280 B |
| master | ObjectExtractorSimpleBody |
netcoreapp3.1 | 399ns | 1.42ns | 5.51ns | 0 | 0 | 0 | 272 B |
| master | ObjectExtractorSimpleBody |
net472 | 297ns | 0.0403ns | 0.151ns | 0.0433 | 0 | 0 | 281 B |
| master | ObjectExtractorMoreComplexBody |
net6.0 | 6.24μs | 27.9ns | 108ns | 0 | 0 | 0 | 3.78 KB |
| master | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.88μs | 27.1ns | 105ns | 0 | 0 | 0 | 3.69 KB |
| master | ObjectExtractorMoreComplexBody |
net472 | 6.63μs | 1.48ns | 5.75ns | 0.597 | 0 | 0 | 3.8 KB |
| #7722 | AllCycleSimpleBody |
net6.0 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| #7722 | AllCycleSimpleBody |
netcoreapp3.1 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| #7722 | AllCycleSimpleBody |
net472 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| #7722 | AllCycleMoreComplexBody |
net6.0 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| #7722 | AllCycleMoreComplexBody |
netcoreapp3.1 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| #7722 | AllCycleMoreComplexBody |
net472 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| #7722 | ObjectExtractorSimpleBody |
net6.0 | 325ns | 0.0859ns | 0.333ns | 0 | 0 | 0 | 280 B |
| #7722 | ObjectExtractorSimpleBody |
netcoreapp3.1 | 398ns | 2.24ns | 15.3ns | 0 | 0 | 0 | 272 B |
| #7722 | ObjectExtractorSimpleBody |
net472 | 296ns | 0.0164ns | 0.0614ns | 0.0434 | 0 | 0 | 281 B |
| #7722 | ObjectExtractorMoreComplexBody |
net6.0 | 6.27μs | 31.2ns | 132ns | 0 | 0 | 0 | 3.78 KB |
| #7722 | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.87μs | 34.6ns | 134ns | 0 | 0 | 0 | 3.69 KB |
| #7722 | ObjectExtractorMoreComplexBody |
net472 | 6.69μs | 1.2ns | 4.15ns | 0.601 | 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 | 77.1μs | 39.9ns | 149ns | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
netcoreapp3.1 | 98μs | 295ns | 1.14μs | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
net472 | 112μs | 24.3ns | 94ns | 5.07 | 0 | 0 | 32.51 KB |
| master | EncodeLegacyArgs |
net6.0 | 142μs | 63.9ns | 248ns | 0 | 0 | 0 | 2.15 KB |
| master | EncodeLegacyArgs |
netcoreapp3.1 | 199μs | 593ns | 2.3μs | 0 | 0 | 0 | 2.14 KB |
| master | EncodeLegacyArgs |
net472 | 263μs | 60.8ns | 235ns | 0 | 0 | 0 | 2.16 KB |
| #7722 | EncodeArgs |
net6.0 | 76.3μs | 297ns | 1.15μs | 0 | 0 | 0 | 32.4 KB |
| #7722 | EncodeArgs |
netcoreapp3.1 | 97.7μs | 206ns | 796ns | 0 | 0 | 0 | 32.4 KB |
| #7722 | EncodeArgs |
net472 | 114μs | 60.5ns | 234ns | 5.13 | 0 | 0 | 32.51 KB |
| #7722 | EncodeLegacyArgs |
net6.0 | 143μs | 172ns | 667ns | 0 | 0 | 0 | 2.15 KB |
| #7722 | EncodeLegacyArgs |
netcoreapp3.1 | 196μs | 180ns | 696ns | 0 | 0 | 0 | 2.14 KB |
| #7722 | EncodeLegacyArgs |
net472 | 262μs | 18.5ns | 64.2ns | 0 | 0 | 0 | 2.16 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 | 390μs | 68.5ns | 247ns | 0 | 0 | 0 | 4.55 KB |
| master | RunWafRealisticBenchmark |
netcoreapp3.1 | 847μs | 3.96μs | 15.3μs | 0 | 0 | 0 | 4.48 KB |
| master | RunWafRealisticBenchmark |
net472 | 428μs | 66.1ns | 256ns | 0 | 0 | 0 | 4.66 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net6.0 | 290μs | 168ns | 652ns | 0 | 0 | 0 | 2.24 KB |
| master | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 297μs | 139ns | 501ns | 0 | 0 | 0 | 2.22 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net472 | 308μs | 43.4ns | 168ns | 0 | 0 | 0 | 2.29 KB |
| #7722 | RunWafRealisticBenchmark |
net6.0 | 392μs | 46.5ns | 180ns | 0 | 0 | 0 | 4.55 KB |
| #7722 | RunWafRealisticBenchmark |
netcoreapp3.1 | 860μs | 2.54μs | 9.83μs | 0 | 0 | 0 | 4.48 KB |
| #7722 | RunWafRealisticBenchmark |
net472 | 427μs | 54.1ns | 210ns | 0 | 0 | 0 | 4.66 KB |
| #7722 | RunWafRealisticBenchmarkWithAttack |
net6.0 | 287μs | 88.6ns | 343ns | 0 | 0 | 0 | 2.24 KB |
| #7722 | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 298μs | 441ns | 1.53μs | 0 | 0 | 0 | 2.22 KB |
| #7722 | RunWafRealisticBenchmarkWithAttack |
net472 | 314μs | 37.3ns | 144ns | 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.8μs | 40.7ns | 147ns | 0 | 0 | 0 | 14.52 KB |
| master | SendRequest |
netcoreapp3.1 | 72.5μs | 133ns | 461ns | 0 | 0 | 0 | 17.42 KB |
| master | SendRequest |
net472 | 0.00254ns | 0.00127ns | 0.00492ns | 0 | 0 | 0 | 0 b |
| #7722 | SendRequest |
net6.0 | 62.6μs | 52.4ns | 203ns | 0 | 0 | 0 | 14.52 KB |
| #7722 | SendRequest |
netcoreapp3.1 | 72.2μs | 86.1ns | 333ns | 0 | 0 | 0 | 17.42 KB |
| #7722 | SendRequest |
net472 | 0.00186ns | 0.00125ns | 0.00466ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CharSliceBenchmark - Same speed ✔️ Fewer allocations 🎉
Fewer allocations 🎉 in #7722
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0
7 B
4 B
-3 B
-42.86%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0
4 B
2 B
-2 B
-50.00%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 | 7 B | 4 B | -3 B | -42.86% |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0 | 4 B | 2 B | -2 B | -50.00% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | OriginalCharSlice |
net6.0 | 1.89ms | 6.5μs | 25.2μs | 0 | 0 | 0 | 640 KB |
| master | OriginalCharSlice |
netcoreapp3.1 | 2.15ms | 8.71μs | 33.7μs | 0 | 0 | 0 | 640 KB |
| master | OriginalCharSlice |
net472 | 2.64ms | 145ns | 541ns | 100 | 0 | 0 | 641.95 KB |
| master | OptimizedCharSlice |
net6.0 | 1.45ms | 93.1ns | 348ns | 0 | 0 | 0 | 7 B |
| master | OptimizedCharSlice |
netcoreapp3.1 | 1.8ms | 238ns | 921ns | 0 | 0 | 0 | 1 B |
| master | OptimizedCharSlice |
net472 | 1.95ms | 459ns | 1.78μs | 0 | 0 | 0 | 73 B |
| master | OptimizedCharSliceWithPool |
net6.0 | 851μs | 77ns | 298ns | 0 | 0 | 0 | 4 B |
| master | OptimizedCharSliceWithPool |
netcoreapp3.1 | 798μs | 85.8ns | 332ns | 0 | 0 | 0 | 0 b |
| master | OptimizedCharSliceWithPool |
net472 | 1.14ms | 106ns | 409ns | 0 | 0 | 0 | 47 B |
| #7722 | OriginalCharSlice |
net6.0 | 1.93ms | 1.88μs | 7.02μs | 0 | 0 | 0 | 640 KB |
| #7722 | OriginalCharSlice |
netcoreapp3.1 | 2.11ms | 3.78μs | 13.6μs | 0 | 0 | 0 | 640 KB |
| #7722 | OriginalCharSlice |
net472 | 2.73ms | 382ns | 1.38μs | 100 | 0 | 0 | 641.95 KB |
| #7722 | OptimizedCharSlice |
net6.0 | 1.33ms | 452ns | 1.75μs | 0 | 0 | 0 | 4 B |
| #7722 | OptimizedCharSlice |
netcoreapp3.1 | 1.66ms | 395ns | 1.48μs | 0 | 0 | 0 | 1 B |
| #7722 | OptimizedCharSlice |
net472 | 1.98ms | 310ns | 1.2μs | 0 | 0 | 0 | 73 B |
| #7722 | OptimizedCharSliceWithPool |
net6.0 | 858μs | 11.8ns | 45.8ns | 0 | 0 | 0 | 2 B |
| #7722 | OptimizedCharSliceWithPool |
netcoreapp3.1 | 827μs | 56ns | 210ns | 0 | 0 | 0 | 0 b |
| #7722 | OptimizedCharSliceWithPool |
net472 | 1.14ms | 120ns | 466ns | 0 | 0 | 0 | 47 B |
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Slower ⚠️ More allocations ⚠️
Slower ⚠️ in #7722
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0
1.145
672,639.80
770,182.23
More allocations ⚠️ in #7722
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472
55.95 KB
56.7 KB
750 B
1.34%
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 | 1.145 | 672,639.80 | 770,182.23 |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 | 55.95 KB | 56.7 KB | 750 B | 1.34% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 671μs | 1.99μs | 7.69μs | 0 | 0 | 0 | 41.74 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 735μs | 942ns | 3.4μs | 0 | 0 | 0 | 42.01 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 898μs | 4.33μs | 16.8μs | 8.33 | 0 | 0 | 55.95 KB |
| #7722 | WriteAndFlushEnrichedTraces |
net6.0 | 772μs | 1.21μs | 4.68μs | 0 | 0 | 0 | 41.62 KB |
| #7722 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 714μs | 3.7μs | 17μs | 0 | 0 | 0 | 41.88 KB |
| #7722 | WriteAndFlushEnrichedTraces |
net472 | 902μs | 4.81μs | 25μs | 8.33 | 0 | 0 | 56.7 KB |
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | ExecuteNonQuery |
net6.0 | 1.92μs | 9.95ns | 45.6ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
netcoreapp3.1 | 2.62μs | 12.5ns | 48.3ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
net472 | 2.9μs | 5.92ns | 22.9ns | 0.146 | 0.0146 | 0 | 987 B |
| #7722 | ExecuteNonQuery |
net6.0 | 1.89μs | 0.61ns | 2.11ns | 0 | 0 | 0 | 1.02 KB |
| #7722 | ExecuteNonQuery |
netcoreapp3.1 | 2.74μs | 11.7ns | 45.1ns | 0 | 0 | 0 | 1.02 KB |
| #7722 | ExecuteNonQuery |
net472 | 2.82μs | 3.19ns | 11.9ns | 0.155 | 0.0141 | 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.66μs | 8.56ns | 40.2ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
netcoreapp3.1 | 2.21μs | 8.77ns | 34ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
net472 | 3.58μs | 2.11ns | 7.9ns | 0.161 | 0 | 0 | 1.04 KB |
| master | CallElasticsearchAsync |
net6.0 | 1.84μs | 7.13ns | 27.6ns | 0 | 0 | 0 | 1.01 KB |
| master | CallElasticsearchAsync |
netcoreapp3.1 | 2.39μs | 11.7ns | 48.4ns | 0 | 0 | 0 | 1.08 KB |
| master | CallElasticsearchAsync |
net472 | 3.66μs | 3.58ns | 12.9ns | 0.165 | 0 | 0 | 1.1 KB |
| #7722 | CallElasticsearch |
net6.0 | 1.75μs | 8.15ns | 32.6ns | 0 | 0 | 0 | 1.03 KB |
| #7722 | CallElasticsearch |
netcoreapp3.1 | 2.23μs | 3.55ns | 13.8ns | 0 | 0 | 0 | 1.03 KB |
| #7722 | CallElasticsearch |
net472 | 3.6μs | 2.73ns | 9.84ns | 0.162 | 0 | 0 | 1.04 KB |
| #7722 | CallElasticsearchAsync |
net6.0 | 1.86μs | 3.19ns | 12.4ns | 0 | 0 | 0 | 1.01 KB |
| #7722 | CallElasticsearchAsync |
netcoreapp3.1 | 2.4μs | 8.4ns | 32.5ns | 0 | 0 | 0 | 1.08 KB |
| #7722 | CallElasticsearchAsync |
net472 | 3.66μs | 1.56ns | 6.05ns | 0.164 | 0 | 0 | 1.1 KB |
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | ExecuteAsync |
net6.0 | 1.88μs | 8.7ns | 34.8ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
netcoreapp3.1 | 2.45μs | 8.02ns | 31.1ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
net472 | 2.57μs | 4.84ns | 18.7ns | 0.14 | 0 | 0 | 915 B |
| #7722 | ExecuteAsync |
net6.0 | 1.92μs | 8.92ns | 35.7ns | 0 | 0 | 0 | 952 B |
| #7722 | ExecuteAsync |
netcoreapp3.1 | 2.51μs | 7.82ns | 29.2ns | 0 | 0 | 0 | 952 B |
| #7722 | ExecuteAsync |
net472 | 2.64μs | 2.46ns | 9.21ns | 0.133 | 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 | 7.12μs | 26.2ns | 97.9ns | 0 | 0 | 0 | 2.36 KB |
| master | SendAsync |
netcoreapp3.1 | 8.49μs | 7.15ns | 27.7ns | 0 | 0 | 0 | 2.9 KB |
| master | SendAsync |
net472 | 12.6μs | 16.7ns | 64.7ns | 0.505 | 0 | 0 | 3.18 KB |
| #7722 | SendAsync |
net6.0 | 6.79μs | 7.36ns | 26.5ns | 0 | 0 | 0 | 2.36 KB |
| #7722 | SendAsync |
netcoreapp3.1 | 8.78μs | 21.6ns | 83.8ns | 0 | 0 | 0 | 2.9 KB |
| #7722 | SendAsync |
net472 | 12.4μs | 9.53ns | 36.9ns | 0.497 | 0 | 0 | 3.18 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Faster 🎉 More allocations ⚠️
Faster 🎉 in #7722
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
2.829
1,399,850.00
494,850.00
More allocations ⚠️ in #7722
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472
278.05 KB
281.35 KB
3.3 KB
1.19%
Fewer allocations 🎉 in #7722
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1
43.15 KB
42.71 KB
-440 B
-1.02%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0
286.74 KB
275.23 KB
-11.5 KB
-4.01%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0
46.48 KB
43.82 KB
-2.66 KB
-5.73%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
338.03 KB
256.69 KB
-81.34 KB
-24.06%
| Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 | 2.829 | 1,399,850.00 | 494,850.00 |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 | 278.05 KB | 281.35 KB | 3.3 KB | 1.19% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1 | 43.15 KB | 42.71 KB | -440 B | -1.02% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 | 286.74 KB | 275.23 KB | -11.5 KB | -4.01% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 | 46.48 KB | 43.82 KB | -2.66 KB | -5.73% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 | 338.03 KB | 256.69 KB | -81.34 KB | -24.06% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StringConcatBenchmark |
net6.0 | 46.1μs | 262ns | 2μs | 0 | 0 | 0 | 46.48 KB |
| master | StringConcatBenchmark |
netcoreapp3.1 | 57.5μs | 921ns | 9.16μs | 0 | 0 | 0 | 43.15 KB |
| master | StringConcatBenchmark |
net472 | 56.7μs | 248ns | 961ns | 0 | 0 | 0 | 65.54 KB |
| master | StringConcatAspectBenchmark |
net6.0 | 472μs | 2.36μs | 10.6μs | 0 | 0 | 0 | 286.74 KB |
| master | StringConcatAspectBenchmark |
netcoreapp3.1 | 1.4ms | 2.45μs | 9.49μs | 0 | 0 | 0 | 338.03 KB |
| master | StringConcatAspectBenchmark |
net472 | 409μs | 2.28μs | 13.9μs | 0 | 0 | 0 | 278.05 KB |
| #7722 | StringConcatBenchmark |
net6.0 | 42.2μs | 212ns | 1.23μs | 0 | 0 | 0 | 43.82 KB |
| #7722 | StringConcatBenchmark |
netcoreapp3.1 | 48μs | 277ns | 2.09μs | 0 | 0 | 0 | 42.71 KB |
| #7722 | StringConcatBenchmark |
net472 | 57.8μs | 127ns | 459ns | 0 | 0 | 0 | 65.54 KB |
| #7722 | StringConcatAspectBenchmark |
net6.0 | 480μs | 754ns | 2.61μs | 0 | 0 | 0 | 275.23 KB |
| #7722 | StringConcatAspectBenchmark |
netcoreapp3.1 | 498μs | 2.3μs | 8.59μs | 0 | 0 | 0 | 256.69 KB |
| #7722 | StringConcatAspectBenchmark |
net472 | 413μs | 2.33μs | 16μs | 0 | 0 | 0 | 281.35 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.6μs | 0.902ns | 3.49ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
netcoreapp3.1 | 3.66μs | 17.7ns | 77.3ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
net472 | 4μs | 4.97ns | 19.3ns | 0.259 | 0 | 0 | 1.64 KB |
| #7722 | EnrichedLog |
net6.0 | 2.66μs | 13.6ns | 62.5ns | 0 | 0 | 0 | 1.7 KB |
| #7722 | EnrichedLog |
netcoreapp3.1 | 3.63μs | 17.3ns | 69.2ns | 0 | 0 | 0 | 1.7 KB |
| #7722 | EnrichedLog |
net472 | 3.84μs | 2.83ns | 10.9ns | 0.249 | 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 | 122μs | 87.6ns | 339ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
netcoreapp3.1 | 126μs | 109ns | 393ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
net472 | 169μs | 149ns | 578ns | 0 | 0 | 0 | 4.52 KB |
| #7722 | EnrichedLog |
net6.0 | 122μs | 30.4ns | 118ns | 0 | 0 | 0 | 4.31 KB |
| #7722 | EnrichedLog |
netcoreapp3.1 | 129μs | 124ns | 481ns | 0 | 0 | 0 | 4.31 KB |
| #7722 | EnrichedLog |
net472 | 167μs | 225ns | 843ns | 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.06μs | 2.03ns | 7.85ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
netcoreapp3.1 | 6.78μs | 13.1ns | 50.9ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
net472 | 7.54μs | 9.05ns | 35.1ns | 0.3 | 0 | 0 | 2.08 KB |
| #7722 | EnrichedLog |
net6.0 | 5μs | 17.2ns | 62.1ns | 0 | 0 | 0 | 2.26 KB |
| #7722 | EnrichedLog |
netcoreapp3.1 | 7.02μs | 8.73ns | 33.8ns | 0 | 0 | 0 | 2.26 KB |
| #7722 | EnrichedLog |
net472 | 7.54μs | 4.57ns | 16.5ns | 0.304 | 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.11μs | 2.19ns | 8.48ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
netcoreapp3.1 | 2.59μs | 12.5ns | 54.4ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
net472 | 3.05μs | 3.87ns | 14.5ns | 0.184 | 0 | 0 | 1.2 KB |
| #7722 | SendReceive |
net6.0 | 2.02μs | 0.932ns | 3.49ns | 0 | 0 | 0 | 1.2 KB |
| #7722 | SendReceive |
netcoreapp3.1 | 2.66μs | 12.7ns | 50.7ns | 0 | 0 | 0 | 1.2 KB |
| #7722 | SendReceive |
net472 | 3.25μs | 3.97ns | 15.4ns | 0.179 | 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.37μs | 10.3ns | 40ns | 0 | 0 | 0 | 1.58 KB |
| master | EnrichedLog |
netcoreapp3.1 | 5.89μs | 16.4ns | 63.4ns | 0 | 0 | 0 | 1.63 KB |
| master | EnrichedLog |
net472 | 6.7μs | 7.75ns | 30ns | 0.301 | 0 | 0 | 2.03 KB |
| #7722 | EnrichedLog |
net6.0 | 4.29μs | 3.62ns | 14ns | 0 | 0 | 0 | 1.58 KB |
| #7722 | EnrichedLog |
netcoreapp3.1 | 5.67μs | 12.6ns | 48.6ns | 0 | 0 | 0 | 1.63 KB |
| #7722 | EnrichedLog |
net472 | 6.54μs | 6.88ns | 26.6ns | 0.293 | 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 | 778ns | 3.63ns | 14.5ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
netcoreapp3.1 | 953ns | 5.08ns | 27.8ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
net472 | 926ns | 0.447ns | 1.73ns | 0.0878 | 0 | 0 | 578 B |
| master | StartFinishScope |
net6.0 | 916ns | 4.88ns | 23.4ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
netcoreapp3.1 | 1.25μs | 5.97ns | 23.1ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
net472 | 1.11μs | 0.851ns | 3.29ns | 0.0997 | 0 | 0 | 658 B |
| #7722 | StartFinishSpan |
net6.0 | 789ns | 1.41ns | 5.29ns | 0 | 0 | 0 | 576 B |
| #7722 | StartFinishSpan |
netcoreapp3.1 | 975ns | 4.7ns | 18.8ns | 0 | 0 | 0 | 576 B |
| #7722 | StartFinishSpan |
net472 | 953ns | 0.426ns | 1.59ns | 0.0907 | 0 | 0 | 578 B |
| #7722 | StartFinishScope |
net6.0 | 925ns | 2.5ns | 9.69ns | 0 | 0 | 0 | 696 B |
| #7722 | StartFinishScope |
netcoreapp3.1 | 1.2μs | 5.01ns | 19.4ns | 0 | 0 | 0 | 696 B |
| #7722 | StartFinishScope |
net472 | 1.16μs | 3.34ns | 12.9ns | 0.0989 | 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 | 0.281ns | 1.05ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
netcoreapp3.1 | 1.43μs | 7.02ns | 28.1ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
net472 | 1.49μs | 0.588ns | 2.2ns | 0.104 | 0 | 0 | 658 B |
| #7722 | RunOnMethodBegin |
net6.0 | 1.1μs | 5.3ns | 21.8ns | 0 | 0 | 0 | 696 B |
| #7722 | RunOnMethodBegin |
netcoreapp3.1 | 1.41μs | 6.28ns | 24.3ns | 0 | 0 | 0 | 696 B |
| #7722 | RunOnMethodBegin |
net472 | 1.43μs | 2.13ns | 7.66ns | 0.101 | 0 | 0 | 658 B |
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 (7722) - mean (72ms) : 70, 73
. : milestone, 72,
master - mean (72ms) : 71, 73
. : milestone, 72,
section Baseline
This PR (7722) - mean (68ms) : 66, 70
. : milestone, 68,
master - mean (68ms) : 67, 70
. : milestone, 68,
section CallTarget+Inlining+NGEN
This PR (7722) - mean (1,102ms) : 969, 1235
. : milestone, 1102,
master - mean (1,046ms) : 1004, 1087
. : milestone, 1046,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7722) - mean (107ms) : 104, 110
. : milestone, 107,
master - mean (107ms) : 105, 109
. : milestone, 107,
section Baseline
This PR (7722) - mean (109ms) : 106, 112
. : milestone, 109,
master - mean (106ms) : 104, 108
. : milestone, 106,
section CallTarget+Inlining+NGEN
This PR (7722) - mean (749ms) : 713, 785
. : milestone, 749,
master - mean (748ms) : 725, 771
. : milestone, 748,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7722) - mean (94ms) : 93, 95
. : milestone, 94,
master - mean (95ms) : 93, 96
. : milestone, 95,
section Baseline
This PR (7722) - mean (94ms) : 92, 96
. : milestone, 94,
master - mean (94ms) : 92, 96
. : milestone, 94,
section CallTarget+Inlining+NGEN
This PR (7722) - mean (703ms) : 670, 737
. : milestone, 703,
master - mean (708ms) : 679, 738
. : milestone, 708,
gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7722) - mean (93ms) : 91, 94
. : milestone, 93,
master - mean (93ms) : 92, 94
. : milestone, 93,
section Baseline
This PR (7722) - mean (92ms) : 89, 94
. : milestone, 92,
master - mean (92ms) : 90, 95
. : milestone, 92,
section CallTarget+Inlining+NGEN
This PR (7722) - mean (657ms) : 642, 672
. : milestone, 657,
master - mean (666ms) : 652, 680
. : milestone, 666,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7722) - mean (208ms) : crit, 189, 227
. : crit, milestone, 208,
master - mean (195ms) : 192, 198
. : milestone, 195,
section Baseline
This PR (7722) - mean (192ms) : 188, 196
. : milestone, 192,
master - mean (191ms) : 188, 195
. : milestone, 191,
section CallTarget+Inlining+NGEN
This PR (7722) - mean (1,197ms) : 1080, 1314
. : milestone, 1197,
master - mean (1,158ms) : 1098, 1218
. : milestone, 1158,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7722) - mean (275ms) : 271, 279
. : milestone, 275,
master - mean (277ms) : 272, 282
. : milestone, 277,
section Baseline
This PR (7722) - mean (275ms) : 270, 280
. : milestone, 275,
master - mean (276ms) : 268, 283
. : milestone, 276,
section CallTarget+Inlining+NGEN
This PR (7722) - mean (935ms) : 896, 974
. : milestone, 935,
master - mean (954ms) : 906, 1002
. : milestone, 954,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7722) - mean (267ms) : 263, 272
. : milestone, 267,
master - mean (268ms) : 265, 271
. : milestone, 268,
section Baseline
This PR (7722) - mean (266ms) : 262, 270
. : milestone, 266,
master - mean (268ms) : 262, 273
. : milestone, 268,
section CallTarget+Inlining+NGEN
This PR (7722) - mean (917ms) : 870, 965
. : milestone, 917,
master - mean (936ms) : 881, 991
. : milestone, 936,
gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7722) - mean (285ms) : crit, 280, 289
. : crit, milestone, 285,
master - mean (267ms) : 264, 270
. : milestone, 267,
section Baseline
This PR (7722) - mean (265ms) : 262, 269
. : milestone, 265,
master - mean (267ms) : 263, 271
. : milestone, 267,
section CallTarget+Inlining+NGEN
This PR (7722) - mean (895ms) : 845, 944
. : milestone, 895,
master - mean (850ms) : 835, 866
. : milestone, 850,
|
1ed4e84 to
1477479
Compare
1477479 to
e27c515
Compare
4421414 to
213ef9c
Compare
This comment has been minimized.
This comment has been minimized.
…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
e27c515 to
41ce09f
Compare
bouwkast
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.
Per naming I think SequenceEqual is a bit strange for dictionary, but I think it is fine
tracer/src/Datadog.Trace/ExtensionMethods/DictionaryExtensions.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Steven Bouwkamp <[email protected]>
| this ReadOnlyDictionary<string, string> dict1, | ||
| ReadOnlyDictionary<string, string> dict2, |
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.
any reason to not doing it in a Generic way?
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.
Right now, mostly because it's unnecessary, so extra abstraction doesn't seem worth it 🤷♂️
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.
Oops, auto merge just went ahead with it 😓
…ttings (#7695) ## Summary of changes - Introduces `SettingsManager` responsible for managing `MutableSettings` and `ExporterSettings` ## Reason for change We need to be notified about runtime changes to settings (i.e. config in code or remote config) but don't want to tear down the world and rebuild every time. `SettingsManager` is responsible for handling this. Consumers subscribe to changes and can be notified about updates. This is a first step which just introduces the type, but doesn't force users to consume changes or remove the current places settings are exposed. Instead, it just encapsulates the changes. ## Implementation details - Introduce `SettingsManager` - Move code duplicated in `DynamicConfigurationManager` and `ConfigureIntegration` into `SettingsManager` - Create a new instance of `SettingsManager` (and maintain it throughout the app lifetime) - Subscribe to changes one time in `TracerManager` to do the "full rebuild" - This is a stop gap before we use it "properly" and stop exposing the settings on `TracerSettings` ## Test coverage - Mostly a refactor so covered by integration tests - Unit tests for `SettingsManager` functionality ## 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 - #7796 --------- Co-authored-by: Lucas Pimentel <[email protected]>
…7723) ## Summary of changes Instead of exposing settings like `ServiceVerion` and `Environment` on `TracerSettings`, only expose them on `MutableSettings` ## Reason for change This is all part of the refactoring towards having `TracerSettings` being an immutable settings object, that's created once on app startup, and fixed for the lifetime. `ServiceVerion` and `Environment` currently delegate to the `MutableSettings` object stored on `TracerSettings`, but are going to move that elsewhere shortly so that consumers can subscribe to changes ## Implementation 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 from `TracerSettings` ## Test coverage Just a refactoring, covered by existing 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 - #7796
… config changes (#7796) ## Summary of changes A fix for #7724 to handle telemetry reporting in dynamic config "reset" scenarios ## Reason for change The system tests for #7724 were failing in some dynamic configuration scenarios. Specifically, the tests were sending remote config _without_ any configuration values "i.e. 'reset to use defaults'" and were waiting a telemetry update. However, we never sent it, because there was "no telemetry to record". Note that we _did_ correctly apply the new configuration, we just didn't report the telemetry correctly, primarily due to limitations in the telemetry protocol. This PR adds a fix for that, and will be merged into #7724. ## Implementation details The solution is to "remember" the telemetry from the default mutable configuration values, _without_ any dynamic sources, and "replay" this telemetry when we update telemetry. This feels kind of hacky, but it's something I suspected we might need to do, and had been avoiding up to this point because we do a "full reconfigure" anyway. ## Test coverage Added a specific unit test that mimics the behaviour of the system-test (i.e. an "empty" dynamic config response) and confirms the telemetry is recorded as expected ## 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 - #7796 👈 Unlike other PRs in the stack, I'll merge this directly into #7724 to fix the tests there, just thought I'd keep this separate for easier reviewing
… config changes (#7796) ## Summary of changes A fix for #7724 to handle telemetry reporting in dynamic config "reset" scenarios ## Reason for change The system tests for #7724 were failing in some dynamic configuration scenarios. Specifically, the tests were sending remote config _without_ any configuration values "i.e. 'reset to use defaults'" and were waiting a telemetry update. However, we never sent it, because there was "no telemetry to record". Note that we _did_ correctly apply the new configuration, we just didn't report the telemetry correctly, primarily due to limitations in the telemetry protocol. This PR adds a fix for that, and will be merged into #7724. ## Implementation details The solution is to "remember" the telemetry from the default mutable configuration values, _without_ any dynamic sources, and "replay" this telemetry when we update telemetry. This feels kind of hacky, but it's something I suspected we might need to do, and had been avoiding up to this point because we do a "full reconfigure" anyway. ## Test coverage Added a specific unit test that mimics the behaviour of the system-test (i.e. an "empty" dynamic config response) and confirms the telemetry is recorded as expected ## 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 - #7796 👈 Unlike other PRs in the stack, I'll merge this directly into #7724 to fix the tests there, just thought I'd keep this separate for easier reviewing
…building (#7724) ## Summary of changes - This is the big one - Update services to dynamically update when mutable settings or exporter settings change - Stop rebuilding everything when there's manual/remote configuration ## Reason for change This is the "endpoint" that we've been heading for - services only being disposed/rebuilt at the end of the app, and otherwise only rebuilding the _necessary_ parts. For example - we don't need to tear down all the API factories when a customer changes a global tag via remote config; they only need to change if the `ExporterSettings` change. The hope is that overall this reduces the overhead of using configuration in code and/or remote configuration, while also reducing the number of issues due to managing disposal of services. ## Implementation details Overall, this PR is kind of a pain. Moving from the "rebuild everything" to "reconfigure each service" couldn't be done piecemeal, so this is the one-shot PR. What's more, different services need different patterns (though we can probably consolidate some of them, this has taken a _lot_ of work and I likely changed patterns unnecessarily in some places). In general, there's a couple of patterns: - CI Vis doesn't let you change settings at runtime, so it _never_ needs to respond to changes. It always just uses the "initial" settings - Debugger _today_ doesn't respond to changes at runtime (except its own dynamic config), so for now we ignore Debugger too as it's not really a regression. I hope we can fix this soon though. - I've introduced the concept of `Managed*` versions of some services - These services generally "wrap" the existing type, delegating access to the underlying service, and handling settings changes - Many services only care about a sub-set of mutable settings, so they only update if they need to - Somewhat annoyingly, setting updates occur on a background thread, so we need to be careful about thread safety. Where necessary (most places) I've made sure access to a now-mutable service is done using `Volatile.Read()` (to ensure changes are visible) and are generally cached to a local variable (as the underlying field may be updated in the background). ## Test coverage In the vast majority of places, this should be covered by existing tests I plan to add some additional integration tests around reconfiguring and a bunch of manual testing to make sure I'm confident. ## Other details I strongly recommend reviewing commit-by-commit. They're generally self-contained, and hopefully simple enough to understand one commit at a time. https://datadoghq.atlassian.net/browse/LANGPLAT-819 Part of a config stack - #7522 - #7525 - #7530 - #7532 - #7543 - #7544 - #7721 - #7722 - #7695 - #7723 - #7724 👈 - #7796 This isn't the final PR in the stack, as there will be a bunch of cleaning up to do, but it's the final "implementation" PR
Summary of changes
Add a helper for comparing
ReadOnlyDictionary<>instancesReason 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
SequenceEqualextension method.Note that I used
SequenceEqualbecause 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 itIDictionary<>, 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
MutableSettingsfromTracerSettings#7522MutableSettingson dynamic config changes #7525DefaultServiceNametoMutableSettings#7530PerTraceSettings.GetServiceName()#7532TracerSettingsto useMutableSettingswhere appropriate #7543IsIntegrationEnabled(),IsErrorStatusCode(), andGetIntegrationAnalyticsSampleRate()#7544DictionaryExtensions.SequenceEqual#7722 👈SettingsManagerfor managing mutable settings and ExporterSettings #7695TracerSettingswhich can change at runtime #7723MutableSettingsandExporterSettingswithout rebuilding #7724