mathworks / jupyter-matlab-proxy

MATLAB Integration for Jupyter enables you to run MATLAB code in Jupyter Notebooks and other Jupyter environments. You can also open MATLAB in a browser directly from your Jupyter environment to use more MATLAB features.
Other
278 stars 36 forks source link

Start the profiler from a cell #87

Open rsp34 opened 6 months ago

rsp34 commented 6 months ago

I was hoping the following in a cell might display the profiler:

profile on

foo()

profile viewer
rashedmyt commented 3 months ago

Hi Ryan,

profile viewer is not yet a supported workflow when using MATLAB Integration for Jupyter. We have forwarded this feature request to the development team and they may consider to support this in a future release of MATLAB.

As an alternative, you could use the profsave MATLAB function to generate HTML files which contains the profiling results. For example,

profile on
foo()
profsave

The generated files are present in profile_results directory. These files can then be viewed in the browser from Jupyter by right-clicking the profile_results/file0.html in the Jupyter File browser and selecting "Open in new browser tab" option.

image

Note that viewing HTML files in the above mentioned way has limitations depending on the browser used. We have found Firefox to provide better experience compared to Chrome (based) browser.

Hope this helps

prabhakk-mw commented 2 months ago

@rsp34 does @rashedmyt 's comment help?