##// END OF EJS Templates
contrib/perf: perfparents handle tiny repos...
timeless -
r27099:e94bfebb default
parent child Browse files
Show More
@@ -2,7 +2,7 b''
2 '''helper extension to measure performance'''
2 '''helper extension to measure performance'''
3
3
4 from mercurial import cmdutil, scmutil, util, commands, obsolete
4 from mercurial import cmdutil, scmutil, util, commands, obsolete
5 from mercurial import repoview, branchmap, merge, copies
5 from mercurial import repoview, branchmap, merge, copies, error
6 import time, os, sys
6 import time, os, sys
7 import functools
7 import functools
8
8
@@ -300,6 +300,8 b' def perfstartup(ui, repo, **opts):'
300 @command('perfparents', formatteropts)
300 @command('perfparents', formatteropts)
301 def perfparents(ui, repo, **opts):
301 def perfparents(ui, repo, **opts):
302 timer, fm = gettimer(ui, opts)
302 timer, fm = gettimer(ui, opts)
303 if len(repo.changelog) < 1000:
304 raise error.Abort("repo needs 1000 commits for this test")
303 nl = [repo.changelog.node(i) for i in xrange(1000)]
305 nl = [repo.changelog.node(i) for i in xrange(1000)]
304 def d():
306 def d():
305 for n in nl:
307 for n in nl:
General Comments 0
You need to be logged in to leave comments. Login now