##// END OF EJS Templates
perf: time loading branchmap caches...
Martijn Pieters -
r39150:222aba76 default
parent child Browse files
Show More
@@ -1751,6 +1751,31 b' def perfbranchmap(ui, repo, *filternames'
1751 branchcachewrite.restore()
1751 branchcachewrite.restore()
1752 fm.end()
1752 fm.end()
1753
1753
1754 @command('perfbranchmapload', [
1755 ('f', 'filter', '', 'Specify repoview filter'),
1756 ('', 'list', False, 'List brachmap filter caches'),
1757 ] + formatteropts)
1758 def perfbranchmapread(ui, repo, filter='', list=False, **opts):
1759 """benchmark reading the branchmap"""
1760 if list:
1761 for name, kind, st in repo.cachevfs.readdir(stat=True):
1762 if name.startswith('branch2'):
1763 filtername = name.partition('-')[2] or 'unfiltered'
1764 ui.status('%s - %s\n'
1765 % (filtername, util.bytecount(st.st_size)))
1766 return
1767 if filter:
1768 repo = repoview.repoview(repo, filter)
1769 else:
1770 repo = repo.unfiltered()
1771 # try once without timer, the filter may not be cached
1772 if branchmap.read(repo) is None:
1773 raise error.Abort('No brachmap cached for %s repo'
1774 % (filter or 'unfiltered'))
1775 timer, fm = gettimer(ui, opts)
1776 timer(lambda: branchmap.read(repo) and None)
1777 fm.end()
1778
1754 @command('perfloadmarkers')
1779 @command('perfloadmarkers')
1755 def perfloadmarkers(ui, repo):
1780 def perfloadmarkers(ui, repo):
1756 """benchmark the time to parse the on-disk markers for a repo
1781 """benchmark the time to parse the on-disk markers for a repo
@@ -55,6 +55,8 b' perfstatus'
55 benchmark parsing bookmarks from disk to memory
55 benchmark parsing bookmarks from disk to memory
56 perfbranchmap
56 perfbranchmap
57 benchmark the update of a branchmap
57 benchmark the update of a branchmap
58 perfbranchmapload
59 benchmark reading the branchmap
58 perfbundleread
60 perfbundleread
59 Benchmark reading of bundle files.
61 Benchmark reading of bundle files.
60 perfcca (no help text available)
62 perfcca (no help text available)
General Comments 0
You need to be logged in to leave comments. Login now