[Debugger] Fix flaky DI probe file test#8575
Conversation
💡 Codex Reviewdd-trace-dotnet/tracer/src/Datadog.Trace/Debugger/DynamicInstrumentation.cs Lines 102 to 104 in 9633488 When an initialization attempt finishes without calling ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
BenchmarksBenchmark execution time: 2026-05-07 12:49:29 Comparing candidate commit 157e522 in PR branch Found 1 performance improvements and 0 performance regressions! Performance is the same for 26 metrics, 0 unstable metrics, 61 known flaky benchmarks, 26 flaky benchmarks without significant changes.
|
9633488 to
157e522
Compare
cb32d24528253ba6ce6ee0872a10b293157642a9 |
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (8575) 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 (8575) - mean (75ms) : 71, 79
master - mean (75ms) : 70, 80
section Bailout
This PR (8575) - mean (78ms) : 75, 80
master - mean (79ms) : 75, 83
section CallTarget+Inlining+NGEN
This PR (8575) - mean (1,130ms) : 1078, 1182
master - mean (1,129ms) : 1075, 1183
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 (8575) - mean (115ms) : 110, 121
master - mean (117ms) : 110, 124
section Bailout
This PR (8575) - mean (115ms) : 112, 118
master - mean (115ms) : 112, 118
section CallTarget+Inlining+NGEN
This PR (8575) - mean (820ms) : 782, 858
master - mean (808ms) : 777, 839
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8575) - mean (101ms) : 97, 106
master - mean (104ms) : 99, 109
section Bailout
This PR (8575) - mean (106ms) : 101, 112
master - mean (102ms) : 98, 106
section CallTarget+Inlining+NGEN
This PR (8575) - mean (951ms) : 911, 990
master - mean (951ms) : 910, 991
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8575) - mean (102ms) : 98, 105
master - mean (103ms) : 97, 109
section Bailout
This PR (8575) - mean (102ms) : 100, 105
master - mean (104ms) : 99, 109
section CallTarget+Inlining+NGEN
This PR (8575) - mean (837ms) : 786, 888
master - mean (834ms) : 791, 876
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 (8575) - mean (207ms) : 198, 215
master - mean (204ms) : 192, 217
section Bailout
This PR (8575) - mean (211ms) : 202, 220
master - mean (208ms) : 199, 217
section CallTarget+Inlining+NGEN
This PR (8575) - mean (1,265ms) : 1225, 1305
master - mean (1,266ms) : 1223, 1309
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 (8575) - mean (297ms) : 280, 314
master - mean (298ms) : 282, 315
section Bailout
This PR (8575) - mean (297ms) : 284, 311
master - mean (299ms) : 283, 315
section CallTarget+Inlining+NGEN
This PR (8575) - mean (1,004ms) : 975, 1034
master - mean (1,010ms) : 987, 1033
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8575) - mean (291ms) : 277, 304
master - mean (290ms) : 276, 304
section Bailout
This PR (8575) - mean (292ms) : 277, 307
master - mean (292ms) : 277, 307
section CallTarget+Inlining+NGEN
This PR (8575) - mean (1,191ms) : 1149, 1234
master - mean (1,171ms) : 1132, 1210
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8575) - mean (296ms) : 278, 314
master - mean (289ms) : 274, 305
section Bailout
This PR (8575) - mean (297ms) : 280, 313
master - mean (289ms) : 274, 305
section CallTarget+Inlining+NGEN
This PR (8575) - mean (1,092ms) : 997, 1188
master - mean (1,065ms) : 988, 1141
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Summary of changes
DynamicInstrumentationinstances created by probe-file tests to avoid leaking assembly-load callbacks between tests.Reason for change
ProbeFile_ValidProbe_AppliesInstrumentationcan fail under CI load becauseInitialize()starts async initialization and returns before file probes are fully applied.probeStatusPoller.Called == false, indicating the test raced probe application.Implementation details
GetInitializationTask()helper backed by the same initialization state pattern used in the snapshot exploration branch.Interlocked.CompareExchangeto ensure initialization is only started once, andVolatile.Read/Writeto publish and observe initialized state.Test coverage
ProbeFileLoadingTests.ProbeFile_ValidProbe_AppliesInstrumentation