> On Fri, 31 Mar 2006 18:50:15 -0700, Bryan Harris wrote:
>>>> I have a script that takes ~5 seconds to run, but I'd like to get it
>>>> down to <1 sec.  My problem is I don't know which part is the slow
>>>> part.  
>>> my $start_time = time;
>>>> (code chunk 1 here)
>>> print "chunk 1: ", time - $start_time, " seconds\n"
>>>> 
>>>> -- is there anything I can wrap around the code chunks to see how long
>>>> each one takes?
>>> 
>>> It's crude but effective.
>> 
>> Beautiful, thanks!
> 
> I actually wrote
> http://search.cpan.org/~pjs/Time-TimeTick-0.04/lib/Time/TimeTick.pm for
> this very purpose.


This looks very interesting...  I downloaded it, but I have no idea how to
install it, though.  I'm a modules-idiot.  I tried putting the .pm file in
the current directory and putting "use TimeTick.pm;" at the beginning of my
code, but it doesn't work.  I'd like to be able to just haul the .pm file
around with my script and not have to "install" it on each machine I use...

Thanks!

- Bryan




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to