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

Add -browse flag #203

Closed
rakyll opened this issue Aug 21, 2017 · 4 comments
Closed

Add -browse flag #203

rakyll opened this issue Aug 21, 2017 · 4 comments

Comments

@rakyll
Copy link

rakyll commented Aug 21, 2017

As a follow-up from #180, we want to be able to give the users a convenient way to start a new HTTP server at localhost:<random_port>.

There seems to be no good way to do it without a new flag. Empty -http value is conflicting with the positional argument.

$ pprof -http profile.out

I propose us to add a new flag (e.g. browse) that starts a server locally at a random port and opens the page in the browser.

/cc @aalexand

@aalexand
Copy link
Collaborator

aalexand commented Aug 21, 2017

Actually, a bit of markup was lost in my comment changing its meaning. What I typed was Maybe it would be a bit more convenient if we treated -http as "localhost:<port>" when just "<port>" is specified. Just that.

@rakyll
Copy link
Author

rakyll commented Aug 21, 2017

Ugh, got you wrong.

It currently works if you just pass ":port". I think that's already good enough. I will fix the docs to document it. Happy to hear if you think supporting "port" is also valuable, but I prefer to require a colon for consistency.

@aalexand
Copy link
Collaborator

I agree, we can say it's WAI for now.

@rakyll
Copy link
Author

rakyll commented Aug 22, 2017

Opened #204.

I am going to close this issue, please reopen if more convenience is needed at the cost of a new flag.

@rakyll rakyll closed this as completed Aug 22, 2017
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

No branches or pull requests

2 participants