682 chainratio=chainratio, lindist=lineardist, |
682 chainratio=chainratio, lindist=lineardist, |
683 extradist=extradist, extraratio=extraratio) |
683 extradist=extradist, extraratio=extraratio) |
684 if withsparseread: |
684 if withsparseread: |
685 readsize = 0 |
685 readsize = 0 |
686 largestblock = 0 |
686 largestblock = 0 |
|
687 srchunks = 0 |
|
688 |
687 for revschunk in revlog._slicechunk(r, chain): |
689 for revschunk in revlog._slicechunk(r, chain): |
|
690 srchunks += 1 |
688 blkend = start(revschunk[-1]) + length(revschunk[-1]) |
691 blkend = start(revschunk[-1]) + length(revschunk[-1]) |
689 blksize = blkend - start(revschunk[0]) |
692 blksize = blkend - start(revschunk[0]) |
690 |
693 |
691 readsize += blksize |
694 readsize += blksize |
692 if largestblock < blksize: |
695 if largestblock < blksize: |
693 largestblock = blksize |
696 largestblock = blksize |
694 |
697 |
695 readdensity = float(chainsize) / float(readsize) |
698 readdensity = float(chainsize) / float(readsize) |
696 |
|
697 if util.safehasattr(revlog, '_slicechunk'): |
|
698 revchunks = tuple(revlog._slicechunk(r, chain)) |
|
699 else: |
|
700 revchunks = (chain,) |
|
701 srchunks = len(revchunks) |
|
702 |
699 |
703 fm.write('readsize largestblock readdensity srchunks', |
700 fm.write('readsize largestblock readdensity srchunks', |
704 ' %10d %10d %9.5f %8d', |
701 ' %10d %10d %9.5f %8d', |
705 readsize, largestblock, readdensity, srchunks, |
702 readsize, largestblock, readdensity, srchunks, |
706 readsize=readsize, largestblock=largestblock, |
703 readsize=readsize, largestblock=largestblock, |