Show More
@@ -463,9 +463,10 b' def perfrevlog(ui, repo, file_, **opts):' | |||||
463 | fm.end() |
|
463 | fm.end() | |
464 |
|
464 | |||
465 | @command('perfrevset', |
|
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 | + formatteropts, "REVSET") |
|
468 | + formatteropts, "REVSET") | |
468 | def perfrevset(ui, repo, expr, clear=False, **opts): |
|
469 | def perfrevset(ui, repo, expr, clear=False, contexts=False, **opts): | |
469 | """benchmark the execution time of a revset |
|
470 | """benchmark the execution time of a revset | |
470 |
|
471 | |||
471 | Use the --clean option if need to evaluate the impact of build volatile |
|
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 | def d(): |
|
476 | def d(): | |
476 | if clear: |
|
477 | if clear: | |
477 | repo.invalidatevolatilesets() |
|
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 | timer(d) |
|
483 | timer(d) | |
480 | fm.end() |
|
484 | fm.end() | |
481 |
|
485 |
General Comments 0
You need to be logged in to leave comments.
Login now