##// END OF EJS Templates
perf: make start revision configurable for perfrevlog...
Gregory Szorc -
r27493:14b09301 default
parent child Browse files
Show More
@@ -475,20 +475,23 def perfdiffwd(ui, repo, **opts):
475 475 fm.end()
476 476
477 477 @command('perfrevlog', revlogopts + formatteropts +
478 [('d', 'dist', 100, 'distance between the revisions')],
478 [('d', 'dist', 100, 'distance between the revisions'),
479 ('s', 'startrev', 0, 'revision to start reading at')],
479 480 '-c|-m|FILE')
480 def perfrevlog(ui, repo, file_=None, **opts):
481 def perfrevlog(ui, repo, file_=None, startrev=0, **opts):
481 482 """Benchmark reading a series of revisions from a revlog.
482 483
483 484 By default, we read every ``-d/--dist`` revision from 0 to tip of
484 485 the specified revlog.
486
487 The start revision can be defined via ``-s/--startrev``.
485 488 """
486 489 timer, fm = gettimer(ui, opts)
487 490 dist = opts['dist']
488 491 _len = getlen(ui)
489 492 def d():
490 493 r = cmdutil.openrevlog(repo, 'perfrevlog', file_, opts)
491 for x in xrange(0, _len(r), dist):
494 for x in xrange(startrev, _len(r), dist):
492 495 r.revision(r.node(x))
493 496
494 497 timer(d)
General Comments 0
You need to be logged in to leave comments. Login now