Skip to content

Add testing performance telemetry#25980

Merged
eleanorjboyd merged 8 commits into
microsoft:mainfrom
eleanorjboyd:add-testing-perf-telemetry
May 29, 2026
Merged

Add testing performance telemetry#25980
eleanorjboyd merged 8 commits into
microsoft:mainfrom
eleanorjboyd:add-testing-perf-telemetry

Conversation

@eleanorjboyd
Copy link
Copy Markdown
Member

helps to measure: #25978

- Introduced new telemetry events: UNITTEST_RUN_DONE and UNITTEST_TREE_UPDATE.
- Enhanced existing telemetry events to capture additional properties such as mode, trigger, and duration.
- Updated the telemetry context for test discovery to include more detailed metrics.
- Refactored telemetry emission to ensure accurate reporting during test execution and discovery processes.
@eleanorjboyd eleanorjboyd self-assigned this May 29, 2026
@eleanorjboyd eleanorjboyd added debt Code quality issues skip tests Updates to tests unnecessary labels May 29, 2026
@eleanorjboyd eleanorjboyd requested a review from Copilot May 29, 2026 19:09
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends Python testing telemetry to better measure discovery/run performance and attribute outcomes to execution mode (legacy vs project-based) and trigger source, supporting the “Testing reliability & perf 2026” workstream in #25978.

Changes:

  • Move success-path UNITTEST_DISCOVERY_DONE emission to PythonResultResolver.resolveDiscovery() and add per-cycle context (mode, trigger, totalDurationMs, testCount).
  • Add new completion event UNITTEST_RUN_DONE with duration + outcome fields, emitted for both legacy and project-based runs.
  • Thread a discovery trigger through controller → adapter to attribute discovery telemetry, and update unit tests + telemetry typings/GDPR annotations accordingly.
Show a summary per file
File Description
src/test/testing/testController/workspaceTestAdapter.unit.test.ts Updates discovery telemetry expectations (success path now emitted by resolver).
src/test/testing/testController/common/projectTestExecution.unit.test.ts Asserts new UNITTEST_RUN_DONE completion telemetry behavior.
src/client/testing/testController/workspaceTestAdapter.ts Adds per-discovery cycle context + failure telemetry details; removes success-path DISCOVERY_DONE emission from adapter.
src/client/testing/testController/controller.ts Tracks/forwards discovery trigger; emits UNITTEST_RUN_DONE for legacy runs; updates project-discovery failure telemetry.
src/client/testing/testController/common/types.ts Extends TestRefreshOptions to include optional trigger.
src/client/testing/testController/common/resultResolver.ts Adds discovery-cycle context and emits enriched UNITTEST_DISCOVERY_DONE on resolve.
src/client/testing/testController/common/projectTestExecution.ts Emits UNITTEST_RUN_DONE per project execution with duration/outcome fields.
src/client/testing/main.ts Routes interpreter-change refresh through refreshTestData(..., trigger: 'interpreter').
src/client/telemetry/index.ts Updates telemetry property mappings for enriched discovery-done + new run-done event.
src/client/telemetry/constants.ts Removes UNITTEST_DISCOVERY_TRIGGER; adds UNITTEST_RUN_DONE.

Copilot's findings

  • Files reviewed: 10/10 changed files
  • Comments generated: 2

Comment thread src/client/testing/testController/common/resultResolver.ts Outdated
Comment thread src/client/testing/testController/common/projectTestExecution.ts
roblourens
roblourens previously approved these changes May 29, 2026
@eleanorjboyd eleanorjboyd merged commit ac39905 into microsoft:main May 29, 2026
47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

debt Code quality issues skip tests Updates to tests unnecessary

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants