perf: add a perfbookmarks command

A new command dedicated to benchmark of bookmark initialization.
This commit is contained in:
Pierre-Yves David 2017-06-07 18:22:11 +01:00
parent 43a12c3e5f
commit 78ab1d5356
2 changed files with 13 additions and 0 deletions

View File

@ -467,6 +467,16 @@ def perfancestorset(ui, repo, revset, **opts):
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')])

View File

@ -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