* [RFC] Reporting index properties
@ 2017-10-05 23:39 Alex Vandiver
2017-10-06 0:43 ` Junio C Hamano
2017-10-06 3:13 ` Jonathan Nieder
0 siblings, 2 replies; 7+ messages in thread
From: Alex Vandiver @ 2017-10-05 23:39 UTC (permalink / raw)
To: git
Heya,
As part of gathering some automated performance statistics of git, it
would be useful to be able to extract some vital properties of the
index. While `git update-index` has ways to _set_ the index version,
and enable/disable various extensions, AFAICT there is no method by
which one can ask for reporting about the current state of them --
short of re-implementing all of the index-parsing logic external to
Git, which is not terribly appealing.
I hesitate to propose adding a flag to `git update-index` which reads
but does no updating, as that seems to make a misnomer of the
command. But this also doesn't seem worthy of a new top-level command.
Do folks have feelings about surfacing this information, and where such
logic should live?
- Alex
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RFC] Reporting index properties
2017-10-05 23:39 [RFC] Reporting index properties Alex Vandiver
@ 2017-10-06 0:43 ` Junio C Hamano
2017-10-06 0:47 ` Alex Vandiver
2017-10-06 3:13 ` Jonathan Nieder
1 sibling, 1 reply; 7+ messages in thread
From: Junio C Hamano @ 2017-10-06 0:43 UTC (permalink / raw)
To: Alex Vandiver; +Cc: git
Alex Vandiver <alexmv@dropbox.com> writes:
> Do folks have feelings about surfacing this information, and where such
> logic should live?
Probably one of the t/helper/test-dump-*.c programs, if we already
do not have one.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RFC] Reporting index properties
2017-10-06 0:43 ` Junio C Hamano
@ 2017-10-06 0:47 ` Alex Vandiver
2017-10-06 2:39 ` Junio C Hamano
0 siblings, 1 reply; 7+ messages in thread
From: Alex Vandiver @ 2017-10-06 0:47 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
On Fri, 6 Oct 2017, Junio C Hamano wrote:
> > Do folks have feelings about surfacing this information, and where such
> > logic should live?
>
> Probably one of the t/helper/test-dump-*.c programs, if we already
> do not have one.
The goal would be to be able to extract this information from
repositories, with a standard git install. That directory only
contains developer tools, which aren't part of the install, no?
- Alex
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RFC] Reporting index properties
2017-10-06 0:47 ` Alex Vandiver
@ 2017-10-06 2:39 ` Junio C Hamano
2017-10-06 19:26 ` Alex Vandiver
0 siblings, 1 reply; 7+ messages in thread
From: Junio C Hamano @ 2017-10-06 2:39 UTC (permalink / raw)
To: Alex Vandiver; +Cc: git
Alex Vandiver <alexmv@dropbox.com> writes:
> On Fri, 6 Oct 2017, Junio C Hamano wrote:
>> > Do folks have feelings about surfacing this information, and where such
>> > logic should live?
>>
>> Probably one of the t/helper/test-dump-*.c programs, if we already
>> do not have one.
>
> The goal would be to be able to extract this information from
> repositories, with a standard git install. That directory only
> contains developer tools, which aren't part of the install, no?
Yes, and I am saying that such logic should not live in standard
install outside developer tools ;-)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RFC] Reporting index properties
2017-10-05 23:39 [RFC] Reporting index properties Alex Vandiver
2017-10-06 0:43 ` Junio C Hamano
@ 2017-10-06 3:13 ` Jonathan Nieder
2017-10-06 4:02 ` Junio C Hamano
1 sibling, 1 reply; 7+ messages in thread
From: Jonathan Nieder @ 2017-10-06 3:13 UTC (permalink / raw)
To: Alex Vandiver; +Cc: git
Alex Vandiver wrote:
> As part of gathering some automated performance statistics of git, it
> would be useful to be able to extract some vital properties of the
> index. While `git update-index` has ways to _set_ the index version,
> and enable/disable various extensions, AFAICT there is no method by
> which one can ask for reporting about the current state of them --
> short of re-implementing all of the index-parsing logic external to
> Git, which is not terribly appealing.
Aside: git-update-index(1) says
Version 4 is relatively young (first released in 1.8.0 in
October 2012).
My first reaction is to wonder if it is time to introduce a config
option to use index format version 4 by default, since after 5 years
it is not relatively young any more.
My second reaction is to notice that the index.version configuration
already exists. Probably git-update-index(1) ought to point to it.
JGit still doesn't support index format 4, so 4 is still not a good
default for `index.version` for a user that hasn't explicitly
configured it, but the moment JGit gains that support I think it will
be. :)
> I hesitate to propose adding a flag to `git update-index` which reads
> but does no updating, as that seems to make a misnomer of the
> command. But this also doesn't seem worthy of a new top-level command.
The existing scripting command that inspects the index is
"git ls-files".
It doesn't go into this kind of low-level detail about the index
format, though. In the same spirit, I don't think we have an existing
command in this spirit for analyzing packfiles, either.
So I agree with Junio that this would be a good debugging aid to put
in t/helper/ for now, and then once we've had experience with it we'd
end up in a better position to come up with a stable, public-facing
interface, if one is needed.
Thanks and hope that helps,
Jonathan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RFC] Reporting index properties
2017-10-06 3:13 ` Jonathan Nieder
@ 2017-10-06 4:02 ` Junio C Hamano
0 siblings, 0 replies; 7+ messages in thread
From: Junio C Hamano @ 2017-10-06 4:02 UTC (permalink / raw)
To: Jonathan Nieder; +Cc: Alex Vandiver, git
Jonathan Nieder <jrnieder@gmail.com> writes:
> Aside: git-update-index(1) says
>
> Version 4 is relatively young (first released in 1.8.0 in
> October 2012).
>
> My first reaction is to wonder if it is time to introduce a config
> option to use index format version 4 by default, since after 5 years
> it is not relatively young any more.
>
> My second reaction is to notice that the index.version configuration
> already exists. Probably git-update-index(1) ought to point to it.
Both good points.
> JGit still doesn't support index format 4, so 4 is still not a good
> default for `index.version` for a user that hasn't explicitly
> configured it, but the moment JGit gains that support I think it will
> be. :)
After reading ce_write_entry(), I tend to agree. v4 is the first
one that loses the alignment padding, which made sense back when we
mmap(2)ed the index file and read from it directly without the
ondisk-vs-incore conversion, but that stopped to be the case several
years ago.
I find it interesting to find that the recently proposed design for
reftable uses the same "common prefix compression from the previous
name" trick, even though index v4 does not have any resync point
like reftable does.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RFC] Reporting index properties
2017-10-06 2:39 ` Junio C Hamano
@ 2017-10-06 19:26 ` Alex Vandiver
0 siblings, 0 replies; 7+ messages in thread
From: Alex Vandiver @ 2017-10-06 19:26 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
On Fri, 6 Oct 2017, Junio C Hamano wrote:
> Yes, and I am saying that such logic should not live in standard
> install outside developer tools ;-)
Fair enough. It seems a little odd to me that git provides logic for
_altering_ those bits, but not to report on the state that can be so
altered.
- Alex
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-10-06 19:26 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-05 23:39 [RFC] Reporting index properties Alex Vandiver
2017-10-06 0:43 ` Junio C Hamano
2017-10-06 0:47 ` Alex Vandiver
2017-10-06 2:39 ` Junio C Hamano
2017-10-06 19:26 ` Alex Vandiver
2017-10-06 3:13 ` Jonathan Nieder
2017-10-06 4:02 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).