bloomberg / memray

Memray is a memory profiler for Python
https://bloomberg.github.io/memray/
Apache License 2.0
13.36k stars 397 forks source link

doc: Live Tracking example not too clear #371

Closed drz416 closed 1 year ago

drz416 commented 1 year ago

Is there an existing proposal for this?

Is your feature request related to a problem?

In the The run subcommand page with, the Live tracking section has some ambiguity in the usage of the "port" for tracking.

memray3.9 run --live-remote application.py Doesn't specify that after it chooses a port, it will print out the chosen port for usage with the following command

memray3.9 live $port The $port syntax was misleading as I thought that the run --live-remote command generated an environment variable, ie. recalled with echo $port

Describe the solution you'd like

The description of that section could be the following:

""" memray3.9 run --live-remote application.py In this mode, memray will choose an unused port, bind to it and display the following message "Run 'memray live \<port>' in another shell to see live results".

It will wait for you to run:

memray3.9 live <port> in another terminal window to attach to it. Regardless of whether you choose to use one terminal or two, the resulting TUI is exactly the same. See Live Reporting for details on how to interpret and control the TUI. """

Alternatives you considered

No response

drz416 commented 1 year ago

I'll work on this one today.