diff --git a/contrib/perf.py b/contrib/perf.py --- a/contrib/perf.py +++ b/contrib/perf.py @@ -467,6 +467,16 @@ def perfancestorset(ui, repo, revset, ** timer(d) fm.end() +@command('perfbookmarks', formatteropts) +def perfbookmarks(ui, repo, **opts): + """benchmark parsing bookmarks from disk to memory""" + timer, fm = gettimer(ui, opts) + def d(): + clearfilecache(repo, '_bookmarks') + repo._bookmarks + timer(d) + fm.end() + @command('perfchangegroupchangelog', formatteropts + [('', 'version', '02', 'changegroup version'), ('r', 'rev', '', 'revisions to add to changegroup')]) diff --git a/tests/test-contrib-perf.t b/tests/test-contrib-perf.t --- a/tests/test-contrib-perf.t +++ b/tests/test-contrib-perf.t @@ -51,6 +51,8 @@ perfstatus (no help text available) perfannotate (no help text available) perfbdiff benchmark a bdiff between revisions + perfbookmarks + benchmark parsing bookmarks from disk to memory perfbranchmap benchmark the update of a branchmap perfcca (no help text available) @@ -122,6 +124,7 @@ perfstatus $ hg perfannotate a $ hg perfbdiff -c 1 $ hg perfbdiff --alldata 1 + $ hg perfbookmarks $ hg perfbranchmap $ hg perfcca $ hg perfchangegroupchangelog