New command: hg debugrevlog
Benoit Boissinot
bboissin at gmail.com
Thu May 12 11:53:36 CDT 2011
On Thu, May 12, 2011 at 6:44 PM, Sune Foldager <cryo at cyanite.org> wrote:
> I added a debugrevlog command which shows some data about a revlog (or
> filelog),
> and some statistics. My original use case was to debug generaldelta
> performance.
>
> The command shows extensive statistics about the deltas if it's a
> generaldelta
> revlog. Example output:
>
> cryo at serene:~/test$ hg debugrevlog .hg/store/00manifest.i
> format : 1
> flags : generaldelta
> revisions : 10194
> merges : 3374
> chains : 16
>
> data size (min/max/avg) : 392850 / 611167 / 491670
> compressed snapshot size (min/max/avg) : 113171 / 151388 / 135161
> compressed delta size (min/max/avg) : 0 / 112440 / 1300
>
> deltas against prev : 3204
> ..where prev = p1 : 3073
> ..where prev = p2 : 33
> ..other : 98
> deltas against p1 : 6950
> deltas against p2 : 24
> deltas against other : 0
>
> The command can also be started with a filename directly, similar to
> debugindex and debugdata:
>
> cryo at serene:~/crew$ hg debugrevlog mercurial/lock.py
> format : 1
> flags : inline
> revisions : 32
> merges : 2
> chains : 1
>
> data size (min/max/avg) : 1052 / 4373 / 2830
> compressed snapshot size (min/max/avg) : 454 / 454 / 454
> compressed delta size (min/max/avg) : 0 / 767 / 130
>
> Notice how this, non-generaldelta revlog displays less information.
You could still show something like:
deltas against prev : 3204
..where prev = p1 : 3073
..where prev = p2 : 33
..other : 98
It would make sense I think. (and we could compare the result before
and after shrink)
Might also be nice to have %age instead of absolute numbers, easier to
interpret.
cheers,
Benoit
More information about the Mercurial-devel
mailing list