perf: prewarm the branchmap in perfbranchmapload
authorBoris Feld <boris.feld@octobus.net>
Fri, 23 Nov 2018 02:11:11 +0100
changeset 40719 578646b1e2b6
parent 40718 5bcf264bb1a0
child 40720 0a3cc351d718
perf: prewarm the branchmap in perfbranchmapload It is not very interesting to have the command randomly failing because the branchmap for the tested filter happens to be cold. So we make sure to have a valid up to date branchmap before going further. The data might still be missing from disk if a subset was equivalent. See next changeset for details and fix.
contrib/perf.py
--- a/contrib/perf.py	Sun Nov 25 22:39:54 2018 +0900
+++ b/contrib/perf.py	Fri Nov 23 02:11:11 2018 +0100
@@ -2251,6 +2251,9 @@
         repo = repoview.repoview(repo, filter)
     else:
         repo = repo.unfiltered()
+
+    repo.branchmap() # make sure we have a relevant, up to date branchmap
+
     # try once without timer, the filter may not be cached
     if branchmap.read(repo) is None:
         raise error.Abort(b'No branchmap cached for %s repo'