fix(diag): attach EventPipe observers after client startup

Starting dotnet-counters in the process-creation race can suspend the CLR before the graphical host creates its window. Wait for the guaranteed in-world boundary, then attach counters and contention tracing during the route's warm-up interval.

Co-Authored-By: Codex <noreply@openai.com>
This commit is contained in:
Erik 2026-07-24 13:09:24 +02:00
parent 2c874b0977
commit 4285f1dbb1
2 changed files with 12 additions and 1 deletions

View file

@ -351,6 +351,13 @@ public sealed class ConnectedR6SoakContractTests
"RuntimeCounters = if (-not $SkipRuntimeCounters) { $runtimeCounters } else { $null }",
source,
StringComparison.Ordinal);
AssertAppearsInOrder(
source,
"Wait-ForLogPattern $process $stdoutLog 'live: in world'",
"if (-not $SkipRuntimeCounters) {",
"Start-Process -FilePath 'dotnet-counters'",
"if ($CaptureContention) {",
"Start-Process -FilePath 'dotnet-trace'");
}
[Fact]