Skip to content

Commit 8aa17c5

Browse files
committed
Flatten input latency telemetry event
Follow up from #163184
1 parent 9740d4b commit 8aa17c5

File tree

1 file changed

+42
-6
lines changed

1 file changed

+42
-6
lines changed

src/vs/workbench/contrib/performance/browser/inputLatencyContrib.ts

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,51 @@ export class InputLatencyContrib extends Disposable implements IWorkbenchContrib
4646
type PerformanceInputLatencyClassification = {
4747
owner: 'tyriar';
4848
comment: 'This is a set of samples of the time (in milliseconds) that various events took when typing in the editor';
49-
keydown: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The min, max and average time it took for the keydown event to execute.' };
50-
input: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The min, max and average time it took for the input event to execute.' };
51-
render: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The min, max and average time it took for the render animation frame to execute.' };
52-
total: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The min, max and average input latency.' };
49+
'keydown.average': { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The min time it took for the keydown event to execute.' };
50+
'keydown.max': { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The max time it took for the keydown event to execute.' };
51+
'keydown.min': { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The average time it took for the keydown event to execute.' };
52+
'input.average': { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The min time it took for the input event to execute.' };
53+
'input.max': { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The max time it took for the input event to execute.' };
54+
'input.min': { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The average time it took for the input event to execute.' };
55+
'render.average': { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The min time it took for the render animation frame to execute.' };
56+
'render.max': { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The max time it took for the render animation frame to execute.' };
57+
'render.min': { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The average time it took for the render animation frame to execute.' };
58+
'total.average': { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The min input latency.' };
59+
'total.max': { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The max input latency.' };
60+
'total.min': { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The average input latency.' };
5361
sampleCount: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The number of samples measured.' };
5462
};
5563

56-
type PerformanceInputLatencyEvent = inputLatency.IInputLatencyMeasurements;
64+
type PerformanceInputLatencyEvent = {
65+
'keydown.average': number;
66+
'keydown.max': number;
67+
'keydown.min': number;
68+
'input.average': number;
69+
'input.max': number;
70+
'input.min': number;
71+
'render.average': number;
72+
'render.max': number;
73+
'render.min': number;
74+
'total.average': number;
75+
'total.max': number;
76+
'total.min': number;
77+
sampleCount: number;
78+
};
5779

58-
this._telemetryService.publicLog2<PerformanceInputLatencyEvent, PerformanceInputLatencyClassification>('performance.inputLatency', measurements);
80+
this._telemetryService.publicLog2<PerformanceInputLatencyEvent, PerformanceInputLatencyClassification>('performance.inputLatency', {
81+
'keydown.average': measurements.keydown.average,
82+
'keydown.max': measurements.keydown.max,
83+
'keydown.min': measurements.keydown.min,
84+
'input.average': measurements.input.average,
85+
'input.max': measurements.input.max,
86+
'input.min': measurements.input.min,
87+
'render.average': measurements.render.average,
88+
'render.max': measurements.render.max,
89+
'render.min': measurements.render.min,
90+
'total.average': measurements.total.average,
91+
'total.max': measurements.total.max,
92+
'total.min': measurements.total.min,
93+
sampleCount: measurements.sampleCount
94+
});
5995
}
6096
}

0 commit comments

Comments
 (0)