diff mercurial/setdiscovery.py @ 32713:28240b75e880

discovery: log discovery result in non-trivial cases We log the discovery summary, the number of roundtrips and the elapsed time. This is useful to understand where slow push might come from when lloking at the blackbox.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 07 Jun 2017 10:44:11 +0100
parents 43bda143e3b2
children 483d47753726
line wrap: on
line diff
--- a/mercurial/setdiscovery.py	Wed Jun 07 10:29:39 2017 +0100
+++ b/mercurial/setdiscovery.py	Wed Jun 07 10:44:11 2017 +0100
@@ -241,6 +241,9 @@
     elapsed = util.timer() - start
     ui.progress(_('searching'), None)
     ui.debug("%d total queries in %.4fs\n" % (roundtrips, elapsed))
+    msg = 'found %d common and %d missing heads, %d roundtrips in %.4fs\n'
+    ui.log('discovery', msg, len(result), len(srvheadhashes), roundtrips,
+           elapsed)
 
     if not result and srvheadhashes != [nullid]:
         if abortwhenunrelated: