-----BEGIN PGP SIGNED MESSAGE----- Moin,
On Sunday 13 March 2005 00:43, Mark Stosberg wrote: > On Sat, Mar 12, 2005 at 03:29:32PM -0800, Michael G Schwern wrote: > > Well, if you're just going to look at the wall clock, why use the > > shell? > > Err...because I forgot about the simple 'time' command? :o) As said, do not forget to look at Time::HiRes. > > my $start_time = time; > > `$bin diff 1/1 2>&1`; > > my $end_time = time; > > my $time = $end_time - $start_time; > > > > If you throw Time::HiRes in there you can get fractional second > > granularity. > > > > There is also a benchmarking module cunningly named "Benchmark" which > > you should have a look at. > > Now now, I mentioned in the message I looked at 'Benchmark' first and > it didn't work. I got the sense it might have only been timing the Perl > parts of the code, which makes sense if you are using it to optimize > Perl rather than system calls. Also, Benchmark.pm does run the test multiple times and reports "per second" stats. If you are aiming at tests that run multiple seconds, it is the wrong tool. > For what I need, I think simply calling 'time' will do. Yep :) Best wishes, Tels - -- Signed on Sun Mar 13 11:26:06 2005 with key 0x93B84C15. Visit my photo gallery at http://bloodgate.com/photos/ PGP key on http://bloodgate.com/tels.asc or per email. "I am soo clumsy today." *crash* -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iQEVAwUBQjQVjHcLPEOTuEwVAQGnlAf/RpfuPEu4R+C9dz0Z6ibTZWAlf6LhL5DO WFh4pHCzQu7pQVBz4lwxw+4/+OVccgnzfsrUPw2WtTniA1GPKh2lv5NfR977JdKn siDxnT+dGsqKehuEJppUHYOoSk5XriOqXOawNYv/QWabyfkK6agcX2FCvbjeQgkw /3oM0B1CWTP+3fmqgxOjet3zVsPHlhXK1c+5MvYzsXiQHbdvZCnUPEgmqoyw3nNu M864Rl8+CAicHRze8u+ZO84o6hRGY90TAWsi5ACP2frH28G71zaUjg/PAkc5+oBy McvkfUKRknhfSFy+JVwj2XbinXwT/WHaVbUY9jXHxR+5Mspdy6pyEw== =Uvnm -----END PGP SIGNATURE-----