[Debugger] Fix probe file test waits#8740
Conversation
Co-authored-by: Cursor <[email protected]>
There was a problem hiding this comment.
Pull request overview
This PR stabilizes debugger probe-file tests by synchronizing assertions with the Dynamic Instrumentation (DI) initialization flow, avoiding races where tests observe _fileConfiguration before the async initialization has applied file probes.
Changes:
- Updated
WaitForInitializationAsyncto awaitDynamicInstrumentation.GetInitializationTask()with a timeout (instead of pollingIsInitialized). - Switched probe-file tests (when RCM is available) to wait for DI initialization completion before reading loaded file probes.
- Kept the “no RCM” probe-file test waiting only until file probes are accepted (since full DI initialization may remain pending until shutdown).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Cursor <[email protected]>
BenchmarksBenchmark execution time: 2026-06-03 13:31:53 Comparing candidate commit c7f91f9 in PR branch Found 0 performance improvements and 1 performance regressions! Performance is the same for 71 metrics, 0 unstable metrics, 60 known flaky benchmarks, 66 flaky benchmarks without significant changes.
|
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (8740) 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 (8740) - mean (74ms) : 71, 77
master - mean (73ms) : 70, 76
section Bailout
This PR (8740) - mean (77ms) : 75, 80
master - mean (79ms) : 76, 83
section CallTarget+Inlining+NGEN
This PR (8740) - mean (1,113ms) : 1066, 1161
master - mean (1,109ms) : 1048, 1170
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 (8740) - mean (114ms) : 109, 119
master - mean (117ms) : 112, 123
section Bailout
This PR (8740) - mean (118ms) : 112, 124
master - mean (117ms) : 112, 122
section CallTarget+Inlining+NGEN
This PR (8740) - mean (789ms) : 767, 812
master - mean (798ms) : 771, 825
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8740) - mean (104ms) : 98, 110
master - mean (101ms) : 98, 104
section Bailout
This PR (8740) - mean (103ms) : 100, 106
master - mean (104ms) : 99, 108
section CallTarget+Inlining+NGEN
This PR (8740) - mean (953ms) : 918, 988
master - mean (955ms) : 910, 999
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8740) - mean (101ms) : 96, 107
master - mean (100ms) : 95, 105
section Bailout
This PR (8740) - mean (104ms) : 99, 109
master - mean (101ms) : 98, 104
section CallTarget+Inlining+NGEN
This PR (8740) - mean (826ms) : 784, 868
master - mean (827ms) : 780, 873
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 (8740) - mean (198ms) : 193, 204
master - mean (198ms) : 193, 203
section Bailout
This PR (8740) - mean (201ms) : 195, 208
master - mean (203ms) : 197, 208
section CallTarget+Inlining+NGEN
This PR (8740) - mean (1,195ms) : 1159, 1232
master - mean (1,196ms) : 1156, 1235
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 (8740) - mean (287ms) : 279, 294
master - mean (285ms) : 278, 292
section Bailout
This PR (8740) - mean (287ms) : 282, 292
master - mean (286ms) : 278, 294
section CallTarget+Inlining+NGEN
This PR (8740) - mean (962ms) : 942, 982
master - mean (955ms) : 935, 976
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8740) - mean (278ms) : 273, 284
master - mean (278ms) : 269, 286
section Bailout
This PR (8740) - mean (278ms) : 273, 283
master - mean (279ms) : 274, 285
section CallTarget+Inlining+NGEN
This PR (8740) - mean (1,157ms) : 1110, 1203
master - mean (1,158ms) : 1114, 1202
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8740) - mean (278ms) : 270, 286
master - mean (276ms) : 272, 280
section Bailout
This PR (8740) - mean (277ms) : 271, 284
master - mean (276ms) : 271, 281
section CallTarget+Inlining+NGEN
This PR (8740) - mean (1,037ms) : 997, 1077
master - mean (1,036ms) : 998, 1073
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Summary of changes
Reason for change
_fileConfigurationbefore the async initialization flow had accepted the loaded file probes.Implementation details
WaitForInitializationAsyncnow waits onGetInitializationTask()with a timeout instead of pollingIsInitialized.Test coverage
dotnet test "tracer/test/Datadog.Trace.Tests/Datadog.Trace.Tests.csproj" -f netcoreapp3.1 --filter "FullyQualifiedName~DynamicInstrumentationTests|FullyQualifiedName~ProbeConfigurationFileLoaderTests"dotnet test "tracer/test/Datadog.Trace.Tests/Datadog.Trace.Tests.csproj" -f netcoreapp3.1 --filter "FullyQualifiedName~ProbeFile_DuplicateIdsWithinFile_KeepsFirstOccurrence|FullyQualifiedName~ProbeFile_MultipleProbeTypes_LoadsAll" --no-restore --no-buildOther details