Show More
@@ -308,10 +308,13 b' def perfstartup(ui, repo, **opts):' | |||||
308 | @command('perfparents', formatteropts) |
|
308 | @command('perfparents', formatteropts) | |
309 | def perfparents(ui, repo, **opts): |
|
309 | def perfparents(ui, repo, **opts): | |
310 | timer, fm = gettimer(ui, opts) |
|
310 | timer, fm = gettimer(ui, opts) | |
311 | if len(repo.changelog) < 1000: |
|
311 | # control the number of commits perfparents iterates over | |
312 | raise error.Abort("repo needs 1000 commits for this test") |
|
312 | # experimental config: perf.parentscount | |
|
313 | count = ui.configint("perf", "parentscount", 1000) | |||
|
314 | if len(repo.changelog) < count: | |||
|
315 | raise error.Abort("repo needs %d commits for this test" % count) | |||
313 | repo = repo.unfiltered() |
|
316 | repo = repo.unfiltered() | |
314 |
nl = [repo.changelog.node(i) for i in xrange( |
|
317 | nl = [repo.changelog.node(i) for i in xrange(count)] | |
315 | def d(): |
|
318 | def d(): | |
316 | for n in nl: |
|
319 | for n in nl: | |
317 | repo.changelog.parents(n) |
|
320 | repo.changelog.parents(n) |
General Comments 0
You need to be logged in to leave comments.
Login now