| Date: | Mon, 30 Jun 1997 20:13:51 -0700 |
| Reply-To: | "Karsten M. Self" <kmself@IX.NETCOM.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU> |
| From: | "Karsten M. Self" <kmself@IX.NETCOM.COM> |
| Subject: | Re: stimer estimation of elapsed time incorrect ? |
|
| Content-Type: | text/plain; charset="iso-8859-1" |
Bernard:
I don't know how much I'd trust either the SAS TIME function in its macro invocation or the STIMER option (on relatively short program steps). For a more realistic head-to-head (tete a tete?) comparison, write your SQL to a file and run it in batch mode with the UNIX 'time' function. With appropriate options it will give you the user, system, and elapsed time required by your process.
I suspect that there is some overhead involved in compiling and running the %SYSFUNC macro steps -- macro is not horribly efficient, though most of the time this isn't noticed as it is used only to generate relatively small amounts of code, which themselves consume most of they system time and resources as they are executed. I do find it interesting that an internal step of the PROC SQL takes 1.08 seconds (real) while the entire step requires only 0.14 seconds. I'd lay my bets with the latter and question the macro execution time.
To 'time' your sas job in batch from the UNIX command prompt, try:
$ time sas myprog.sas
...substitute the appropriate SAS invocation for 'sas' as appropriate.
Karsten M. Self (kmself@ix.netcom.com)
What part of "gestalt" don't you understand?
-----Original Message-----
From: Bernard Tremblay [SMTP:bernard@CAPITALE.QC.CA]
Sent: Monday, June 30, 1997 3:07 AM
To: Multiple recipients of list SAS-L
Subject: stimer estimation of elapsed time incorrect ?
To all,
I have the following log from SAS:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1319 %put %sysfunc(time(),time.);
14:52:58
1320 proc sql stimer;
NOTE: SQL Statement used:
real time 0.140 seconds
cpu time 0.011 seconds
1321 drop table f1, f2;
NOTE: Table WORK1.F1 has been dropped.
NOTE: Table WORK1.F2 has been dropped.
NOTE: SQL Statement used:
real time 1.080 seconds
cpu time 0.044 seconds
1322 quit;
NOTE: PROCEDURE SQL used:
real time 0.140 seconds
cpu time 0.024 seconds
1323 %put %sysfunc(time(),time.);
14:53:02
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
According to the time function, the total elapsed time should be
14:53.02 - 14:52.58 = 0.44 second, but if I add the figures from the log,
I get 0.140+1.080+0.140 = 1.360 ... How bizarre!
Could it be that de deletion of the two table is done in background, and
SAS add the times to calculate the "total elapsed time" or something ...
Anybody has an explanation ?
NB: those figure are from SAS 6.12 on a SUN with the following OS
"SunOS 5.4 Generic_Patch sun4d sparc".
Regards,
\\\|///
\\ - - //
( @ @ )
+------oOOo-(_)-oOOo----------+---------------------------------+
| Bernard Tremblay | |
| La Capitale | Tel: (418) 646-2401 |
| | Fax: (418) 646-5960 |
| | Int: bernard@capitale.qc.ca |
+-----------------------------+---------------------------------+
| Imaginasys enr | Res: (418) 878-4447 |
| | Int: bertrem@quebectel.com |
+---------------Oooo----------+---------------------------------+
oooO ( )
( ) ) /
\ ( (_/
\_)
|