diff -r fd8d13ea1bcc -r eec20025ada3 mercurial/debugcommands.py --- a/mercurial/debugcommands.py Tue Mar 26 17:26:54 2019 +0100 +++ b/mercurial/debugcommands.py Tue Mar 26 17:35:28 2019 +0100 @@ -815,7 +815,8 @@ remoterevs, _checkout = hg.addbranchrevs(repo, remote, branches, revs=None) localrevs = opts['rev'] - common, hds = doit(localrevs, remoterevs) + with util.timedcm('debug-discovery') as t: + common, hds = doit(localrevs, remoterevs) # compute all statistics common = set(common) @@ -823,6 +824,7 @@ lheads = set(repo.heads()) data = {} + data['elapsed'] = t.elapsed data['nb-common'] = len(common) data['nb-common-local'] = len(common & lheads) data['nb-common-remote'] = len(common & rheads) @@ -835,6 +837,7 @@ data['nb-revs-missing'] = data['nb-revs'] - data['nb-revs-common'] # display discovery summary + ui.write(("elapsed time: %(elapsed)f seconds\n") % data) ui.write(("heads summary:\n")) ui.write((" total common heads: %(nb-common)9d\n") % data) ui.write((" also local heads: %(nb-common-local)9d\n") % data)