Programming and Data Types | ![]() ![]() |
The Profiler is based on the results returned by the profile
function. There are some features available with the profile
function that are not part of the Profiler.
profile
function counts how many seconds each line in the M-files uses. It works cumulatively, that is, adding to the count for each M-file you execute until you clear the statistics.
profile report
to display the statistics gathered in an HTML-formatted report in your system's default Web browser. This report contains some information different from what is available in the Profiler reports.
Here is a summary of the main forms of profile
. For details about these and other options, type doc profile
.
Syntax |
Option |
Description |
profile |
|
Starts profile , clearing previously recorded statistics. |
|
|
Specifies the level of function to be profiled. |
|
- |
Specifies that the exact sequence of function calls is to be recorded. |
profile |
|
Suspends profile . |
profile |
|
Suspends profile , generates a profile report in HTML format, and displays the report in your system's default Web browser. This report contains some information different from what is available in the Profiler reports. |
|
basename |
Saves the report in the file basename in the current directory. |
profile |
|
Suspends profile and displays in a figure window a bar graph of the functions using the most execution time. |
profile |
|
Restarts profile without clearing previously recorded statistics. |
profile |
|
Clears the statistics recorded by profile . |
profile |
|
Opens the Profiler, a graphical user interface. This provides information gathered using the profile function, but presents the information in a different format from the profile function reports. |
s = profile(' |
|
Displays a structure containing the current profile status. |
stats = profile(' |
|
Suspends profile and displays a structure containing profile results. |
Some people use profile
simply to see the child functions; see also depfun
for that purpose.
![]() | Changing Fonts for the Profiler | An Example Using profile | ![]() |