1

I've installed snakeviz into venv. Now I'm able to load extension into jupyter notebook via %load_ext snakeviz.

When I run it as magic in the beginning of the cell: %%snakeviz -t it prints

*** Profile stats marshalled to file '/tmp/tmpc9sm6_a0'. 
Opening SnakeViz in a new tab...

So where is this tmp folder? I've tried to look here 'path_to_venv/lib/python3.7/site-packages/snakeviz' but have not found it.

Xronx
  • 1,160
  • 7
  • 23

1 Answers1

1

Internally snakeviz uses pythons tempfile.NamedTemporaryFile for %snakeviz -t:

# get location for saved profile
filename = tempfile.NamedTemporaryFile().name

with default parameters. Among which is delete=True, that means:

If delete is true (the default), the file is deleted as soon as it is closed.

So this file is stored only while the snakeviz new tab is opened. After closing it's deleted. I.e. it has only temporary location.

Xronx
  • 1,160
  • 7
  • 23