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

Use pprof web interface #1747

Closed
firelizzard18 opened this issue Sep 3, 2021 · 4 comments
Closed

Use pprof web interface #1747

firelizzard18 opened this issue Sep 3, 2021 · 4 comments

Comments

@firelizzard18
Copy link
Contributor

From a conversation on CL 344149

@hyangah

I wondered if it's possible to borrow the pprof's web interface (available through -http=localhost:12345). But that will require to run a pprof server. (user clicks a "open pprof UI" button, that triggers pprof -http=:port ... and let the default browser open (which pprof handles)?

@firelizzard18

I think we can probably do that. Run the server and then launch a webview. It might require an iframe, but VSCode might explicitly block browsing to random webpages. I'll look into it. I'd rather do that as a separate CL, to keep this one small.

@gopherbot gopherbot added this to the Untriaged milestone Sep 3, 2021
@firelizzard18
Copy link
Contributor Author

I still need to check if this is an option (if VSCode allows webviews to point at localhost:12345)

@hyangah hyangah modified the milestones: Untriaged, v0.27.2, On Deck, Backlog Sep 4, 2021
@firelizzard18
Copy link
Contributor Author

@hyangah I have verified that this can be done with an <iframe>. It's essentially identical to visualizing via pprof -dot, except the process continues running and the webview HTML embeds an iframe instead of an SVG.

@firelizzard18
Copy link
Contributor Author

Here's what it looks like in an iframe:

image

@gopherbot
Copy link
Collaborator

Change https://golang.org/cl/345477 mentions this issue: src/goTest: visualize profiles

@golang golang locked and limited conversation to collaborators Oct 13, 2022
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