##// END OF EJS Templates
perf: support obtaining contexts from perfrevset...
Gregory Szorc -
r27072:e18a9cea default
parent child Browse files
Show More
@@ -463,9 +463,10 b' def perfrevlog(ui, repo, file_, **opts):'
463 463 fm.end()
464 464
465 465 @command('perfrevset',
466 [('C', 'clear', False, 'clear volatile cache between each call.')]
466 [('C', 'clear', False, 'clear volatile cache between each call.'),
467 ('', 'contexts', False, 'obtain changectx for each revision')]
467 468 + formatteropts, "REVSET")
468 def perfrevset(ui, repo, expr, clear=False, **opts):
469 def perfrevset(ui, repo, expr, clear=False, contexts=False, **opts):
469 470 """benchmark the execution time of a revset
470 471
471 472 Use the --clean option if need to evaluate the impact of build volatile
@@ -475,7 +476,10 b' def perfrevset(ui, repo, expr, clear=Fal'
475 476 def d():
476 477 if clear:
477 478 repo.invalidatevolatilesets()
478 for r in repo.revs(expr): pass
479 if contexts:
480 for ctx in repo.set(expr): pass
481 else:
482 for r in repo.revs(expr): pass
479 483 timer(d)
480 484 fm.end()
481 485
General Comments 0
You need to be logged in to leave comments. Login now