Show More
@@ -2089,6 +2089,8 b' def debugrevlog(ui, repo, file_=None, **' | |||||
2089 | nummerges = 0 |
|
2089 | nummerges = 0 | |
2090 |
|
2090 | |||
2091 | ### tracks ways the "delta" are build |
|
2091 | ### tracks ways the "delta" are build | |
|
2092 | # nodelta | |||
|
2093 | numempty = 0 | |||
2092 | # full file content |
|
2094 | # full file content | |
2093 | numfull = 0 |
|
2095 | numfull = 0 | |
2094 | # delta against previous revision |
|
2096 | # delta against previous revision | |
@@ -2135,6 +2137,9 b' def debugrevlog(ui, repo, file_=None, **' | |||||
2135 | chainlengths.append(0) |
|
2137 | chainlengths.append(0) | |
2136 | chainbases.append(r.start(rev)) |
|
2138 | chainbases.append(r.start(rev)) | |
2137 | chainspans.append(size) |
|
2139 | chainspans.append(size) | |
|
2140 | if size == 0: | |||
|
2141 | numempty += 1 | |||
|
2142 | else: | |||
2138 | numfull += 1 |
|
2143 | numfull += 1 | |
2139 | addsize(size, fullsize) |
|
2144 | addsize(size, fullsize) | |
2140 | else: |
|
2145 | else: | |
@@ -2143,6 +2148,9 b' def debugrevlog(ui, repo, file_=None, **' | |||||
2143 | revaddr = r.start(rev) |
|
2148 | revaddr = r.start(rev) | |
2144 | chainbases.append(baseaddr) |
|
2149 | chainbases.append(baseaddr) | |
2145 | chainspans.append((revaddr - baseaddr) + size) |
|
2150 | chainspans.append((revaddr - baseaddr) + size) | |
|
2151 | if size == 0: | |||
|
2152 | numempty += 1 | |||
|
2153 | else: | |||
2146 | addsize(size, deltasize) |
|
2154 | addsize(size, deltasize) | |
2147 | if delta == rev - 1: |
|
2155 | if delta == rev - 1: | |
2148 | numprev += 1 |
|
2156 | numprev += 1 | |
@@ -2176,15 +2184,15 b' def debugrevlog(ui, repo, file_=None, **' | |||||
2176 | if size[0] is None: |
|
2184 | if size[0] is None: | |
2177 | size[0] = 0 |
|
2185 | size[0] = 0 | |
2178 |
|
2186 | |||
2179 | numdeltas = numrevs - numfull |
|
2187 | numdeltas = numrevs - numfull - numempty | |
2180 | numoprev = numprev - nump1prev - nump2prev |
|
2188 | numoprev = numprev - nump1prev - nump2prev | |
2181 | totalrawsize = datasize[2] |
|
2189 | totalrawsize = datasize[2] | |
2182 | datasize[2] /= numrevs |
|
2190 | datasize[2] /= numrevs | |
2183 | fulltotal = fullsize[2] |
|
2191 | fulltotal = fullsize[2] | |
2184 | fullsize[2] /= numfull |
|
2192 | fullsize[2] /= numfull | |
2185 | deltatotal = deltasize[2] |
|
2193 | deltatotal = deltasize[2] | |
2186 |
if num |
|
2194 | if numdeltas > 0: | |
2187 |
deltasize[2] /= num |
|
2195 | deltasize[2] /= numdeltas | |
2188 | totalsize = fulltotal + deltatotal |
|
2196 | totalsize = fulltotal + deltatotal | |
2189 | avgchainlen = sum(chainlengths) / numrevs |
|
2197 | avgchainlen = sum(chainlengths) / numrevs | |
2190 | maxchainlen = max(chainlengths) |
|
2198 | maxchainlen = max(chainlengths) | |
@@ -2217,6 +2225,7 b' def debugrevlog(ui, repo, file_=None, **' | |||||
2217 | ui.write((' merges : ') + fmt % pcfmt(nummerges, numrevs)) |
|
2225 | ui.write((' merges : ') + fmt % pcfmt(nummerges, numrevs)) | |
2218 | ui.write((' normal : ') + fmt % pcfmt(numrevs - nummerges, numrevs)) |
|
2226 | ui.write((' normal : ') + fmt % pcfmt(numrevs - nummerges, numrevs)) | |
2219 | ui.write(('revisions : ') + fmt2 % numrevs) |
|
2227 | ui.write(('revisions : ') + fmt2 % numrevs) | |
|
2228 | ui.write((' empty : ') + fmt % pcfmt(numempty, numrevs)) | |||
2220 | ui.write((' full : ') + fmt % pcfmt(numfull, numrevs)) |
|
2229 | ui.write((' full : ') + fmt % pcfmt(numfull, numrevs)) | |
2221 | ui.write((' deltas : ') + fmt % pcfmt(numdeltas, numrevs)) |
|
2230 | ui.write((' deltas : ') + fmt % pcfmt(numdeltas, numrevs)) | |
2222 | ui.write(('revision size : ') + fmt2 % totalsize) |
|
2231 | ui.write(('revision size : ') + fmt2 % totalsize) |
@@ -23,7 +23,8 b'' | |||||
23 | merges : 0 ( 0.00%) |
|
23 | merges : 0 ( 0.00%) | |
24 | normal : 3 (100.00%) |
|
24 | normal : 3 (100.00%) | |
25 | revisions : 3 |
|
25 | revisions : 3 | |
26 |
|
|
26 | empty : 1 (33.33%) | |
|
27 | full : 2 (66.67%) | |||
27 | deltas : 0 ( 0.00%) |
|
28 | deltas : 0 ( 0.00%) | |
28 | revision size : 88 |
|
29 | revision size : 88 | |
29 | full : 88 (100.00%) |
|
30 | full : 88 (100.00%) | |
@@ -42,7 +43,7 b'' | |||||
42 | compression ratio : 0 |
|
43 | compression ratio : 0 | |
43 |
|
44 | |||
44 | uncompressed data size (min/max/avg) : 0 / 43 / 28 |
|
45 | uncompressed data size (min/max/avg) : 0 / 43 / 28 | |
45 |
full revision size (min/max/avg) : |
|
46 | full revision size (min/max/avg) : 44 / 44 / 44 | |
46 | delta size (min/max/avg) : 0 / 0 / 0 |
|
47 | delta size (min/max/avg) : 0 / 0 / 0 | |
47 | #endif |
|
48 | #endif | |
48 |
|
49 |
General Comments 0
You need to be logged in to leave comments.
Login now