##// END OF EJS Templates
perf: use standard arguments for perfrevlog...
Gregory Szorc -
r27492:ac549d7f default
parent child Browse files
Show More
@@ -474,16 +474,20 b' def perfdiffwd(ui, repo, **opts):'
474 timer(d, title)
474 timer(d, title)
475 fm.end()
475 fm.end()
476
476
477 @command('perfrevlog',
477 @command('perfrevlog', revlogopts + formatteropts +
478 [('d', 'dist', 100, 'distance between the revisions')] + formatteropts,
478 [('d', 'dist', 100, 'distance between the revisions')],
479 "[INDEXFILE]")
479 '-c|-m|FILE')
480 def perfrevlog(ui, repo, file_, **opts):
480 def perfrevlog(ui, repo, file_=None, **opts):
481 """Benchmark reading a series of revisions from a revlog.
482
483 By default, we read every ``-d/--dist`` revision from 0 to tip of
484 the specified revlog.
485 """
481 timer, fm = gettimer(ui, opts)
486 timer, fm = gettimer(ui, opts)
482 from mercurial import revlog
483 dist = opts['dist']
487 dist = opts['dist']
484 _len = getlen(ui)
488 _len = getlen(ui)
485 def d():
489 def d():
486 r = revlog.revlog(lambda fn: open(fn, 'rb'), file_)
490 r = cmdutil.openrevlog(repo, 'perfrevlog', file_, opts)
487 for x in xrange(0, _len(r), dist):
491 for x in xrange(0, _len(r), dist):
488 r.revision(r.node(x))
492 r.revision(r.node(x))
489
493
@@ -90,7 +90,7 b' perfstatus'
90 perfpathcopies
90 perfpathcopies
91 (no help text available)
91 (no help text available)
92 perfrawfiles (no help text available)
92 perfrawfiles (no help text available)
93 perfrevlog (no help text available)
93 perfrevlog Benchmark reading a series of revisions from a revlog.
94 perfrevlogrevision
94 perfrevlogrevision
95 Benchmark obtaining a revlog revision.
95 Benchmark obtaining a revlog revision.
96 perfrevrange (no help text available)
96 perfrevrange (no help text available)
General Comments 0
You need to be logged in to leave comments. Login now