PROFILER
Syntax | Arguments | Keywords | Examples | Version History | See Also
The PROFILER procedure allows you to access the IDL Code Profiler. The IDL Code Profiler helps you analyze the performance of your applications. You can easily monitor the calling frequency and execution time for procedures and functions.
Syntax
PROFILER [, Module] [, /CLEAR] [, DATA=variable] [, FILENAME=path] [, OUTPUT=variable] [, /REPORT] [, /RESET] [, /SYSTEM]
Arguments
Module
The program to which changes in profiling will be applied. If Module is not specified, profiling changes will be applied to all currently-compiled programs.
Note
The Module is often named with respect to the file in which it is stored. For example, the file build_it.pro may contain the module, build_it. If you specify the file name, you will incur a syntax error.
Keywords
CLEAR
Set this keyword to disable profiling of Module or of all compiled modules if Module is not specified. If the Module is a system routine then the SYSTEM keyword must also be set.
DATA
If the REPORT keyword is set, then set this keyword to a specified variable containing output of the report as an unnamed structure with the following tags and data types:
FILENAME
If the REPORT keyword is set, then set this keyword to the name of a file in which to write the profile results.
OUTPUT
If the REPORT keyword is set, then set this keyword to a specified variable in which to store the results of the REPORT keyword.
REPORT
Set this keyword to report the results of profiling. If DATA or OUTPUT are present then the results are returned in the specified variables. Otherwise the results are output to the IDL output log.
RESET
Set this keyword to reset the results of profiling. If this keyword is present then all other arguments and keywords are ignored.
SYSTEM
Set this keyword to apply profiling changes to IDL system procedures and functions. By default, changes are only applied to user-written or library files.
Examples
IDL prints:
Module Type Count Only(s) Avg.(s) Time(s) Avg.(s) DIST (U) 1 0.004473 0.004473 0.014675 0.014675 FINDGEN (S) 1 0.000015 0.000015 0.000015 0.000015 FLTARR (S) 1 0.000036 0.000036 0.000036 0.000036 N_ELEMENTS (S) 1 0.000004 0.000004 0.000004 0.000004 ON_ERROR (S) 1 0.000003 0.000003 0.000003 0.000003 SQRT (S) 251 0.010144 0.000040 0.010144 0.000040 TV (S) 1 0.089689 0.089689 0.089689 0.089689
Version History
See Also
Debugging and Error-Handling (Application Programming).