Forum Moderators: coopster & phranque

Message Too Old, No Replies

Timing Perl Scripts

How to do it

         

adni18

10:45 pm on Dec 2, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi. I need to time my perl script to see how long it takes. How can I do this?

eltreno

9:49 am on Dec 3, 2004 (gmt 0)

10+ Year Member



In php I set the time in a variable at the top of the script then again at the bottom of it and print the difference of the 2 vars to the page

you'll obviously need time in microseconds

Hope this helps
Trent

adni18

3:29 am on Dec 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



How can that be done?

Brett_Tabke

4:36 am on Dec 4, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Use the Benchmark.pm perl module.

DrDoc

1:36 am on Dec 5, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The benchmark module is awesome!
It's really good for comparing functions (since perl = there's more than one way to do it) to see which is faster and takes less memory...

adni18

7:19 pm on Dec 5, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks.

volatilegx

3:26 am on Dec 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



So how long does Benchmark.pm take to load/interpret? ;)