Hi! Is there any good way to measure the cpu-time for a SAS program?
At present I look in the SAS log and add together
user cpu-time and system cpu-time
/Best Regards AndersS
If it is a batch program, wrap the sas commandline in the time command:
time /path_to_sas/sas -log /logpath/program.log -sysin /progpath/program.sas
With batch SAS logs a total real and CPU time for the whole job is printed at the end.
>tail -n5 sassy.log NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414 NOTE: The SAS System used: real time 1:17.30 cpu time 6.09 seconds
I know you marked this as solved, but if you wanted to have more elaborate measurements displayed in the log, you can use
System CPU time is the time used by kernel calls (like the very basic read() or write() functions), while user CPU is the time spent in the non-system code. It is therefore correct to add both numbers up to get the whole CPU used by a process (or a SAS program step).
The SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment.
Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.
Find more tutorials on the SAS Users YouTube channel.