Skip to content

Re-enable duplicate metric test with default timeout - #6088

Merged
max-charlamb merged 4 commits into
dotnet:mainfrom
max-charlamb:eventpipe-stop-timing-diagnostics
Oct 8, 2026
Merged

max-charlamb merged 4 commits into
dotnet:mainfrom
max-charlamb:eventpipe-stop-timing-diagnostics

Conversation

@max-charlamb

@max-charlamb max-charlamb commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Summary

Fixes #5375.

Remove the test-specific three-second process watchdog from TestDuplicateNameMetrics and use the shared 60-second default, matching the other pipeline tests. Re-enable the test on Windows and macOS. The .NET 8 skip remains because instrument IDs require .NET 9 or later.

Investigation

The original logs did not timestamp counter callbacks, which made the delay look like slow shutdown. Instrumented runs show that most time is spent waiting for counter delivery, not stopping the pipeline.

With a temporary six-second watchdog, all 21 .NET 9/10/11 cases passed across Linux x64/ARM64, Linux musl x64, Windows x64/x86/ARM64, and macOS ARM64 in build 1626709. The macOS ARM64/.NET 11 run received its last expected counter at 3.347 seconds and finished at 3.597 seconds, exceeding the original three-second watchdog. macOS x64 did not run this test project.

Using the standard watchdog leaves room for collection intervals and CI scheduling delays without delaying successful tests: the pipeline stops as soon as all four expected tag combinations are received.

Validation

  • Targeted project build and local Windows x64 runs passed on .NET 9, 10, and 11 with the final default-timeout change.
  • Cross-platform CI evidence above used the preceding six-second experiment; the final change will receive a new CI run.
  • Build 1626709 failed in other test suites; the duplicate metric cases all passed.

Max Charlamb and others added 2 commits October 6, 2026 18:20
TestMetricsLogger previously wrote 'Found expected counter' and
'Received additional counter event' lines directly through the raw
ITestOutputHelper, with no timestamp. This made it impossible to tell
exactly when counter payloads arrived relative to the pipeline stop
sequence, which is useful for diagnosing intermittent timeouts in
TestDuplicateNameMetrics/TestCounterEventPipeline (e.g. dotnet#4757).

Add elapsed-time and payload Timestamp/Interval info to each log line
so CI runs give exact arrival times for counter events during the stop
drain, instead of only being bounded by neighboring timestamped lines.
Increase the process watchdog to six seconds to investigate whether timing explains the Windows and macOS failures tracked by dotnet#5375.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 90d32376-768b-4f8c-a982-54247c372cf3
Rely on the shared 60-second process watchdog rather than a test-specific timeout. Keep Windows and macOS enabled.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 90d32376-768b-4f8c-a982-54247c372cf3
@max-charlamb max-charlamb changed the title [Investigation] Add precise timestamps to EventCounterPipeline test logging Re-enable duplicate metric test with default timeout Oct 7, 2026
Keep the PR focused on removing the platform skip and using the default process timeout.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 90d32376-768b-4f8c-a982-54247c372cf3
@max-charlamb
max-charlamb marked this pull request as ready for review October 7, 2026 21:00
@max-charlamb
max-charlamb requested a review from a team as a code owner October 7, 2026 21:00
@max-charlamb

Copy link
Copy Markdown
Member Author

/ba-g legacy test failure

@max-charlamb

Copy link
Copy Markdown
Member Author

/ba-g legacy test failure

@max-charlamb
max-charlamb merged commit 22b2ea6 into dotnet:main Oct 8, 2026
22 of 24 checks passed
@max-charlamb
max-charlamb deleted the eventpipe-stop-timing-diagnostics branch October 8, 2026 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Microsoft.Diagnostics.Monitoring.EventPipe.UnitTests.EventCounterPipelineUnitTests.TestDuplicateNameMetrics fails

2 participants