Skip to content

Commit

Permalink
feat(language-service): add perf tracing to LanguageService
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.
  • Loading branch information
zarend committed Mar 31, 2021
1 parent 723bfc7 commit fde57b4
Show file tree
Hide file tree
Showing 4 changed files with 219 additions and 118 deletions.
34 changes: 34 additions & 0 deletions packages/compiler-cli/src/ngtsc/perf/src/api.ts
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 fde57b4

Please sign in to comment.