bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] maint.mk: print the elapsed time for each syntax-check rule


From: Eric Blake
Subject: Re: [PATCH] maint.mk: print the elapsed time for each syntax-check rule
Date: Mon, 12 Apr 2010 10:51:04 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Lightning/1.0b1 Thunderbird/3.0.4

On 04/11/2010 03:31 AM, Jim Meyering wrote:
> This patch does something I've wanted for a while.
> It prints the elapsed time for each individual syntax-check rule.
> 
> I don't particularly like the fact that each new rule
>   - uses a temporary .sc-start-* file in which it saves each start time
>   - uses awk to compute the difference of two floating point numbers
> 
> Initially I used "bc" to compute the difference, but that was overkill.
> The way I'm using awk isn't pretty, especially considering that
> most modern shells can do "$[end - start]", but it works.

$[] is not portable; $(()) is the POSIX-preferred variant that even more
shells support.  And we already make a lot of assumptions in maint.mk
that maintainers have a POSIX shell (that is, I seriously doubt that
Solaris /bin/sh would work with maint.mk), in part because we are also
guaranteed that GNU make is running if maint.mk is even in use.

I haven't looked closely at the patch yet, for possible improvements,
but I am pleased with the idea of listing elapsed times (it will
probably show up even more on cygwin to help expose places where
reducing the number of forks makes sense).

-- 
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]