[TriLUG] What's an effective method for timing a perl script
William Sutton
william at trilug.org
Fri Apr 15 16:17:15 EDT 2005
Well, yes, if ultra-portable means other OSes than *NIX. In that case,
using some sort of time calculation routine is probably better, and if
this is anything inside of a day (sounds likely), probably something one
could write one's self...
William
On Fri, 15 Apr 2005, Ian Kilgore wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I was going to say the same thing, but the mention of "ultra-portable"
> put me off =)
>
> William Sutton wrote:
> | I'm a little more curious about the application of this than is contained
> | at first glance in the description. Are you trying to time the entire
> | process or individual file deletions? If the whole process, then when
> you
> | run it from the command line, you could just do
> |
> | $ time my_process.pl
> |
> | and when it finishes off, you should see something like
> |
> | real 0m0.004s
> | user 0m0.000s
> | sys 0m0.000s
> |
> | fwiw...William
> |
> | On Fri, 15 Apr 2005, Matt Frye wrote:
> |
> |
> |>>my $startTime = time;
> |>>while(glob('./*/Recent/*')){unlink $_}
> |>>print time - $startTime,"\n";
> |>
> |>Cool, thanks. Time:HiRes isn't necessary, in fact neither is adding
> |>stats to my perfectly effective code, but the manager wants to see
> |>them. Go figure.
> |>
> |>MPF
> |>--
> |>TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug
> |>TriLUG Organizational FAQ : http://trilug.org/faq/
> |>TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
> |>TriLUG PGP Keyring : http://trilug.org/~chrish/trilug.asc
> |>
> |>
> |
> |
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.5 (GNU/Linux)
>
> iD8DBQFCYB32wsRpgTiXSOERAgcQAJ99dSmakXZePr7PxfgSK6+rGpIoCACfYC79
> N1gPSYFOFDj7l/S68RCFVAc=
> =KWnY
> -----END PGP SIGNATURE-----
>
More information about the TriLUG
mailing list