jiffyclub / snakeviz

An in-browser Python profile viewer
https://jiffyclub.github.io/snakeviz/
Other
2.32k stars 136 forks source link

Using snakeviz on a jupyterhub installation #146

Open bsimpson53 opened 4 years ago

bsimpson53 commented 4 years ago

Hi,

I recently stumbled across snakeviz, and I found it really helpful and noticed the notebook magics, it seems to be really suitable for jupyter and works with a local jupyter install but not on jupyterhub.

I'm intending to use it on a jupyterhub installation and I think I can get it to work using:

...and provide some extra options to snakeviz:

I have noticed that there's a problem with the server in that it allows you to export any file on the file-system #62

The other approach (possibly better but more time consuming) would be to write a jupterlab extension and jupyter server extension, but then they would need to be maintained.

I'm happy to contribute back these changes (they might be a bit "rough and ready") but before I do this, has anybody tried to get it to work jupyterhub already and have a better approach (perhaps I've missed a simpler solution)?

bsimpson53 commented 4 years ago

Saw there's a rejected pull request relating to #62 => #136

rcthomas commented 4 years ago

@bsimpson53 Did you end up giving this a try?

bsimpson53 commented 4 years ago

@rcthomas got side tracked, other things took priority, I still think it's worthwhile though and it's on my list