Add fix for persistent Process.Start version-conflict issue#7789
Add fix for persistent Process.Start version-conflict issue#7789andrewlock merged 7 commits intomasterfrom
Process.Start version-conflict issue#7789Conversation
| type_ref = mdTypeRefNil; | ||
| bool is_same_assembly = false; | ||
|
|
||
| if (metadata_.assemblyName == integration_definition.integration_type.assembly.name) |
There was a problem hiding this comment.
Previously we were only checking for "is this the right assembly" by checking the assembly name, but we should check the version too. This is obviously an issue in the version conflict scenario, but theoretically it's an issue in other cases where two versions of the assembly are loaded (I think)
| // _may_ be present depending on the underlying host system (cgroup v1/v2). | ||
| // The "do not trace" helper that normally blocks tracing these spans doesn't | ||
| // work in version conflict scenarios. | ||
| SetEnvironmentVariable("DD_TRACE_Process_ENABLED", "0"); |
There was a problem hiding this comment.
Prior to the fix, removing this caused some of the the tests to fail, because we generated process spans when we shouldn't on linux (on some distros only)
There was a problem hiding this comment.
The changes here look worse than they are - if you ignore whitespace it makes more sense. The change is just to set perform_calltarget_instrumentation_on_version_conflict_assembly when we're in version conflict, and then to not skip rewriting in that case.
This comment has been minimized.
This comment has been minimized.
76bd4c7 to
9638914
Compare
BenchmarksBenchmarks Report for benchmark platform 🐌Benchmarks for #7789 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.03 KB | 6.11 KB | 81 B | 1.34% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StartStopWithChild |
net6.0 | 10.7μs | 58.5ns | 356ns | 0 | 0 | 0 | 5.5 KB |
| master | StartStopWithChild |
netcoreapp3.1 | 14.1μs | 62.7ns | 243ns | 0 | 0 | 0 | 5.7 KB |
| master | StartStopWithChild |
net472 | 21.8μs | 113ns | 516ns | 0.871 | 0.218 | 0 | 6.03 KB |
| #7789 | StartStopWithChild |
net6.0 | 10.4μs | 58.5ns | 393ns | 0 | 0 | 0 | 5.51 KB |
| #7789 | StartStopWithChild |
netcoreapp3.1 | 14.7μs | 55.3ns | 214ns | 0 | 0 | 0 | 5.7 KB |
| #7789 | StartStopWithChild |
net472 | 22.4μs | 123ns | 790ns | 0.962 | 0.214 | 0 | 6.11 KB |
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 942μs | 1.23μs | 4.77μs | 0 | 0 | 0 | 2.71 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.03ms | 403ns | 1.56μs | 0 | 0 | 0 | 2.7 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 1.2ms | 418ns | 1.62μs | 0 | 0 | 0 | 3.35 KB |
| #7789 | WriteAndFlushEnrichedTraces |
net6.0 | 937μs | 56.2ns | 195ns | 0 | 0 | 0 | 2.72 KB |
| #7789 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.05ms | 4.58μs | 17.8μs | 0 | 0 | 0 | 2.7 KB |
| #7789 | WriteAndFlushEnrichedTraces |
net472 | 1.21ms | 1.21μs | 4.7μs | 0 | 0 | 0 | 3.35 KB |
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #7789
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody‑netcoreapp3.1
1.150
1,481.00
1,702.57
Faster 🎉 in #7789
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody‑net472
1.358
401.30
295.54
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody‑netcoreapp3.1 | 1.150 | 1,481.00 | 1,702.57 |
| Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody‑net472 | 1.358 | 401.30 | 295.54 |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | AllCycleSimpleBody |
net6.0 | 1.04μs | 6.64ns | 66.4ns | 0 | 0 | 0 | 1.22 KB |
| master | AllCycleSimpleBody |
netcoreapp3.1 | 1.47μs | 7.83ns | 42.2ns | 0 | 0 | 0 | 1.2 KB |
| master | AllCycleSimpleBody |
net472 | 1.11μs | 0.562ns | 2.03ns | 0.19 | 0 | 0 | 1.23 KB |
| master | AllCycleMoreComplexBody |
net6.0 | 7.15μs | 33.7ns | 135ns | 0 | 0 | 0 | 4.72 KB |
| master | AllCycleMoreComplexBody |
netcoreapp3.1 | 9.24μs | 5.31ns | 20.6ns | 0 | 0 | 0 | 4.62 KB |
| master | AllCycleMoreComplexBody |
net472 | 7.63μs | 6.1ns | 23.6ns | 0.725 | 0 | 0 | 4.74 KB |
| master | ObjectExtractorSimpleBody |
net6.0 | 324ns | 0.252ns | 0.974ns | 0 | 0 | 0 | 280 B |
| master | ObjectExtractorSimpleBody |
netcoreapp3.1 | 399ns | 2.19ns | 13ns | 0 | 0 | 0 | 272 B |
| master | ObjectExtractorSimpleBody |
net472 | 401ns | 0.0872ns | 0.338ns | 0.0444 | 0 | 0 | 281 B |
| master | ObjectExtractorMoreComplexBody |
net6.0 | 6.3μs | 19.7ns | 76.4ns | 0 | 0 | 0 | 3.78 KB |
| master | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.82μs | 35.9ns | 144ns | 0 | 0 | 0 | 3.69 KB |
| master | ObjectExtractorMoreComplexBody |
net472 | 6.7μs | 1.02ns | 3.82ns | 0.602 | 0 | 0 | 3.8 KB |
| #7789 | AllCycleSimpleBody |
net6.0 | 1.06μs | 5.98ns | 39.2ns | 0 | 0 | 0 | 1.22 KB |
| #7789 | AllCycleSimpleBody |
netcoreapp3.1 | 1.68μs | 9.2ns | 53.6ns | 0 | 0 | 0 | 1.2 KB |
| #7789 | AllCycleSimpleBody |
net472 | 1.03μs | 0.457ns | 1.71ns | 0.191 | 0 | 0 | 1.23 KB |
| #7789 | AllCycleMoreComplexBody |
net6.0 | 7.1μs | 36ns | 169ns | 0 | 0 | 0 | 4.72 KB |
| #7789 | AllCycleMoreComplexBody |
netcoreapp3.1 | 9.04μs | 40.1ns | 145ns | 0 | 0 | 0 | 4.62 KB |
| #7789 | AllCycleMoreComplexBody |
net472 | 7.62μs | 5.51ns | 21.3ns | 0.725 | 0 | 0 | 4.74 KB |
| #7789 | ObjectExtractorSimpleBody |
net6.0 | 334ns | 0.982ns | 3.8ns | 0 | 0 | 0 | 280 B |
| #7789 | ObjectExtractorSimpleBody |
netcoreapp3.1 | 409ns | 0.255ns | 0.988ns | 0 | 0 | 0 | 272 B |
| #7789 | ObjectExtractorSimpleBody |
net472 | 296ns | 0.0189ns | 0.0707ns | 0.0433 | 0 | 0 | 281 B |
| #7789 | ObjectExtractorMoreComplexBody |
net6.0 | 6.31μs | 30.4ns | 132ns | 0 | 0 | 0 | 3.78 KB |
| #7789 | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.93μs | 36.9ns | 143ns | 0 | 0 | 0 | 3.69 KB |
| #7789 | ObjectExtractorMoreComplexBody |
net472 | 6.71μs | 1.44ns | 5.2ns | 0.572 | 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 | 79.7μs | 401ns | 1.79μs | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
netcoreapp3.1 | 96.8μs | 321ns | 1.25μs | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
net472 | 109μs | 10.1ns | 37.9ns | 4.92 | 0 | 0 | 32.5 KB |
| master | EncodeLegacyArgs |
net6.0 | 144μs | 11.1ns | 42.9ns | 0 | 0 | 0 | 2.15 KB |
| master | EncodeLegacyArgs |
netcoreapp3.1 | 197μs | 111ns | 416ns | 0 | 0 | 0 | 2.14 KB |
| master | EncodeLegacyArgs |
net472 | 267μs | 205ns | 795ns | 0 | 0 | 0 | 2.16 KB |
| #7789 | EncodeArgs |
net6.0 | 78.4μs | 22.3ns | 83.5ns | 0 | 0 | 0 | 32.4 KB |
| #7789 | EncodeArgs |
netcoreapp3.1 | 97.3μs | 320ns | 1.2μs | 0 | 0 | 0 | 32.4 KB |
| #7789 | EncodeArgs |
net472 | 111μs | 33.9ns | 131ns | 5 | 0 | 0 | 32.5 KB |
| #7789 | EncodeLegacyArgs |
net6.0 | 141μs | 22.6ns | 84.6ns | 0 | 0 | 0 | 2.15 KB |
| #7789 | EncodeLegacyArgs |
netcoreapp3.1 | 199μs | 180ns | 696ns | 0 | 0 | 0 | 2.14 KB |
| #7789 | EncodeLegacyArgs |
net472 | 262μs | 117ns | 454ns | 0 | 0 | 0 | 2.16 KB |
Benchmarks.Trace.Asm.AppSecWafBenchmark - Faster 🎉 Same allocations ✔️
Faster 🎉 in #7789
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1
2.406
720,188.19
299,364.94
| Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1 | 2.406 | 720,188.19 | 299,364.94 |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | RunWafRealisticBenchmark |
net6.0 | 396μs | 75.8ns | 273ns | 0 | 0 | 0 | 4.55 KB |
| master | RunWafRealisticBenchmark |
netcoreapp3.1 | 408μs | 73.1ns | 253ns | 0 | 0 | 0 | 4.48 KB |
| master | RunWafRealisticBenchmark |
net472 | 428μs | 37.8ns | 142ns | 0 | 0 | 0 | 4.66 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net6.0 | 289μs | 25ns | 96.8ns | 0 | 0 | 0 | 2.24 KB |
| master | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 715μs | 3.46μs | 14.7μs | 0 | 0 | 0 | 2.22 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net472 | 311μs | 57.7ns | 224ns | 0 | 0 | 0 | 2.29 KB |
| #7789 | RunWafRealisticBenchmark |
net6.0 | 401μs | 90.1ns | 349ns | 0 | 0 | 0 | 4.55 KB |
| #7789 | RunWafRealisticBenchmark |
netcoreapp3.1 | 412μs | 169ns | 585ns | 0 | 0 | 0 | 4.48 KB |
| #7789 | RunWafRealisticBenchmark |
net472 | 432μs | 53.1ns | 199ns | 0 | 0 | 0 | 4.66 KB |
| #7789 | RunWafRealisticBenchmarkWithAttack |
net6.0 | 287μs | 25.6ns | 95.6ns | 0 | 0 | 0 | 2.24 KB |
| #7789 | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 299μs | 86.7ns | 336ns | 0 | 0 | 0 | 2.22 KB |
| #7789 | RunWafRealisticBenchmarkWithAttack |
net472 | 313μs | 50.9ns | 197ns | 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μs | 222ns | 860ns | 0 | 0 | 0 | 14.52 KB |
| master | SendRequest |
netcoreapp3.1 | 71.7μs | 84.8ns | 317ns | 0 | 0 | 0 | 17.42 KB |
| master | SendRequest |
net472 | 0.000715ns | 0.000715ns | 0.00277ns | 0 | 0 | 0 | 0 b |
| #7789 | SendRequest |
net6.0 | 61.2μs | 121ns | 437ns | 0 | 0 | 0 | 14.52 KB |
| #7789 | SendRequest |
netcoreapp3.1 | 71.9μs | 52.8ns | 191ns | 0 | 0 | 0 | 17.42 KB |
| #7789 | SendRequest |
net472 | 0.00438ns | 0.00141ns | 0.00509ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CharSliceBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7789
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0
2 B
4 B
2 B
100.00%
Fewer allocations 🎉 in #7789
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0
5 B
3 B
-2 B
-40.00%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 | 2 B | 4 B | 2 B | 100.00% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0 | 5 B | 3 B | -2 B | -40.00% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | OriginalCharSlice |
net6.0 | 1.95ms | 3.02μs | 11.3μs | 0 | 0 | 0 | 640.01 KB |
| master | OriginalCharSlice |
netcoreapp3.1 | 2.08ms | 4.55μs | 16.4μs | 0 | 0 | 0 | 640 KB |
| master | OriginalCharSlice |
net472 | 2.68ms | 115ns | 431ns | 100 | 0 | 0 | 641.95 KB |
| master | OptimizedCharSlice |
net6.0 | 1.34ms | 199ns | 770ns | 0 | 0 | 0 | 2 B |
| master | OptimizedCharSlice |
netcoreapp3.1 | 1.65ms | 643ns | 2.49μs | 0 | 0 | 0 | 1 B |
| master | OptimizedCharSlice |
net472 | 1.9ms | 257ns | 993ns | 0 | 0 | 0 | 0 b |
| master | OptimizedCharSliceWithPool |
net6.0 | 840μs | 56.7ns | 220ns | 0 | 0 | 0 | 5 B |
| master | OptimizedCharSliceWithPool |
netcoreapp3.1 | 797μs | 80.8ns | 313ns | 0 | 0 | 0 | 0 b |
| master | OptimizedCharSliceWithPool |
net472 | 1.14ms | 110ns | 424ns | 0 | 0 | 0 | 0 b |
| #7789 | OriginalCharSlice |
net6.0 | 1.93ms | 4.02μs | 15.6μs | 0 | 0 | 0 | 640.01 KB |
| #7789 | OriginalCharSlice |
netcoreapp3.1 | 2.06ms | 2.59μs | 8.99μs | 0 | 0 | 0 | 640 KB |
| #7789 | OriginalCharSlice |
net472 | 2.75ms | 1.67μs | 6.48μs | 100 | 0 | 0 | 641.95 KB |
| #7789 | OptimizedCharSlice |
net6.0 | 1.43ms | 119ns | 461ns | 0 | 0 | 0 | 4 B |
| #7789 | OptimizedCharSlice |
netcoreapp3.1 | 1.7ms | 1.85μs | 7.18μs | 0 | 0 | 0 | 1 B |
| #7789 | OptimizedCharSlice |
net472 | 1.99ms | 318ns | 1.23μs | 0 | 0 | 0 | 0 b |
| #7789 | OptimizedCharSliceWithPool |
net6.0 | 865μs | 57.5ns | 215ns | 0 | 0 | 0 | 3 B |
| #7789 | OptimizedCharSliceWithPool |
netcoreapp3.1 | 824μs | 102ns | 394ns | 0 | 0 | 0 | 0 b |
| #7789 | OptimizedCharSliceWithPool |
net472 | 1.15ms | 123ns | 476ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7789
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0
41.79 KB
42.42 KB
637 B
1.52%
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1
41.75 KB
42.03 KB
273 B
0.65%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 | 41.79 KB | 42.42 KB | 637 B | 1.52% |
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 | 41.75 KB | 42.03 KB | 273 B | 0.65% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 711μs | 1.21μs | 4.54μs | 0 | 0 | 0 | 41.79 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 743μs | 1.69μs | 11.8μs | 0 | 0 | 0 | 41.75 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 896μs | 4.45μs | 18.4μs | 8.33 | 0 | 0 | 56.25 KB |
| #7789 | WriteAndFlushEnrichedTraces |
net6.0 | 750μs | 4.39μs | 41μs | 0 | 0 | 0 | 42.42 KB |
| #7789 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 698μs | 5.38μs | 53.8μs | 0 | 0 | 0 | 42.03 KB |
| #7789 | WriteAndFlushEnrichedTraces |
net472 | 866μs | 2.55μs | 9.54μs | 8.33 | 0 | 0 | 56.53 KB |
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | ExecuteNonQuery |
net6.0 | 1.9μs | 3.8ns | 14.7ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
netcoreapp3.1 | 2.52μs | 8.95ns | 33.5ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
net472 | 2.86μs | 2.8ns | 10.8ns | 0.156 | 0.0142 | 0 | 987 B |
| #7789 | ExecuteNonQuery |
net6.0 | 1.95μs | 1.72ns | 6.64ns | 0 | 0 | 0 | 1.02 KB |
| #7789 | ExecuteNonQuery |
netcoreapp3.1 | 2.61μs | 7.96ns | 30.8ns | 0 | 0 | 0 | 1.02 KB |
| #7789 | ExecuteNonQuery |
net472 | 2.8μs | 4.36ns | 16.3ns | 0.151 | 0.0138 | 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.78μs | 8.36ns | 32.4ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
netcoreapp3.1 | 2.18μs | 11.1ns | 49.6ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
net472 | 3.65μs | 2.07ns | 8ns | 0.164 | 0 | 0 | 1.04 KB |
| master | CallElasticsearchAsync |
net6.0 | 1.89μs | 2.29ns | 8.88ns | 0 | 0 | 0 | 1.01 KB |
| master | CallElasticsearchAsync |
netcoreapp3.1 | 2.38μs | 9.01ns | 34.9ns | 0 | 0 | 0 | 1.08 KB |
| master | CallElasticsearchAsync |
net472 | 3.73μs | 3.39ns | 12.2ns | 0.168 | 0 | 0 | 1.1 KB |
| #7789 | CallElasticsearch |
net6.0 | 1.75μs | 9.14ns | 44.8ns | 0 | 0 | 0 | 1.03 KB |
| #7789 | CallElasticsearch |
netcoreapp3.1 | 2.24μs | 9.62ns | 37.3ns | 0 | 0 | 0 | 1.03 KB |
| #7789 | CallElasticsearch |
net472 | 3.52μs | 7.77ns | 30.1ns | 0.157 | 0 | 0 | 1.04 KB |
| #7789 | CallElasticsearchAsync |
net6.0 | 1.86μs | 0.549ns | 2.05ns | 0 | 0 | 0 | 1.01 KB |
| #7789 | CallElasticsearchAsync |
netcoreapp3.1 | 2.47μs | 12.7ns | 58.3ns | 0 | 0 | 0 | 1.08 KB |
| #7789 | CallElasticsearchAsync |
net472 | 3.6μs | 6.08ns | 23.5ns | 0.162 | 0 | 0 | 1.1 KB |
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | ExecuteAsync |
net6.0 | 1.86μs | 6.28ns | 24.3ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
netcoreapp3.1 | 2.41μs | 1.03ns | 3.84ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
net472 | 2.59μs | 2.65ns | 10.3ns | 0.144 | 0 | 0 | 915 B |
| #7789 | ExecuteAsync |
net6.0 | 1.88μs | 3.8ns | 14.7ns | 0 | 0 | 0 | 952 B |
| #7789 | ExecuteAsync |
netcoreapp3.1 | 2.37μs | 7.08ns | 27.4ns | 0 | 0 | 0 | 952 B |
| #7789 | ExecuteAsync |
net472 | 2.58μs | 3.16ns | 12.2ns | 0.142 | 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 | 13.5ns | 52.3ns | 0 | 0 | 0 | 2.36 KB |
| master | SendAsync |
netcoreapp3.1 | 8.86μs | 26.5ns | 103ns | 0 | 0 | 0 | 2.9 KB |
| master | SendAsync |
net472 | 12.4μs | 10.8ns | 41.9ns | 0.492 | 0 | 0 | 3.18 KB |
| #7789 | SendAsync |
net6.0 | 7.15μs | 7.35ns | 26.5ns | 0 | 0 | 0 | 2.36 KB |
| #7789 | SendAsync |
netcoreapp3.1 | 8.77μs | 17.8ns | 69ns | 0 | 0 | 0 | 2.9 KB |
| #7789 | SendAsync |
net472 | 12μs | 11.8ns | 45.6ns | 0.484 | 0 | 0 | 3.18 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7789
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
257.64 KB
277.78 KB
20.14 KB
7.82%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472
278.53 KB
280.12 KB
1.59 KB
0.57%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 | 257.64 KB | 277.78 KB | 20.14 KB | 7.82% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 | 278.53 KB | 280.12 KB | 1.59 KB | 0.57% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StringConcatBenchmark |
net6.0 | 42.4μs | 218ns | 1.11μs | 0 | 0 | 0 | 43.78 KB |
| master | StringConcatBenchmark |
netcoreapp3.1 | 48.6μs | 215ns | 805ns | 0 | 0 | 0 | 42.7 KB |
| master | StringConcatBenchmark |
net472 | 57.2μs | 178ns | 617ns | 0 | 0 | 0 | 65.54 KB |
| master | StringConcatAspectBenchmark |
net6.0 | 521μs | 2.07μs | 11.3μs | 0 | 0 | 0 | 259.32 KB |
| master | StringConcatAspectBenchmark |
netcoreapp3.1 | 526μs | 2.18μs | 8.16μs | 0 | 0 | 0 | 257.64 KB |
| master | StringConcatAspectBenchmark |
net472 | 428μs | 2.44μs | 17.6μs | 0 | 0 | 0 | 278.53 KB |
| #7789 | StringConcatBenchmark |
net6.0 | 47.7μs | 279ns | 2.49μs | 0 | 0 | 0 | 43.83 KB |
| #7789 | StringConcatBenchmark |
netcoreapp3.1 | 50.3μs | 289ns | 2.05μs | 0 | 0 | 0 | 42.71 KB |
| #7789 | StringConcatBenchmark |
net472 | 57.8μs | 168ns | 606ns | 0 | 0 | 0 | 65.54 KB |
| #7789 | StringConcatAspectBenchmark |
net6.0 | 470μs | 1.99μs | 7.19μs | 0 | 0 | 0 | 258.96 KB |
| #7789 | StringConcatAspectBenchmark |
netcoreapp3.1 | 548μs | 2.59μs | 10μs | 0 | 0 | 0 | 277.78 KB |
| #7789 | StringConcatAspectBenchmark |
net472 | 406μs | 2.35μs | 19μs | 0 | 0 | 0 | 280.12 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.64μs | 13.4ns | 60ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
netcoreapp3.1 | 3.74μs | 17.7ns | 70.8ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
net472 | 3.98μs | 6.49ns | 25.1ns | 0.258 | 0 | 0 | 1.64 KB |
| #7789 | EnrichedLog |
net6.0 | 2.68μs | 13.6ns | 62.2ns | 0 | 0 | 0 | 1.7 KB |
| #7789 | EnrichedLog |
netcoreapp3.1 | 3.71μs | 16.5ns | 64.1ns | 0 | 0 | 0 | 1.7 KB |
| #7789 | EnrichedLog |
net472 | 4.03μs | 4.24ns | 16.4ns | 0.24 | 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 | 94.7ns | 341ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
netcoreapp3.1 | 128μs | 288ns | 1.12μs | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
net472 | 170μs | 393ns | 1.52μs | 0 | 0 | 0 | 4.52 KB |
| #7789 | EnrichedLog |
net6.0 | 124μs | 125ns | 483ns | 0 | 0 | 0 | 4.31 KB |
| #7789 | EnrichedLog |
netcoreapp3.1 | 130μs | 188ns | 679ns | 0 | 0 | 0 | 4.31 KB |
| #7789 | EnrichedLog |
net472 | 169μs | 56.4ns | 218ns | 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.95μs | 22.8ns | 91.1ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
netcoreapp3.1 | 6.82μs | 17.1ns | 66.3ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
net472 | 7.5μs | 7.99ns | 31ns | 0.298 | 0 | 0 | 2.08 KB |
| #7789 | EnrichedLog |
net6.0 | 4.95μs | 9.84ns | 38.1ns | 0 | 0 | 0 | 2.26 KB |
| #7789 | EnrichedLog |
netcoreapp3.1 | 6.88μs | 20.5ns | 79.4ns | 0 | 0 | 0 | 2.26 KB |
| #7789 | EnrichedLog |
net472 | 7.43μs | 3.16ns | 12.2ns | 0.297 | 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 | 10.1ns | 37.9ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
netcoreapp3.1 | 2.64μs | 10.3ns | 38.5ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
net472 | 3.07μs | 4.16ns | 16.1ns | 0.185 | 0 | 0 | 1.2 KB |
| #7789 | SendReceive |
net6.0 | 2.05μs | 9.86ns | 38.2ns | 0 | 0 | 0 | 1.2 KB |
| #7789 | SendReceive |
netcoreapp3.1 | 2.57μs | 12.2ns | 47.2ns | 0 | 0 | 0 | 1.2 KB |
| #7789 | SendReceive |
net472 | 3.06μs | 4.84ns | 18.7ns | 0.183 | 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.3μs | 18.4ns | 71.3ns | 0 | 0 | 0 | 1.58 KB |
| master | EnrichedLog |
netcoreapp3.1 | 5.75μs | 11.4ns | 44ns | 0 | 0 | 0 | 1.63 KB |
| master | EnrichedLog |
net472 | 6.48μs | 7.08ns | 27.4ns | 0.29 | 0 | 0 | 2.03 KB |
| #7789 | EnrichedLog |
net6.0 | 4.42μs | 4.37ns | 15.2ns | 0 | 0 | 0 | 1.58 KB |
| #7789 | EnrichedLog |
netcoreapp3.1 | 5.73μs | 9.98ns | 38.7ns | 0 | 0 | 0 | 1.63 KB |
| #7789 | EnrichedLog |
net472 | 6.65μs | 8.83ns | 34.2ns | 0.299 | 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 | 773ns | 3.48ns | 13.5ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
netcoreapp3.1 | 975ns | 0.554ns | 2.14ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
net472 | 933ns | 0.712ns | 2.76ns | 0.0891 | 0 | 0 | 578 B |
| master | StartFinishScope |
net6.0 | 948ns | 0.345ns | 1.34ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
netcoreapp3.1 | 1.2μs | 6.03ns | 28.3ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
net472 | 1.12μs | 0.673ns | 2.61ns | 0.1 | 0 | 0 | 658 B |
| #7789 | StartFinishSpan |
net6.0 | 802ns | 0.369ns | 1.43ns | 0 | 0 | 0 | 576 B |
| #7789 | StartFinishSpan |
netcoreapp3.1 | 964ns | 4.97ns | 23.8ns | 0 | 0 | 0 | 576 B |
| #7789 | StartFinishSpan |
net472 | 919ns | 0.839ns | 3.25ns | 0.0874 | 0 | 0 | 578 B |
| #7789 | StartFinishScope |
net6.0 | 965ns | 1.12ns | 4.33ns | 0 | 0 | 0 | 696 B |
| #7789 | StartFinishScope |
netcoreapp3.1 | 1.21μs | 4.8ns | 18ns | 0 | 0 | 0 | 696 B |
| #7789 | StartFinishScope |
net472 | 1.12μs | 0.692ns | 2.68ns | 0.1 | 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.07μs | 4.91ns | 19.7ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
netcoreapp3.1 | 1.4μs | 7.16ns | 34.3ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
net472 | 1.44μs | 1.61ns | 6.22ns | 0.102 | 0 | 0 | 658 B |
| #7789 | RunOnMethodBegin |
net6.0 | 1.09μs | 5.38ns | 21.5ns | 0 | 0 | 0 | 696 B |
| #7789 | RunOnMethodBegin |
netcoreapp3.1 | 1.43μs | 6.53ns | 26.1ns | 0 | 0 | 0 | 696 B |
| #7789 | RunOnMethodBegin |
net472 | 1.46μs | 1.27ns | 4.91ns | 0.102 | 0 | 0 | 658 B |
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (7789) 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 (7789) - mean (74ms) : 69, 80
master - mean (76ms) : 70, 81
section Bailout
This PR (7789) - mean (79ms) : 73, 84
master - mean (80ms) : 75, 86
section CallTarget+Inlining+NGEN
This PR (7789) - mean (1,102ms) : 1015, 1188
master - mean (1,111ms) : 1041, 1181
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 (7789) - mean (117ms) : 110, 124
master - mean (120ms) : 112, 128
section Bailout
This PR (7789) - mean (118ms) : 111, 126
master - mean (119ms) : 112, 126
section CallTarget+Inlining+NGEN
This PR (7789) - mean (798ms) : 759, 836
master - mean (815ms) : 766, 864
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7789) - mean (103ms) : 96, 110
master - mean (104ms) : 99, 109
section Bailout
This PR (7789) - mean (106ms) : 99, 112
master - mean (105ms) : 99, 110
section CallTarget+Inlining+NGEN
This PR (7789) - mean (743ms) : 706, 779
master - mean (752ms) : 713, 791
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7789) - mean (102ms) : 97, 108
master - mean (102ms) : 97, 106
section Bailout
This PR (7789) - mean (104ms) : 98, 110
master - mean (105ms) : 99, 112
section CallTarget+Inlining+NGEN
This PR (7789) - mean (701ms) : 674, 728
master - mean (716ms) : 686, 746
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 (7789) - mean (192ms) : 188, 196
master - mean (191ms) : 187, 194
section Bailout
This PR (7789) - mean (195ms) : 193, 197
master - mean (195ms) : 193, 197
section CallTarget+Inlining+NGEN
This PR (7789) - mean (1,162ms) : 1103, 1222
master - mean (1,164ms) : 1100, 1228
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 (7789) - mean (274ms) : 270, 278
master - mean (275ms) : 269, 281
section Bailout
This PR (7789) - mean (276ms) : 270, 281
master - mean (276ms) : 271, 280
section CallTarget+Inlining+NGEN
This PR (7789) - mean (940ms) : 912, 969
master - mean (955ms) : 908, 1001
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7789) - mean (268ms) : 263, 272
master - mean (267ms) : 263, 271
section Bailout
This PR (7789) - mean (267ms) : 264, 271
master - mean (268ms) : 264, 271
section CallTarget+Inlining+NGEN
This PR (7789) - mean (920ms) : 874, 965
master - mean (925ms) : 880, 970
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7789) - mean (268ms) : 264, 272
master - mean (266ms) : 262, 270
section Bailout
This PR (7789) - mean (267ms) : 264, 271
master - mean (266ms) : 263, 270
section CallTarget+Inlining+NGEN
This PR (7789) - mean (845ms) : 823, 867
master - mean (850ms) : 832, 869
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
9638914 to
b5a39c5
Compare
...Profiler/AutoInstrumentation/VersionConflict/ProcessHelpersStartWithDoNotTraceIntegration.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Lucas Pimentel <lucas.pimentel@datadoghq.com>
Summary of changes
Reason for change
As part of app startup, on some linux distros, we shell out to
statto build the container tags/entity ID. We don't want to trace thisProcess.Start()call, so in #5280 we added a flag to skip instrumenting these calls. However, this fix relies on a[ThreadStatic]variable, and in version-conflict scenarios (2.x.x manual, 3.x.x automatic) we end up still instrumenting this call, which causes recursion inTracerinitialization and errors.Implementation details
Datadog.Trace(i.e. version conflict only)ProcessHelpers.StartWithDoNotTrace()method, and set the 3.x.x_doNotTracevariable for the duration of the method callTest coverage
We were already working around this issue in our VersionConflict tests, so I removed the workaround, confirmed that the test failed, then made the fix, and confirmed the tests pass again.
Other details
This will only help for customers using a manual version of 2.49.0+ (when we introduced the
StartWithDoNotTrace()call). I think that's good enough support.