##// END OF EJS Templates
debugcommands: add a debugindexstats command...
Martin von Zweigbergk -
r40319:d71e0ba3 default
parent child Browse files
Show More
@@ -1164,6 +1164,13 b' def debugindexdot(ui, repo, file_=None, '
1164 ui.write("\t%d -> %d\n" % (r.rev(pp[1]), i))
1164 ui.write("\t%d -> %d\n" % (r.rev(pp[1]), i))
1165 ui.write("}\n")
1165 ui.write("}\n")
1166
1166
1167 @command('debugindexstats', [])
1168 def debugindexstats(ui, repo):
1169 """show stats related to the changelog index"""
1170 repo.changelog.shortest(nullid, 1)
1171 for k, v in sorted(repo.changelog.index.stats().items()):
1172 ui.write('%s: %s\n' % (k, v))
1173
1167 @command('debuginstall', [] + cmdutil.formatteropts, '', norepo=True)
1174 @command('debuginstall', [] + cmdutil.formatteropts, '', norepo=True)
1168 def debuginstall(ui, **opts):
1175 def debuginstall(ui, **opts):
1169 '''test Mercurial installation
1176 '''test Mercurial installation
@@ -94,6 +94,7 b' Show debug commands if there are no othe'
94 debugignore
94 debugignore
95 debugindex
95 debugindex
96 debugindexdot
96 debugindexdot
97 debugindexstats
97 debuginstall
98 debuginstall
98 debugknown
99 debugknown
99 debuglabelcomplete
100 debuglabelcomplete
@@ -282,6 +283,7 b' Show all commands + options'
282 debugignore:
283 debugignore:
283 debugindex: changelog, manifest, dir, template
284 debugindex: changelog, manifest, dir, template
284 debugindexdot: changelog, manifest, dir
285 debugindexdot: changelog, manifest, dir
286 debugindexstats:
285 debuginstall: template
287 debuginstall: template
286 debugknown:
288 debugknown:
287 debuglabelcomplete:
289 debuglabelcomplete:
@@ -177,6 +177,16 b' Test debugindex, with and without the --'
177 debugdelta chain basic output
177 debugdelta chain basic output
178
178
179 #if reporevlogstore
179 #if reporevlogstore
180 $ hg debugindexstats
181 node trie capacity: 4
182 node trie count: 2
183 node trie depth: 1
184 node trie last rev scanned: -1
185 node trie lookups: 4
186 node trie misses: 1
187 node trie splits: 1
188 revs in memory: 3
189
180 $ hg debugdeltachain -m
190 $ hg debugdeltachain -m
181 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio
191 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio
182 0 1 1 -1 base 44 43 44 1.02326 44 0 0.00000
192 0 1 1 -1 base 44 43 44 1.02326 44 0 0.00000
@@ -942,6 +942,8 b' Test list of internal help commands'
942 debugindex dump index data for a storage primitive
942 debugindex dump index data for a storage primitive
943 debugindexdot
943 debugindexdot
944 dump an index DAG as a graphviz dot file
944 dump an index DAG as a graphviz dot file
945 debugindexstats
946 show stats related to the changelog index
945 debuginstall test Mercurial installation
947 debuginstall test Mercurial installation
946 debugknown test whether node ids are known to a repo
948 debugknown test whether node ids are known to a repo
947 debuglocks show or modify state of locks
949 debuglocks show or modify state of locks
General Comments 0
You need to be logged in to leave comments. Login now