comparison hgext3rd/pullbundle.py @ 4133:1293625d274d

pullbundle: add an output about the time spent slicing the set This will be useful to monitor overall performance.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sun, 23 Sep 2018 22:58:11 +0200
parents afc933d32085
children ab77f37fedf3
comparison
equal deleted inserted replaced
4132:afc933d32085 4133:1293625d274d
129 pullbundle = False 129 pullbundle = False
130 if filematcher: 130 if filematcher:
131 makeonecgpart(newpart, repo, None, outgoing, version, source, bundlecaps, 131 makeonecgpart(newpart, repo, None, outgoing, version, source, bundlecaps,
132 filematcher, cgversions) 132 filematcher, cgversions)
133 else: 133 else:
134 for sliceid, sliceout in sliceoutgoing(repo, outgoing): 134 start = util.timer()
135 slices = sliceoutgoing(repo, outgoing)
136 end = util.timer()
137 msg = _('pullbundle-cache: "missing" set sliced into %d subranges '
138 'in %s seconds\n')
139 repo.ui.write(msg % (len(slices), end - start))
140 for sliceid, sliceout in slices:
135 makeonecgpart(newpart, repo, sliceid, sliceout, version, source, bundlecaps, 141 makeonecgpart(newpart, repo, sliceid, sliceout, version, source, bundlecaps,
136 filematcher, cgversions) 142 filematcher, cgversions)
137 143
138 # stable range slicing 144 # stable range slicing
139 145