DATA Step, Macro, Functions and more

Record execution time into a dataset

Reply
Frequent Contributor
Posts: 77

Record execution time into a dataset

A user can get real time & cpu time info for a proc/data step in the SAS log. But if a program contain many proc/data steps, reading the log to obtain the execution time info become a horrible task. I wonder if there is any way to automatically record the execution time into a SAS dataset with the following layout:

step real_time cpu_time
DATA 1.32 0.88
PROCEDURE 0.44 0.10
PROCEDURE 2.18 0.45
.....
Super User
Posts: 10,023

Re: Record execution time into a dataset

You can use proc printto to redirect log into a txt file, then write some code to get information needed.


Ksharp
Super User
Posts: 10,023

Re: Record execution time into a dataset

You can use proc printto to redirect log into a txt file, then write some code to get information needed.


Ksharp
Regular Contributor
Posts: 241

Re: Record execution time into a dataset

Instead of parsing the log file, I would recommend using the Application Response
Measurement (ARM) API. This sas-l posting with links may help.
The reference manual is here.
Frequent Contributor
Posts: 77

Re: Record execution time into a dataset

Posted in reply to chang_y_chung_hotmail_com
Thanks Ksharp & Guru Chung for your input!
Regular Contributor
Posts: 171

Re: Record execution time into a dataset

This paper might be of interest to you.

http://www2.sas.com/proceedings/sugi30/219-30.pdf
Ask a Question
Discussion stats
  • 5 replies
  • 253 views
  • 0 likes
  • 4 in conversation