Can the Code Profiler be used programmatically to profile an app in App Designer?
2 views (last 30 days)
I am aware that I can open the Profiler, click 'start profiling' run my app, then stop profilling and view it.
Can I initiate the start and stop of the profiling programatically?
tic/toc is good, but that's better to test implementations. the Profiler is great to look at overall where my code is slow.
Voss on 28 May 2022
"Can I initiate the start and stop of the profiling programatically?"
Yes. See the "action" input argument part of the documentation for profile:
Using some of those actions, maybe you can do what you want:
% turn on and start the profiler:
% run a function:
% get the current profiler info:
s = profile('info')
% get the info about the function test_func:
% stop the profiler: