# HG changeset patch # User Siddharth Agarwal # Date 2013-04-02 06:09:36 # Node ID a2d4ab4f575d98ef675be7f1f1f34359c58d1e1e # Parent e8b4b139a5451bfc72b24a82f37e19a198f167ee perf: add a command to test addremove performance Upcoming patches will improve addremove performance. This command will be used to demonstrate that improvement. diff --git a/contrib/perf.py b/contrib/perf.py --- a/contrib/perf.py +++ b/contrib/perf.py @@ -54,6 +54,15 @@ def perfstatus(ui, repo, **opts): # 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'):