Robert Killheffer wrote:> I'm testing several different algorithms for performing the same task, and> I'm wondering if there is some way I can tell 
- from within each version of> my script - how much memory and CPU time the script uses each time it runs.> >  > > I would like to be able 
to output this information to a log, so that I can> compare these values for the different scripts across a period of time.> >  > > I'd be 
grateful for any suggestions.> >  > > Thanks,> > Rob K.If you have the cygwin tools on your Win32 box, the ported Unix "time" 
command is there which will give you the CPU time and the "resident set size":
time -v dir.......Command being timed: "dir"  User time (seconds): 0.03       
System time (seconds): 0.01     Percent of CPU this job got: 195%       Elapsed (wall 
clock) time (h:mm:ss or m:ss): 0:00.02    Average shared text size (kbytes): 0    Average 
unshared data size (kbytes): 0  Average stack size (kbytes): 0  Average total size 
(kbytes): 0  Maximum resident set size (kbytes): 14160       Average resident set size 
(kbytes): 0   Major (requiring I/O) page faults: 885  Minor (reclaiming a frame) page 
faults: 0       Voluntary context switches: 0   Involuntary context switches: 0 Swaps: 0  
      File system inputs: 0   File system outputs: 0  Socket messages sent: 0 Socket 
messages received: 0     Signals delivered: 0    Page size (bytes): 4096 Exit status: 0
From the CPU percentage above, I don't think that part is accurate :-) and 
memory usage look good . . .  This example is a single-processor machine 
running XP SP2, YMMV . . . .

Dan

--
The information contained in this communication and any attachments is 
confidential and may be privileged, and is for the sole use of the intended 
recipient(s). Any unauthorized review, use, disclosure or distribution is 
prohibited. If you are not the intended recipient, please notify the sender 
immediately by replying to this message and destroy all copies of this message 
and any attachments. ASML is neither liable for the proper and complete 
transmission of the information contained in this communication, nor for any 
delay in its receipt.
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to