Conversation
|
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
|
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
|
|
||
| const logger = this.project.projectService.logger; | ||
| if (logger.hasLevel(ts.server.LogLevel.verbose)) { | ||
| logger.perftrc( |
There was a problem hiding this comment.
Note to reviewers: this is where we do the perf tracing.
| * @param p callback to be run synchronously with an instance of the `NgCompiler` as argument | ||
| * @return the result of running the `p` callback | ||
| */ | ||
| private withCompilerAndPerfTracing<T>(callerName: string, p: (compiler: NgCompiler) => T): T { |
There was a problem hiding this comment.
Part of perf tracing is recording the time it takes each actual Language Service operation to take place. So in addition to appending the results, this function should actually execute p in a perf phase associated with the operation in question. Maybe consider taking that PerfPhase instead of callerName, and using the phase name for the logger.
There was a problem hiding this comment.
I agree, it's make more sense to leverage the existing api of the perf recorder. I'll fix this.
atscott
left a comment
There was a problem hiding this comment.
LGTM if you add tests / explain why you can't add tests to this PR
There was a problem hiding this comment.
I don't think this is particularly useful to include, we can drop it.
There was a problem hiding this comment.
sure, I don't feel strongly about logging this 👍
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.
…41319) 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 angular#41319
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
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.
how to view perf tracing in vscode.
LanguageService#grepping for log files
while testing, I saved the patch to the angular server log to an environment variable and use grep to search for perf tracing.
Test plan
This PR was tested manually against a local build of the vscode extension. I made sure that perf tracing showed up for each public method in

LanguageService