[PATCH 2 of 2 (minor debug output change)] listkey: display the size of the listkey payload in a debug message
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Fri May 29 02:22:52 CDT 2015
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1432882159 25200
# Thu May 28 23:49:19 2015 -0700
# Node ID b6fd34a04aafe31da3e365af71e83b86425cf43a
# Parent ecb37d01e8e622d29daef4df1fccda9d85c521aa
listkey: display the size of the listkey payload in a debug message
This is a useful information to have in general and we already have debug
output related to listkeys. I'm planning to play around with massive amount of
phases roots and bookmarks so having this data in debug will be very useful.
This already got me to spot that one of the Logilab's review repo is exchanging
65KB of phases data during each exchanges.
diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py
--- a/mercurial/wireproto.py
+++ b/mercurial/wireproto.py
@@ -322,10 +322,12 @@ class wirepeer(peer.peerrepository):
yield {}, None
f = future()
self.ui.debug('preparing listkeys for "%s"\n' % namespace)
yield {'namespace': encoding.fromlocal(namespace)}, f
d = f.value
+ self.ui.debug('received listkey for "%s": %i bytes\n'
+ % (namespace, len(d)))
yield pushkeymod.decodekeys(d)
def stream_out(self):
return self._callstream('stream_out')
diff --git a/tests/test-ssh.t b/tests/test-ssh.t
--- a/tests/test-ssh.t
+++ b/tests/test-ssh.t
@@ -455,19 +455,22 @@ debug output
remote: 271
remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024
remote: 1
preparing listkeys for "bookmarks"
sending listkeys command
+ received listkey for "bookmarks": 45 bytes
preparing listkeys for "bookmarks"
sending listkeys command
+ received listkey for "bookmarks": 45 bytes
query 1; heads
sending batch command
searching for changes
all remote heads known locally
no changes found
preparing listkeys for "phases"
sending listkeys command
+ received listkey for "phases": 15 bytes
checking for updated bookmarks
$ cd ..
$ cat dummylog
More information about the Mercurial-devel
mailing list