Reputation:
When I ran $ snakeviz code_profile.prof
from CLI :
snakeviz web server started on 127.0.0.1:8080; enter Ctrl-C to exit http://127.0.0.1:8080/snakeviz/%2Fhome%2Fatmadeep%2FProjects%2FtrafficAI-master%2Fprofile_info-60.prof snakeviz: error: no web browser found: could not locate runnable browser
After some search, I tried running it in server only mode and got this error using --server
argument :
Traceback (most recent call last): File "/home/atmadeep/anaconda3/envs/work-env/lib/python3.7/site-packages/tornado/web.py", line 1681, in _execute result = self.prepare() File "/home/atmadeep/anaconda3/envs/work-env/lib/python3.7/site-packages/tornado/web.py", line 2430, in prepare raise HTTPError(self._status_code) tornado.web.HTTPError: HTTP 404: Not Found
What might be the problem here? Is the profile generated corrupt or am I not understanding something related to snakeviz.
Note: I'm not running this code in jupyter-notebook.
Upvotes: 2
Views: 6337
Reputation:
So, here's the solution. from the console, run:
$python -m snakeviz program.prof --server
When running from console, snakeviz
needs to be called as shown above.
Upvotes: 3
Reputation: 299
on a server you have to add --server argument and to click on the link in the terminal. Putting a threshold at 1/100 helps also.
Upvotes: 0