Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]

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] [, 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.

DATA

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} 

OUTPUT

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 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.

RESET

Set this keyword to clear the results of profiling.

SYSTEM

Set this keyword to profile IDL system procedures and functions. By default, only user-written or library files, which have been compiled, are profiled.

Examples

; 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 

Version History

Introduced: 5.1

See Also

Debugging an IDL Program


Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]