Git development
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Junio C Hamano <gitster@pobox.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: Add "--dirstat" for some directory statistics
Date: Mon, 11 Feb 2008 13:17:43 -0800 (PST)	[thread overview]
Message-ID: <alpine.LFD.1.00.0802111302470.2920@woody.linux-foundation.org> (raw)
In-Reply-To: <alpine.LFD.1.00.0802111230200.2920@woody.linux-foundation.org>


On Mon, 11 Feb 2008, Linus Torvalds wrote:
> 
> The reporting limit has been arbitrarily set at 3%, which seems to be a 
> pretty good cut-off, but I made it an option variable in case anybody 
> would ever want to make it a dynamic cutoff.

Side note: that 3% isn't actually _too_ arbitrary.  I did actually test
things a bit. 

So it seems to be a good limit that ensures that you'll basically never
see more than one page worth of reporting (if you did, it wouldn't be a
very good summary).  So in theory, if something is _just_ right and
really balanced out across a wide variety of directories, you can get 33
lines of output, but in practice it's unusual to get more than 10-15
entries. 

In the kernel, the most spread out commit I've found so far is 18 entries:

    CONFIG_HIGHPTE vs. sub-page page tables.

   3% arch/powerpc/mm/
   5% arch/sparc/mm/
   6% arch/
   5% include/asm-alpha/
   3% include/asm-avr32/
   3% include/asm-cris/
   4% include/asm-ia64/
   6% include/asm-m68k/
   3% include/asm-mips/
   7% include/asm-powerpc/
   6% include/asm-sh/
   4% include/asm-sparc64/
   3% include/asm-um/
   6% include/asm-x86/
   3% include/asm-xtensa/
   3% include/linux/
  14% include/
   7% mm/
 53 files changed, 326 insertions(+), 132 deletions(-)

but it's not like I looked through all of them (and I'm sure you can get
more if you select just the right commit range to generate the diff).

The point being that a 4-percent cut-off would likely be so big that it
would have hidden the details in the above example.

A 2% cut-off is worth trying, though.  It does get a bit more detail,
and the likelihood of it actually causing a 50-line report is probably
vanishingly small, so it might be worth playing around with.  The above
18-entry example grows to 23 entries with a 2% limit, which is very
borderline on a traditional 80x24 terminal, but still just barely "one
page" which was my personal rule to aim for. 

			Linus

  reply	other threads:[~2008-02-11 21:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-11 20:59 Add "--dirstat" for some directory statistics Linus Torvalds
2008-02-11 21:17 ` Linus Torvalds [this message]
2008-02-11 21:24 ` Johannes Schindelin
2008-02-11 21:41   ` Linus Torvalds
2008-02-11 22:06   ` Linus Torvalds
2008-02-11 22:25     ` Linus Torvalds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.1.00.0802111302470.2920@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox