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.
--- a/mercurial/wireproto.py Fri May 29 00:09:36 2015 -0700
+++ b/mercurial/wireproto.py Thu May 28 23:49:19 2015 -0700
@@ -324,6 +324,8 @@
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):
--- a/tests/test-ssh.t Fri May 29 00:09:36 2015 -0700
+++ b/tests/test-ssh.t Thu May 28 23:49:19 2015 -0700
@@ -457,8 +457,10 @@
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
@@ -466,6 +468,7 @@
no changes found
preparing listkeys for "phases"
sending listkeys command
+ received listkey for "phases": 15 bytes
checking for updated bookmarks
$ cd ..