Logging and bc. [Was: Re: r3353]

Dan Nicholson dbn.lists at gmail.com
Mon May 21 17:05:26 PDT 2007


On 5/21/07, M.Canales.es <macana at macana-es.com> wrote:
> El Domingo, 20 de Mayo de 2007 18:38, Ag. D. Hatzimanikas escribió:
> > On Sun, May 20, at 08:14 Dan Nicholson wrote:
> > > A couple things to thing about.
> > >
> > > 1. The script would obviously be improved if it was done all in perl
> > > instead of forking a ton of processes. But that would require one of
> > > use to know perl :)
>
> I not, for sure ;-)

Me neither. Perl syntax makes me want to vomit :)

> > > 2. We can be smarter about how we log the time to start out with.
> > > Instead of just taking the output that `time' gives, it would be
> > > better if there was a value just in seconds. You can do this by using
> > > the TIMEFORMAT variable in bash or by doing some external timing like
> > > I did before with perl.
>
> The perl timing looks very intrusive, at least to me. It implies replacing a
> simple "time" call by two "date" plus one "perl" calls, increasing a lot the
> Makefile size.

Yeah. As long as we have bash, it's silly not to use it's timing
routine. Especially since using $SECONDS isn't as precise as time.

> To set TIMEFORMAT seems a good idea. It could allow to simplify a lot time
> calculations

Sure. Play around with TIMEFORMAT. It could be anything you want. The
point was just that the format can be made so that parsing the value
is easy and obvious.

--
Dan



More information about the alfs-discuss mailing list