MATLAB Profiler - Granularity of Information

MATLAB Profiler produces very coarse granularity of performance statistics on a model I'm developing and testing:
  • # of times a routine is called;
  • Total Time, and Self Time.
However no information is provided on other routines, including MATLAB primitives, called. Can this finer grained information be obtained from Profiler?

6 Comments

Are you certain that you want an exact count on the number of times that subsref is called for each data type, or the number of times that toolbox/matlab/ops/@double/plus is called due to arithmetic operations ?
Yes. While we assume the largest % of the total computational burden will be due to routines our time writes, those routines will most likely call MATLAB primitives. The % of time spent in a custom routine relative to time spent in MATLAB primitive or a referenced custom routine will determine whether performance optimization is warranted, i.e., return on investment (ROI). Since our application is event-driven and mission critical, application is critical to success.
Evans Harrigan
Technical Consultant to the Boeing Company
Correction of typos: "routines our team, instead of time;" "application performance is, instead of application is."
Evans Harrigan
Consultant to the Boeing Company
Yes, I'm aware of Altman's book and plan to purchase it as a reference. The graphical feature should be useful. However, access to the data from which the graphs are produced is also of interest to our team. Thanks for this reference.
Evans
There are four technical articles on Undocumented profiler options on Altman's web-site. And he mostly provides good answers to specific questions in the comment sections.

Sign in to comment.

 Accepted Answer

Use the [undocumented] -detail builtin profiler option, as in: profile on -detail builtin
This works on old Matlab releases as well as new ones.

More Answers (1)

This got better in R2020a with the new interface to the profiler.

1 Comment

We are planning to upgrade to this version, imminently.

Sign in to comment.

Products

Release

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!