Introduction
News
Download
Installation
Usage
Expected Format of the IDL Code
Line profiling determines the amount of time spent executing each line of code.
IDL has a PROFILE tool, but it only determines the amount of time spent in each function or procedure. It doesn't resolve the time spent on each line.Included here are the necessary scripts and procedures to perform line profiling on IDL code.
NOTE: This is a very young version. It makes assumptions about the source code file that may not always be true (see below) but it should be easy to alter the source code to conform to the expectations. As the code matures, it will become more robust. Hopefully the script will become more versatile as I develop it. I invite users to contact me with comments.
2007-02-13: Version 1.1 released.
The current version is IDL_line_profile-1.1.tgz.
Extract the files from the .tgz archive (see Download).
In your regular path (~/bin/ for example), install the file:
IDL_line_profile
In your IDL path (or add a path in your startup.pro file), install:
process_line_profile.pro
profile_save.pro
If my_program.pro is the script/procedure you wish to line profile, then
At the moment, the source file can have only one procedure. Simply put, the script processes all the lines of code between the first PRO and the first END statements.
So these are good:
PRO my_program code line 1 code line 2 ... END
; Comment ; Comment PRO my_program code line 1 code line 2 ... END
This is bad:
FUNCTION my_function, arg1 function line 1 END PRO my_program code line 1 code line 2 ... END
Last modified: 2007-02-13 (Eric Tittley)