Add testing performance telemetry#25980
Merged
eleanorjboyd merged 8 commits intoMay 29, 2026
Merged
Conversation
- 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.
There was a problem hiding this comment.
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_DONEemission toPythonResultResolver.resolveDiscovery()and add per-cycle context (mode,trigger,totalDurationMs,testCount). - Add new completion event
UNITTEST_RUN_DONEwith duration + outcome fields, emitted for both legacy and project-based runs. - Thread a discovery
triggerthrough 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
roblourens
previously approved these changes
May 29, 2026
Yoyokrazy
approved these changes
May 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
helps to measure: #25978