Re: [PATCH] pretty: lazy-load commit data when expanding user-format

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

 



On Thu, Jan 28, 2021 at 11:36:23PM +0100, Ævar Arnfjörð Bjarmason wrote:

> > -for format in %H %h %T %t %P %p %h-%h-%h
> > +for format in %H %h %T %t %P %p %h-%h-%h %an-%ae-%s
> >  do
> >  	test_perf "log with $format" "
> >  		git log --format=\"$format\" >/dev/null
> 
> 
> While we're at it it would be nice to have a few more formats that have
> to do with the body in some way in those tests, and stess things like
> mailmap/trailers etc.
> 
>     %s
>     %b
>     %B
>     %N
>     %aN-%aE
>     %cn-%ce
>     %cN-%cE
>     %d
>     %D
>     %(trailers)
> 
> Just paging over the git-log manpage, that seems to stress most of the
> codepaths, i.e. subject/body, but also things like notes, .mailmap, ref
> names, and body parsing (trailers).

I'd prefer not to do so in this patch, since most of those aren't
providing any new data.

I don't mind _too_ much if you'd like to do so on top for general
regression-testing, but I'm generally a bit hesitant to throw a lot of
stuff into the perf suite without a sense of what it's measuring, just
because it already takes forever to run. So for example, is the
difference between %aN-%aE and %cN-%cE worth spending 21 seconds of CPU
(3 times the 7 seconds it takes to run on the kernel)?

One test to check mailmap performance, or one for trailers, seems like
it might be more directed. I think the existing test is likewise a bit
wasteful in checking %h _and_ %t _and_ %p), though at least it is now
much faster after my patch. ;)

(In the regular test suite, we of course should be covering all these
for correctness already, and I think we do).

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux