--- a/mercurial/setdiscovery.py Sun May 28 21:33:33 2017 -0400
+++ b/mercurial/setdiscovery.py Wed Jun 07 10:29:39 2017 +0100
@@ -53,6 +53,7 @@
from . import (
dagutil,
error,
+ util,
)
def _updatesample(dag, nodes, sample, quicksamplesize=0):
@@ -136,6 +137,8 @@
'''Return a tuple (common, anyincoming, remoteheads) used to identify
missing nodes from or in remote.
'''
+ start = util.timer()
+
roundtrips = 0
cl = local.changelog
dag = dagutil.revlogdag(cl)
@@ -235,8 +238,9 @@
# common.bases can include nullrev, but our contract requires us to not
# return any heads in that case, so discard that
result.discard(nullrev)
+ elapsed = util.timer() - start
ui.progress(_('searching'), None)
- ui.debug("%d total queries\n" % roundtrips)
+ ui.debug("%d total queries in %.4fs\n" % (roundtrips, elapsed))
if not result and srvheadhashes != [nullid]:
if abortwhenunrelated: