Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test automatic extension host profiling #64222

Closed
2 tasks done
jrieken opened this issue Dec 3, 2018 · 4 comments
Closed
2 tasks done

Test automatic extension host profiling #64222

jrieken opened this issue Dec 3, 2018 · 4 comments

Comments

@jrieken
Copy link
Member

jrieken commented Dec 3, 2018

Refs: #60332

Complexity: 4

When an extension takes over the extension host process we now start to profile and to point out those extensions. This is how it works:

  • profiling starts when the extension host is unresponsive for 3 seconds already
  • profiling lasts for 5 seconds or shorter when the extension host responsive again
  • when an extension can be identified as heavy hitter, a log message is printed
  • also a telemetry event is send
  • last when an extension stole 5 seconds or more a silent notification is shown - a minified notification that shows as number in the statusbar
  • selecting that notification will ask you file an issue (only when the extension has a issue-url in its package-json)

With an extension doing heavy work, like dump fibonacci number computation, test the following:

  • Trigger the expensive code via a command and listener
  • Check the log and confirm that your extension get blamed correctly
  • Add a repo-url and check that the editor asks you to file an issue
  • Test that the silent notification only shows when your extension took 5 seconds or more
  • Check that the file-issue command stores the cpu-profile in your home-dir and that the issue mentions that
  • Check that the cpu-profile contains no PII
@isidorn
Copy link
Contributor

isidorn commented Dec 4, 2018

Works nicely overall and I like the flow. Great job.
Just one thing to clarify: I was unable to load the automatically captured cpuProfile in my chrome devtools, I simply renamed it by removing the .txt at the end and did the load profile, however to no result. Does this work nicely on your machine @jrieken

@mjbvz
Copy link
Contributor

mjbvz commented Dec 4, 2018

Blocked by testing some of this by #64388. Any reason why I would not be seeing the user facing alerts?

@jrieken
Copy link
Member Author

jrieken commented Dec 5, 2018

@mjbvz you need a repo url - we don't wanna blame extensions that don't have an issue url.

@mjbvz
Copy link
Contributor

mjbvz commented Dec 5, 2018

Thanks. Everything looks good once I added the repo

@mjbvz mjbvz closed this as completed Dec 5, 2018
@mjbvz mjbvz removed their assignment Dec 5, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants