Skip to content

Commit 1fa7760

Browse files
authored
Merge pull request microsoft#166619 from microsoft/tyriar/input_latency_class
Flatten input latency telemetry event
2 parents 9dd6dc2 + 2155320 commit 1fa7760

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

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

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,32 @@ export class InputLatencyContrib extends Disposable implements IWorkbenchContrib
4343
return;
4444
}
4545

46+
type InputLatencyStatisticFragment = {
47+
owner: 'tyriar';
48+
comment: 'Represents a set of statistics collected about input latencies';
49+
average: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The average time it took to execute.'; isMeasurement: true };
50+
max: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The maximum time it took to execute.'; isMeasurement: true };
51+
min: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The minimum time it took to execute.'; isMeasurement: true };
52+
};
53+
4654
type PerformanceInputLatencyClassification = {
4755
owner: 'tyriar';
4856
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.' };
57+
keydown: InputLatencyStatisticFragment;
58+
input: InputLatencyStatisticFragment;
59+
render: InputLatencyStatisticFragment;
60+
total: InputLatencyStatisticFragment;
5361
sampleCount: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The number of samples measured.' };
5462
};
5563

5664
type PerformanceInputLatencyEvent = inputLatency.IInputLatencyMeasurements;
5765

58-
this._telemetryService.publicLog2<PerformanceInputLatencyEvent, PerformanceInputLatencyClassification>('performance.inputLatency', measurements);
66+
this._telemetryService.publicLog2<PerformanceInputLatencyEvent, PerformanceInputLatencyClassification>('performance.inputLatency', {
67+
keydown: measurements.keydown,
68+
input: measurements.input,
69+
render: measurements.render,
70+
total: measurements.total,
71+
sampleCount: measurements.sampleCount
72+
});
5973
}
6074
}

0 commit comments

Comments
 (0)