Commit 17f37d6
Fix testing perf telemetry: send measurements via measures arg (microsoft#26028)
## Problem
The discovery/run testing telemetry added in microsoft#25980 emitted its numeric
performance fields — `totalDurationMs`, `testCount`
(`UNITTEST.DISCOVERY.DONE`) and `durationMs`, `requestedCount`
(`UNITTEST.RUN.DONE`) — in the **properties** bag instead of the
**measures** argument of `sendTelemetryEvent`.
These fields are annotated `isMeasurement: true`, and telemetry
ingestion drops measurement-annotated fields that arrive as properties.
Verified against production telemetry: across ~46M
`unittest.discovery.done` events in the last 14 days, **zero** carried
`totalDurationMs` or `testCount` (in either `Properties` or `Measures`),
while the string categoricals (`mode`, `trigger`, `failureCategory`)
came through fine. The `mode`/`trigger` fields survive because they're
strings; the numeric ones silently vanish.
This means there is currently **no duration signal** to evaluate the
recent pytest discovery performance work (microsoft#25974, microsoft#25982) — the
measurements were never actually recorded.
The correct pattern is confirmed by `NATIVE_FINDER_PERF`, which passes
its numbers via the measures (2nd) argument and lands them cleanly in
the `Measures` column.
## Fix
Move the numeric measurement fields to the `measures` (2nd) argument of
`sendTelemetryEvent` at all five emit sites:
- `resultResolver.ts` — `DISCOVERY.DONE` success path
(`totalDurationMs`, `testCount`)
- `controller.ts` — `DISCOVERY.DONE` project-error path
(`totalDurationMs`) and `RUN.DONE` legacy path (`durationMs`,
`requestedCount`)
- `workspaceTestAdapter.ts` — `DISCOVERY.DONE` legacy-error path
(`totalDurationMs`)
- `projectTestExecution.ts` — `RUN.DONE` project path (`durationMs`,
`requestedCount`)
Also removed these fields from the event **property** type definitions
(the `__GDPR__` annotations are unchanged and already correctly mark
them `isMeasurement: true`) and added notes so they aren't reintroduced
as properties.
## Verification
- `tsc`: no new type errors from these changes.
- `eslint` + `prettier`: clean on all changed files.
- Unit tests pass: `resolveDiscovery` (5), project `RUN.DONE` telemetry
(2), and workspace discovery (5).
## Impact
Once a build with this fix ships,
`totalDurationMs`/`testCount`/`durationMs`/`requestedCount` will
populate in the `Measures` column, enabling the before/after
discovery-performance comparison (sliced by `testCount` bucket ×
`mode`). No user-facing behavior change.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent a8c5333 commit 17f37d6
6 files changed
Lines changed: 56 additions & 48 deletions
File tree
- src
- client
- telemetry
- testing/testController
- common
- test/testing/testController
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2209 | 2209 | | |
2210 | 2210 | | |
2211 | 2211 | | |
2212 | | - | |
2213 | | - | |
2214 | | - | |
2215 | | - | |
2216 | | - | |
2217 | | - | |
2218 | | - | |
2219 | | - | |
| 2212 | + | |
| 2213 | + | |
| 2214 | + | |
| 2215 | + | |
2220 | 2216 | | |
2221 | 2217 | | |
2222 | 2218 | | |
| |||
2286 | 2282 | | |
2287 | 2283 | | |
2288 | 2284 | | |
2289 | | - | |
2290 | | - | |
2291 | | - | |
2292 | | - | |
2293 | | - | |
2294 | | - | |
2295 | | - | |
2296 | | - | |
| 2285 | + | |
| 2286 | + | |
| 2287 | + | |
| 2288 | + | |
2297 | 2289 | | |
2298 | 2290 | | |
2299 | 2291 | | |
| |||
Lines changed: 11 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
97 | 99 | | |
98 | 100 | | |
99 | 101 | | |
| |||
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
97 | 105 | | |
98 | 106 | | |
99 | 107 | | |
100 | 108 | | |
101 | 109 | | |
102 | | - | |
103 | | - | |
104 | 110 | | |
105 | 111 | | |
106 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
716 | 716 | | |
717 | 717 | | |
718 | 718 | | |
719 | | - | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
720 | 724 | | |
721 | 725 | | |
722 | 726 | | |
723 | 727 | | |
724 | 728 | | |
725 | | - | |
726 | 729 | | |
727 | 730 | | |
728 | 731 | | |
| |||
1048 | 1051 | | |
1049 | 1052 | | |
1050 | 1053 | | |
1051 | | - | |
1052 | | - | |
1053 | | - | |
1054 | | - | |
1055 | | - | |
1056 | | - | |
1057 | | - | |
1058 | | - | |
1059 | | - | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
1060 | 1065 | | |
1061 | 1066 | | |
1062 | 1067 | | |
| |||
Lines changed: 11 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
164 | 167 | | |
165 | 168 | | |
166 | 169 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
| 158 | + | |
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| |||
0 commit comments