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.
PROFILER [, Module] [, /CLEAR] [, DATA=variable] [, OUTPUT=variable] [, /REPORT] [, /RESET] [, /SYSTEM]
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 |
build_it.pro may contain the module, build_it. If you specify the file name, you will incur a syntax error.
Set this keyword to disable profiling of Module or of all compiled modules if Module is not specified.
Set this keyword to a specified variable containing output of the report as an unnamed structure with the following tags and data types:
{NAME:char, COUNT:long, ONLY_TIME:double, TIME:double,
SYSTEM:byte}
Set this keyword to a specified variable in which to store the results of the REPORT keyword.
Set this keyword to report the results of profiling. If you enter a program at the command line, the PROFILER procedure will report the status of all the specified modules used either since the beginning of the IDL session, or since the PROFILER was reset.
Set this keyword to clear the results of profiling.
Set this keyword to profile IDL system procedures and functions. By default, only user-written or library files, which have been compiled, are profiled.
; Include IDL system procedures and functions when profiling: PROFILER, /SYSTEM ; Create a dataset using the library function DIST. Note that DIST ; is immediately compiled: A= DIST(500) ; Display the image: TV, A ; Retrieve the profiling results: PROFILER, /REPORT
IDL prints:
Module Type Count Only(s) Avg.(s) Time(s) Avg.(s) FINDGEN (S) 1 0.000239 0.000239 0.000239 0.000239 FLTARR (S) 1 0.010171 0.010171 0.010171 0.010171 N_ELEMENTS (S) 1 0.000104 0.000104 0.000104 0.000104 ON_ERROR (S) 1 0.000178 0.000178 0.000178 0.000178 SQRT (S) 251 0.099001 0.000394 0.099001 0.000394 TV (S) 1 2.030000 2.030000 2.030000 2.030000
Introduced: 5.1