Flatten input latency telemetry event

Follow up from #163184
This commit is contained in:
Daniel Imms 2022-11-17 10:31:14 -08:00
parent 9740d4b157
commit 8aa17c5d86
No known key found for this signature in database
GPG key ID: E5CF412B63651C69

View file

@ -46,15 +46,51 @@ export class InputLatencyContrib extends Disposable implements IWorkbenchContrib
type PerformanceInputLatencyClassification = {
owner: 'tyriar';
comment: 'This is a set of samples of the time (in milliseconds) that various events took when typing in the editor';
keydown: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The min, max and average time it took for the keydown event to execute.' };
input: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The min, max and average time it took for the input event to execute.' };
render: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The min, max and average time it took for the render animation frame to execute.' };
total: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The min, max and average input latency.' };
'keydown.average': { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The min time it took for the keydown event to execute.' };
'keydown.max': { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The max time it took for the keydown event to execute.' };
'keydown.min': { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The average time it took for the keydown event to execute.' };
'input.average': { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The min time it took for the input event to execute.' };
'input.max': { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The max time it took for the input event to execute.' };
'input.min': { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The average time it took for the input event to execute.' };
'render.average': { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The min time it took for the render animation frame to execute.' };
'render.max': { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The max time it took for the render animation frame to execute.' };
'render.min': { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The average time it took for the render animation frame to execute.' };
'total.average': { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The min input latency.' };
'total.max': { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The max input latency.' };
'total.min': { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The average input latency.' };
sampleCount: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The number of samples measured.' };
};
type PerformanceInputLatencyEvent = inputLatency.IInputLatencyMeasurements;
type PerformanceInputLatencyEvent = {
'keydown.average': number;
'keydown.max': number;
'keydown.min': number;
'input.average': number;
'input.max': number;
'input.min': number;
'render.average': number;
'render.max': number;
'render.min': number;
'total.average': number;
'total.max': number;
'total.min': number;
sampleCount: number;
};
this._telemetryService.publicLog2<PerformanceInputLatencyEvent, PerformanceInputLatencyClassification>('performance.inputLatency', measurements);
this._telemetryService.publicLog2<PerformanceInputLatencyEvent, PerformanceInputLatencyClassification>('performance.inputLatency', {
'keydown.average': measurements.keydown.average,
'keydown.max': measurements.keydown.max,
'keydown.min': measurements.keydown.min,
'input.average': measurements.input.average,
'input.max': measurements.input.max,
'input.min': measurements.input.min,
'render.average': measurements.render.average,
'render.max': measurements.render.max,
'render.min': measurements.render.min,
'total.average': measurements.total.average,
'total.max': measurements.total.max,
'total.min': measurements.total.min,
sampleCount: measurements.sampleCount
});
}
}