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
That is the correct way to do it.
That is the correct way to do it.
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.
@SASKiwi wrote:
With batch SAS logs a total real and CPU time for the whole job is printed at the end.
Exactly:
>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
Hi! I use "SAS on Demand for Academics". Many thanks! / AndersS
Hi @AndersS
I know you marked this as solved, but if you wanted to have more elaborate measurements displayed in the log, you can use
options fullstimer;
https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/hostunx/n0k7vnqt9p9o91n1jsl23a08l13e.htm
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.
SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.
Find more tutorials on the SAS Users YouTube channel.