taint has asked for the wisdom of the Perl Monks concerning the following question:
I've often wondered how to accurately measure the compile/runtime of a Perl script. For example, I can imagine a web page would be the most difficult. Given the different Modules that might be used, Perl processing the text/data included, not to mention the included Modules. I've looked at Time::HiRes using
I've also looked at Time::Elapse, yet both yield different results, when using the exact same sample data (page). So I thought I might inquire here, and see if anyone might have a definitive answer, or solution.Time::HiRes qw/gettimeofday tv_interval/; my $start_time = [gettimeofday]; # AT end of page my $total_time = tv_interval($start_time); print $start_time
Thanks for your time.
--Chris
#!/usr/bin/perl -Tw use Perl::Always or die; my $perl_version = (5.12.5); print $perl_version;
|
|---|