Skip to content

Commit cc73af4

Browse files
committed
feat(language-service): add perf tracing to LanguageService
Adds perf tracing for the public methods in LanguageService. If the log level is verbose or higher, trace performance results to the tsServer logger. This logger is implemented on the extension side in angular/vscode-ng-language-service.
1 parent b61c009 commit cc73af4

File tree

4 files changed

+240
-138
lines changed

4 files changed

+240
-138
lines changed

packages/compiler-cli/src/ngtsc/perf/src/api.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,40 @@ export enum PerfPhase {
110110
*/
111111
LsReferencesAndRenames,
112112

113+
/**
114+
* Time spent by the Angular Language Service calculating a "quick info" operation.
115+
*/
116+
LsQuickInfo,
117+
118+
/**
119+
* Time spent by the Angular Language Service calculating a "get type definition" or "get
120+
* definition" operation.
121+
*/
122+
LsDefinition,
123+
124+
/**
125+
* Time spent by the Angular Language Service calculating a "get completions" (AKA autocomplete)
126+
* operation.
127+
*/
128+
LsCompletions,
129+
130+
/**
131+
* Time spent by the Angular Language Service calculating a "view template typecheck block"
132+
* operation.
133+
*/
134+
LsTcb,
135+
136+
/**
137+
* Time spent by the Angular Language Service calculating diagnostics.
138+
*/
139+
LsDiagnostics,
140+
141+
/**
142+
* Time spent by the Angular Language Service calculating a "get component locations for template"
143+
* operation.
144+
*/
145+
LsComponentLocations,
146+
113147
/**
114148
* Tracks the number of `PerfPhase`s, and must appear at the end of the list.
115149
*/

0 commit comments

Comments
 (0)