[Mageia-dev] Packaging for Mageia

Jerome Quelin jquelin at gmail.com
Fri Jan 21 18:48:56 CET 2011


On 11/01/21 18:17 +0100, Thierry Vignaud wrote:
> On 21 January 2011 16:15, Jerome Quelin <jquelin at gmail.com> wrote:
> > note to packagers: it's now very easy to throttle in an adaptive way
> > (thanks to pascal terjean). just add the following before submitting a
> > package:
> >
> >    sleep $( HEAD http://pkgsubmit.mageia.org/ | perl -nE '/X-BS-Throttle: (\d+)/ && print $1' )
> 
> WOW!
> 
> I'd use "HEAD http://pkgsubmit.mageia.org/ | fgrep X-BS-Throttle | cut
> -d: -f 2" instead
> (less I/O thanks to not loading perl?)

since i'm not loading any modules, i'm not sure.

demonstration:
$ strace cut 2>&1 | grep open|wc -l
11
$ strace fgrep 2>&1 | grep open|wc -l
12
$ strace perl -e42 2>&1 | grep open|wc -l
22

so, your solution opens 1 more file, and forks 1 more process:  i'd say perl wins.


but for such small workloads, i'd say it's even. especially since it's dwarfed
by the internet access! :-)

(aren't we nerds discussing such topics?)


> Too sad nobody did that back at mdv in the old days
> Hurra Pascal!

definitely. that's awesome: everybody is now treated the same way
provided we follow this rule...


jérôme 
-- 
jquelin at gmail.com


More information about the Mageia-dev mailing list