Skip to content

Commit

Permalink
feat(language-service): add perf tracing to LanguageService (#41319)
Browse files Browse the repository at this point in the history
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.

PR Close #41319
  • Loading branch information
zarend authored and alxhub committed Mar 31, 2021
1 parent a371646 commit 90f85da
Show file tree
Hide file tree
Showing 4 changed files with 240 additions and 138 deletions.
34 changes: 34 additions & 0 deletions packages/compiler-cli/src/ngtsc/perf/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,40 @@ export enum PerfPhase {
*/
LsReferencesAndRenames,

/**
* Time spent by the Angular Language Service calculating a "quick info" operation.
*/
LsQuickInfo,

/**
* Time spent by the Angular Language Service calculating a "get type definition" or "get
* definition" operation.
*/
LsDefinition,

/**
* Time spent by the Angular Language Service calculating a "get completions" (AKA autocomplete)
* operation.
*/
LsCompletions,

/**
* Time spent by the Angular Language Service calculating a "view template typecheck block"
* operation.
*/
LsTcb,

/**
* Time spent by the Angular Language Service calculating diagnostics.
*/
LsDiagnostics,

/**
* Time spent by the Angular Language Service calculating a "get component locations for template"
* operation.
*/
LsComponentLocations,

/**
* Tracks the number of `PerfPhase`s, and must appear at the end of the list.
*/
Expand Down

0 comments on commit 90f85da

Please sign in to comment.