Skip to content

Add flags to collect CPU and allocation profiles for GopherJS #1114

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

Merged
merged 2 commits into from
Apr 18, 2022

Conversation

nevkontakte
Copy link
Member

This will be a helpful tool for performance issue investigations.

In order to implement this I also had to refactor use of os.Exit() in the main package, since it was preventing Cobra's post-run functions from executing.

It prevents usual cleanup idioms like deferrals and Cobra's PostRun
functions from executing. Instead, we rely on Cobra's RunE interface,
which allows returning errors from commands, which are propagated to the
top level and can be handled at the top level.
@nevkontakte nevkontakte requested a review from flimzy April 17, 2022 20:17
@nevkontakte nevkontakte enabled auto-merge April 17, 2022 20:17
@nevkontakte nevkontakte merged commit b4356dc into gopherjs:master Apr 18, 2022
@nevkontakte nevkontakte deleted the pprof branch April 18, 2022 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants