Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start the profiler from a cell #87

Open
rsp34 opened this issue Apr 25, 2024 · 2 comments
Open

Start the profiler from a cell #87

rsp34 opened this issue Apr 25, 2024 · 2 comments

Comments

@rsp34
Copy link

rsp34 commented Apr 25, 2024

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

profile on

foo()

profile viewer
@rsp34 rsp34 changed the title Call the profiler be enabled from a Jupyter cell Call the profiler be enabled from a cell Apr 25, 2024
@rsp34 rsp34 changed the title Call the profiler be enabled from a cell Start the profiler from a cell Apr 25, 2024
@rashedmyt
Copy link
Member

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
Copy link
Member

@rsp34 does @rashedmyt 's comment help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants