Show More
@@ -2232,10 +2232,13 def perfbranchmap(ui, repo, *filternames | |||||
2232 | @command(b'perfbranchmapload', [ |
|
2232 | @command(b'perfbranchmapload', [ | |
2233 | (b'f', b'filter', b'', b'Specify repoview filter'), |
|
2233 | (b'f', b'filter', b'', b'Specify repoview filter'), | |
2234 | (b'', b'list', False, b'List brachmap filter caches'), |
|
2234 | (b'', b'list', False, b'List brachmap filter caches'), | |
|
2235 | (b'', b'clear-revlogs', False, b'refresh changelog and manifest'), | |||
|
2236 | ||||
2235 | ] + formatteropts) |
|
2237 | ] + formatteropts) | |
2236 | def perfbranchmapload(ui, repo, filter=b'', list=False, **opts): |
|
2238 | def perfbranchmapload(ui, repo, filter=b'', list=False, **opts): | |
2237 | """benchmark reading the branchmap""" |
|
2239 | """benchmark reading the branchmap""" | |
2238 | opts = _byteskwargs(opts) |
|
2240 | opts = _byteskwargs(opts) | |
|
2241 | clearrevlogs = opts[b'clear_revlogs'] | |||
2239 |
|
2242 | |||
2240 | if list: |
|
2243 | if list: | |
2241 | for name, kind, st in repo.cachevfs.readdir(stat=True): |
|
2244 | for name, kind, st in repo.cachevfs.readdir(stat=True): | |
@@ -2253,9 +2256,12 def perfbranchmapload(ui, repo, filter=b | |||||
2253 | raise error.Abort(b'No branchmap cached for %s repo' |
|
2256 | raise error.Abort(b'No branchmap cached for %s repo' | |
2254 | % (filter or b'unfiltered')) |
|
2257 | % (filter or b'unfiltered')) | |
2255 | timer, fm = gettimer(ui, opts) |
|
2258 | timer, fm = gettimer(ui, opts) | |
|
2259 | def setup(): | |||
|
2260 | if clearrevlogs: | |||
|
2261 | clearchangelog(repo) | |||
2256 | def bench(): |
|
2262 | def bench(): | |
2257 | branchmap.read(repo) |
|
2263 | branchmap.read(repo) | |
2258 | timer(bench) |
|
2264 | timer(bench, setup=setup) | |
2259 | fm.end() |
|
2265 | fm.end() | |
2260 |
|
2266 | |||
2261 | @command(b'perfloadmarkers') |
|
2267 | @command(b'perfloadmarkers') |
General Comments 0
You need to be logged in to leave comments.
Login now