This revision was automatically updated to reflect the committed changes. Closed by commit rHGf16c3efe35e3: perf: time loading branchmap caches (authored by mjpieters, committed by ).
REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4280?vs=10352&id=10373 REVISION DETAIL https://phab.mercurial-scm.org/D4280 AFFECTED FILES contrib/perf.py CHANGE DETAILS diff --git a/contrib/perf.py b/contrib/perf.py --- a/contrib/perf.py +++ b/contrib/perf.py @@ -1751,6 +1751,29 @@ branchcachewrite.restore() fm.end() +@command('perfbranchmapload', [ + ('f', 'filter', '', 'Specify repoview filter'), + ('', 'list', False, 'List brachmap filter caches'), + ] + formatteropts) +def perfbranchmapread(ui, repo, filter='', list=False, **opts): + """benchmark reading the branchmap""" + if list: + for name, kind, st in repo.cachevfs.readdir(stat=True): + if name.startswith('branch2'): + filtername = name.partition('-')[2] or 'unfiltered' + ui.status('%s - %s\n' % (filtername, util.bytecount(st.st_size))) + return + if filter: + repo = repoview.repoview(repo, filter) + else: + repo = repo.unfiltered() + # try once without timer, the filter may not be cached + if branchmap.read(repo) is None: + raise error.Abort('No brachmap cached for %s repo' % (filter or 'unfiltered')) + timer, fm = gettimer(ui, opts) + timer(lambda: branchmap.read(repo) and None) + fm.end() + @command('perfloadmarkers') def perfloadmarkers(ui, repo): """benchmark the time to parse the on-disk markers for a repo To: mjpieters, #hg-reviewers, durin42 Cc: mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel