Show More
@@ -2095,6 +2095,8 b' def debugrevlog(ui, repo, file_=None, **' | |||||
2095 | numemptydelta = 0 |
|
2095 | numemptydelta = 0 | |
2096 | # full file content |
|
2096 | # full file content | |
2097 | numfull = 0 |
|
2097 | numfull = 0 | |
|
2098 | # intermediate snapshot against a prior snapshot | |||
|
2099 | numsemi = 0 | |||
2098 | # delta against previous revision |
|
2100 | # delta against previous revision | |
2099 | numprev = 0 |
|
2101 | numprev = 0 | |
2100 | # delta against first or second parent (not prev) |
|
2102 | # delta against first or second parent (not prev) | |
@@ -2115,6 +2117,7 b' def debugrevlog(ui, repo, file_=None, **' | |||||
2115 | # data about each revision |
|
2117 | # data about each revision | |
2116 | datasize = [None, 0, 0] |
|
2118 | datasize = [None, 0, 0] | |
2117 | fullsize = [None, 0, 0] |
|
2119 | fullsize = [None, 0, 0] | |
|
2120 | semisize = [None, 0, 0] | |||
2118 | deltasize = [None, 0, 0] |
|
2121 | deltasize = [None, 0, 0] | |
2119 | chunktypecounts = {} |
|
2122 | chunktypecounts = {} | |
2120 | chunktypesizes = {} |
|
2123 | chunktypesizes = {} | |
@@ -2154,6 +2157,9 b' def debugrevlog(ui, repo, file_=None, **' | |||||
2154 | if size == 0: |
|
2157 | if size == 0: | |
2155 | numempty += 1 |
|
2158 | numempty += 1 | |
2156 | numemptydelta += 1 |
|
2159 | numemptydelta += 1 | |
|
2160 | elif r.issnapshot(rev): | |||
|
2161 | addsize(size, semisize) | |||
|
2162 | numsemi += 1 | |||
2157 | else: |
|
2163 | else: | |
2158 | addsize(size, deltasize) |
|
2164 | addsize(size, deltasize) | |
2159 | if delta == rev - 1: |
|
2165 | if delta == rev - 1: | |
@@ -2187,20 +2193,23 b' def debugrevlog(ui, repo, file_=None, **' | |||||
2187 | chunktypesizes[chunktype] += size |
|
2193 | chunktypesizes[chunktype] += size | |
2188 |
|
2194 | |||
2189 | # Adjust size min value for empty cases |
|
2195 | # Adjust size min value for empty cases | |
2190 | for size in (datasize, fullsize, deltasize): |
|
2196 | for size in (datasize, fullsize, semisize, deltasize): | |
2191 | if size[0] is None: |
|
2197 | if size[0] is None: | |
2192 | size[0] = 0 |
|
2198 | size[0] = 0 | |
2193 |
|
2199 | |||
2194 | numdeltas = numrevs - numfull - numempty |
|
2200 | numdeltas = numrevs - numfull - numempty - numsemi | |
2195 | numoprev = numprev - nump1prev - nump2prev |
|
2201 | numoprev = numprev - nump1prev - nump2prev | |
2196 | totalrawsize = datasize[2] |
|
2202 | totalrawsize = datasize[2] | |
2197 | datasize[2] /= numrevs |
|
2203 | datasize[2] /= numrevs | |
2198 | fulltotal = fullsize[2] |
|
2204 | fulltotal = fullsize[2] | |
2199 | fullsize[2] /= numfull |
|
2205 | fullsize[2] /= numfull | |
|
2206 | semitotal = semisize[2] | |||
|
2207 | if 0 < numsemi: | |||
|
2208 | semisize[2] /= numsemi | |||
2200 | deltatotal = deltasize[2] |
|
2209 | deltatotal = deltasize[2] | |
2201 | if numdeltas > 0: |
|
2210 | if numdeltas > 0: | |
2202 | deltasize[2] /= numdeltas |
|
2211 | deltasize[2] /= numdeltas | |
2203 | totalsize = fulltotal + deltatotal |
|
2212 | totalsize = fulltotal + semitotal + deltatotal | |
2204 | avgchainlen = sum(chainlengths) / numrevs |
|
2213 | avgchainlen = sum(chainlengths) / numrevs | |
2205 | maxchainlen = max(chainlengths) |
|
2214 | maxchainlen = max(chainlengths) | |
2206 | maxchainspan = max(chainspans) |
|
2215 | maxchainspan = max(chainspans) | |
@@ -2238,9 +2247,11 b' def debugrevlog(ui, repo, file_=None, **' | |||||
2238 | ui.write((' delta : ') |
|
2247 | ui.write((' delta : ') | |
2239 | + fmt % pcfmt(numemptydelta, numemptytext + numemptydelta)) |
|
2248 | + fmt % pcfmt(numemptydelta, numemptytext + numemptydelta)) | |
2240 | ui.write((' full : ') + fmt % pcfmt(numfull, numrevs)) |
|
2249 | ui.write((' full : ') + fmt % pcfmt(numfull, numrevs)) | |
|
2250 | ui.write((' inter : ') + fmt % pcfmt(numsemi, numrevs)) | |||
2241 | ui.write((' deltas : ') + fmt % pcfmt(numdeltas, numrevs)) |
|
2251 | ui.write((' deltas : ') + fmt % pcfmt(numdeltas, numrevs)) | |
2242 | ui.write(('revision size : ') + fmt2 % totalsize) |
|
2252 | ui.write(('revision size : ') + fmt2 % totalsize) | |
2243 | ui.write((' full : ') + fmt % pcfmt(fulltotal, totalsize)) |
|
2253 | ui.write((' full : ') + fmt % pcfmt(fulltotal, totalsize)) | |
|
2254 | ui.write((' inter : ') + fmt % pcfmt(semitotal, totalsize)) | |||
2244 | ui.write((' deltas : ') + fmt % pcfmt(deltatotal, totalsize)) |
|
2255 | ui.write((' deltas : ') + fmt % pcfmt(deltatotal, totalsize)) | |
2245 |
|
2256 | |||
2246 | def fmtchunktype(chunktype): |
|
2257 | def fmtchunktype(chunktype): |
@@ -27,9 +27,11 b'' | |||||
27 | text : 0 (100.00%) |
|
27 | text : 0 (100.00%) | |
28 | delta : 0 (100.00%) |
|
28 | delta : 0 (100.00%) | |
29 | full : 3 (100.00%) |
|
29 | full : 3 (100.00%) | |
|
30 | inter : 0 ( 0.00%) | |||
30 | deltas : 0 ( 0.00%) |
|
31 | deltas : 0 ( 0.00%) | |
31 | revision size : 191 |
|
32 | revision size : 191 | |
32 | full : 191 (100.00%) |
|
33 | full : 191 (100.00%) | |
|
34 | inter : 0 ( 0.00%) | |||
33 | deltas : 0 ( 0.00%) |
|
35 | deltas : 0 ( 0.00%) | |
34 |
|
36 | |||
35 | chunks : 3 |
|
37 | chunks : 3 | |
@@ -57,9 +59,11 b'' | |||||
57 | text : 1 (100.00%) |
|
59 | text : 1 (100.00%) | |
58 | delta : 0 ( 0.00%) |
|
60 | delta : 0 ( 0.00%) | |
59 | full : 2 (66.67%) |
|
61 | full : 2 (66.67%) | |
|
62 | inter : 0 ( 0.00%) | |||
60 | deltas : 0 ( 0.00%) |
|
63 | deltas : 0 ( 0.00%) | |
61 | revision size : 88 |
|
64 | revision size : 88 | |
62 | full : 88 (100.00%) |
|
65 | full : 88 (100.00%) | |
|
66 | inter : 0 ( 0.00%) | |||
63 | deltas : 0 ( 0.00%) |
|
67 | deltas : 0 ( 0.00%) | |
64 |
|
68 | |||
65 | chunks : 3 |
|
69 | chunks : 3 | |
@@ -89,9 +93,11 b'' | |||||
89 | text : 0 (100.00%) |
|
93 | text : 0 (100.00%) | |
90 | delta : 0 (100.00%) |
|
94 | delta : 0 (100.00%) | |
91 | full : 1 (100.00%) |
|
95 | full : 1 (100.00%) | |
|
96 | inter : 0 ( 0.00%) | |||
92 | deltas : 0 ( 0.00%) |
|
97 | deltas : 0 ( 0.00%) | |
93 | revision size : 3 |
|
98 | revision size : 3 | |
94 | full : 3 (100.00%) |
|
99 | full : 3 (100.00%) | |
|
100 | inter : 0 ( 0.00%) | |||
95 | deltas : 0 ( 0.00%) |
|
101 | deltas : 0 ( 0.00%) | |
96 |
|
102 | |||
97 | chunks : 1 |
|
103 | chunks : 1 |
General Comments 0
You need to be logged in to leave comments.
Login now