Desktop Tools and Development Environment Previous page   Next Page

The profile Function

The Profiler is based on the results returned by the profile function. This section describes

profile Function Syntax Summary

Here is a summary of the main forms of profile. For details about these and other options, type doc profile Some people use profile simply to see the child functions; see also depfun for that purpose.

Syntax
Description 
profile on
Starts profile, clearing previously recorded statistics.
profile on -detail level
Specifies the level of function to be profiled, where level can be either:
'mmex'--M-functions, M-subfunctions, and MEX-functions
'builtin'--M-functions, M-subfunctions, MEX-functions, and built-ins
profile on -history
Specifies that the exact sequence of function calls is to be recorded.
profile off
Suspends profile.
profile resume
Restarts profile without clearing previously recorded statistics.
profile clear
Clears the statistics recorded by profile.
profile viewer
Opens the Profiler, a graphical user interface and displays the information gathered as an HTML-formatted report.
Note: If you run the obsoleted syntax
profile report, the profile function calls this syntax.
s = profile('status')
Displays a structure containing the current profile status.
stats = profile('info')
Suspends profile and displays a structure containing profile results.


Previous page  Profile Detail Report Example: Using the profile Function Next page

© 1994-2005 The MathWorks, Inc.