Mercurial > hg-stable
changeset 18871:a2d4ab4f575d
perf: add a command to test addremove performance
Upcoming patches will improve addremove performance. This command will be used
to demonstrate that improvement.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Mon, 01 Apr 2013 23:09:36 -0700 |
parents | e8b4b139a545 |
children | 16b34391819d |
files | contrib/perf.py |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/perf.py Wed Apr 03 11:35:27 2013 -0700 +++ b/contrib/perf.py Mon Apr 01 23:09:36 2013 -0700 @@ -54,6 +54,15 @@ # False)))) timer(lambda: sum(map(len, repo.status(**opts)))) +@command('perfaddremove') +def perfaddremove(ui, repo): + try: + oldquiet = repo.ui.quiet + repo.ui.quiet = True + timer(lambda: scmutil.addremove(repo, dry_run=True)) + finally: + repo.ui.quiet = oldquiet + def clearcaches(cl): # behave somewhat consistently across internal API changes if util.safehasattr(cl, 'clearcaches'):